-
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): add e2e for wallet account disabling (#1323)
* test(extension): add e2e for wallet account disabling * test(extension): fix quotes for steps
- Loading branch information
Showing
7 changed files
with
186 additions
and
28 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
42 changes: 42 additions & 0 deletions
42
packages/e2e-tests/src/elements/accounts/HoldUpDisableAccountDialog.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,42 @@ | ||
/* eslint-disable no-undef */ | ||
import { ChainablePromiseElement } from 'webdriverio'; | ||
|
||
class HoldUpDisableAccountDialog { | ||
private BODY = '[role="alertdialog"]'; | ||
private TITLE = '//h2[@data-testid="dialog-title"]'; | ||
private DESCRIPTION = `${this.TITLE}/following-sibling::span`; | ||
private CANCEL_BUTTON = '[data-testid="dialog-action-cancel"]'; | ||
private CONFIRM_BUTTON = '[data-testid="dialog-action-confirm"]'; | ||
|
||
get body(): ChainablePromiseElement<WebdriverIO.Element> { | ||
return $(this.BODY); | ||
} | ||
|
||
get title(): ChainablePromiseElement<WebdriverIO.Element> { | ||
return $(this.TITLE); | ||
} | ||
|
||
get description(): ChainablePromiseElement<WebdriverIO.Element> { | ||
return $(this.DESCRIPTION); | ||
} | ||
|
||
get cancelButton(): ChainablePromiseElement<WebdriverIO.Element> { | ||
return $(this.CANCEL_BUTTON); | ||
} | ||
|
||
get confirmButton(): ChainablePromiseElement<WebdriverIO.Element> { | ||
return $(this.CONFIRM_BUTTON); | ||
} | ||
|
||
async clickCancelButton() { | ||
await this.cancelButton.waitForClickable(); | ||
await this.cancelButton.click(); | ||
} | ||
|
||
async clickConfirmButton() { | ||
await this.confirmButton.waitForClickable(); | ||
await this.confirmButton.click(); | ||
} | ||
} | ||
|
||
export default new HoldUpDisableAccountDialog(); |
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