-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(extension): tests for grid view (#944)
* test(extension): add tests for stake pool skeletons * test(extension): add LW-9995 * test(extension): add LW-9996
- Loading branch information
1 parent
4879c29
commit 0749851
Showing
15 changed files
with
309 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
packages/e2e-tests/src/elements/multidelegation/StakePoolGridCard.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* eslint-disable no-undef */ | ||
import { ChainablePromiseElement } from 'webdriverio'; | ||
|
||
export class StakePoolGridCard { | ||
private SELECTED_POOLS_LIST = '[data-testid="selected-pools-list"]'; | ||
private AVAILABLE_POOLS_LIST = '[data-testid="stake-pool-list-scroll-wrapper"]'; | ||
private CARD = '[data-testid="stake-pool-card"]'; | ||
private CARD_TITLE = '[data-testid="stake-pool-card-title"]'; | ||
|
||
protected card; | ||
|
||
constructor(index = 0, isOnSelectedPoolsList = false) { | ||
this.card = $(isOnSelectedPoolsList ? this.SELECTED_POOLS_LIST : this.AVAILABLE_POOLS_LIST).$$(this.CARD)[index]; | ||
} | ||
|
||
get container(): ChainablePromiseElement<WebdriverIO.Element | undefined> { | ||
return this.card; | ||
} | ||
|
||
get title(): ChainablePromiseElement<WebdriverIO.Element> { | ||
return this.card.$(this.CARD_TITLE); | ||
} | ||
|
||
async click(): Promise<void> { | ||
await this.card.scrollIntoView(); | ||
await this.card.waitForClickable(); | ||
await this.card.click(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.