-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: migrate tx requests tests to playwright, closes #4151
- Loading branch information
Showing
17 changed files
with
173 additions
and
210 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
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
128 changes: 0 additions & 128 deletions
128
tests-legacy/integration/transactions/transactions.spec.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { Page } from '@playwright/test'; | ||
import { TransactionRequestSelectors } from '@tests/selectors/requests.selectors'; | ||
import { SharedComponentsSelectors } from '@tests/selectors/shared-component.selectors'; | ||
import { createTestSelector } from '@tests/utils'; | ||
|
||
export class TransactionRequestPage { | ||
readonly confirmTransactionBtnSelector = createTestSelector( | ||
TransactionRequestSelectors.BtnConfirmTransaction | ||
); | ||
readonly feeToBePaidLabel = createTestSelector(SharedComponentsSelectors.FeeToBePaidLabel); | ||
readonly transactionRequestPage = createTestSelector( | ||
TransactionRequestSelectors.TransactionRequestPage | ||
); | ||
|
||
constructor(readonly page: Page) {} | ||
|
||
async clickConfirmTransactionButton() { | ||
return this.page.click(this.confirmTransactionBtnSelector); | ||
} | ||
|
||
async getDisplayedFeeValue() { | ||
return this.page.locator(this.feeToBePaidLabel).innerText(); | ||
} | ||
|
||
async getTransactionRequestError() { | ||
return this.page.locator(TransactionRequestSelectors.ErrorMessage).innerText(); | ||
} | ||
|
||
async waitForFee() { | ||
await this.page.locator(this.feeToBePaidLabel).waitFor(); | ||
} | ||
|
||
async waitForTransactionRequestPage() { | ||
await this.page.locator(this.transactionRequestPage).waitFor(); | ||
} | ||
} |
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,19 @@ | ||
import { Page } from '@playwright/test'; | ||
import { UpdateProfileRequestSelectors } from '@tests/selectors/requests.selectors'; | ||
import { createTestSelector } from '@tests/utils'; | ||
|
||
export class UpdateProfileRequestPage { | ||
readonly updateProfileBtnSelector = createTestSelector( | ||
UpdateProfileRequestSelectors.BtnUpdateProfile | ||
); | ||
|
||
constructor(readonly page: Page) {} | ||
|
||
async clickUpdateProfileButton() { | ||
return this.page.click(this.updateProfileBtnSelector); | ||
} | ||
|
||
async waitForUpdateProfileRequestError(msg: string) { | ||
return this.page.waitForSelector(`text=${msg}`); | ||
} | ||
} |
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,10 @@ | ||
export enum TransactionRequestSelectors { | ||
BtnConfirmTransaction = 'btn-confirm-transaction', | ||
ErrorMessage = 'transaction-request-error-message', | ||
TransactionRequestPage = 'transaction-signing-page', | ||
} | ||
|
||
export enum UpdateProfileRequestSelectors { | ||
BtnUpdateProfile = 'btn-update-profile', | ||
ErrorMessage = 'update-profile-request-error-message', | ||
} |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
export enum TestAppSelectors { | ||
BtnContractCall = 'btn-contract-call', | ||
BtnUpdateValidProfile = 'btn-update-valid-profile', | ||
BtnUpdateInvalidProfile = 'btn-update-invalid-profile', | ||
BtnUpdateProfile = 'btn-update-profile', | ||
ErrorMessage = 'error-message', | ||
} |
Oops, something went wrong.