-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: automated cases for smoke tcs tc1618 tc1677 tc1605 tc1412 #127
base: main
Are you sure you want to change the base?
test: automated cases for smoke tcs tc1618 tc1677 tc1605 tc1412 #127
Conversation
Visit the preview URL for this PR (updated for commit 4a18834): https://staging-zksync-dapp-wallet-v2--pr127-uexp-4412-portal-7zp49zpu.web.app (expires Fri, 08 Sep 2023 13:25:22 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a25831e6058958ccabf0f806505b5b8e7241b178 |
@pcheremu could you please review the PR? |
tests/e2e/features/artifacts/assetsPage/artifacts-emptyWallet.feature
Outdated
Show resolved
Hide resolved
tests/e2e/features/artifacts/assetsPage/artifacts-emptyWallet.feature
Outdated
Show resolved
Hide resolved
@abilevych PR is ready for review |
Then Message " on Goerli Testnet for deposit. " should be visible | ||
Then Element with "text" "Fee:" should be "invisible" | ||
#Fee component | ||
Then Element with "data-testid" "fee-amount" should be "invisible" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't really work properly.
You can make a rebase with the main branch and after that, it would fail (as it should be).
There need to use the "testId" format of selector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest PR
Added autotests fot the next cases TC1677 Deposit - Bridge - [Artifacts] "Insufficient balance" warning message (Zero token balance) TC1618 Bridge - Deposit - Empty wallet - Atrifacts TC1605 Bridge - Redirection - "View on Explorer" links TC1412 Deposit - Transactions - Artifacts - "Transaction submitted" pop up
Added testnet and mainnet tags (tc1605) Added check for disabled "Continue" button (tc1678)
Added check for disabled Continue button (tc1677)
16d23d7
to
2efa405
Compare
Changed data-testid to testId Fixed getElementByTestId to work correctly with checkElementVisible - 'try-catch'
Changed "data-testid" selector to "testId" Fixes failing tests
tests/e2e/src/pages/base.page.ts
Outdated
@@ -206,7 +206,11 @@ export class BasePage { | |||
|
|||
async getElementByTestId(testid: string) { | |||
element = await this.world.page?.locator(`${this.byTestId}${testid}`).first(); | |||
await element.scrollIntoViewIfNeeded(); | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please justify this construction?
I have some doubts regarding the necessity of it.
Also, there is a question regarding its implementation (try/catch)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try-catch block removed in the last commit
tests/e2e/src/pages/base.page.ts
Outdated
@@ -235,6 +239,7 @@ export class BasePage { | |||
} | |||
|
|||
async returnElementByType(elementType: string, value: string) { | |||
//element = undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is that comment about?
I need some context to understand that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in the last commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not a comment it should be uncommented but not removed, otherwise we will reuse previous selector for undefined element an it will be always true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uncommented in latest commit
…cs-Bridge-Deposit
Removed scrollIntoViewIfNeeded for getElementByTestId method Removed obsolete comment
Fixed incorrect testId selector name
Moved id1609 id1607 tcs to id785 (because they need deposit tag for correct work) Renamed feature to Bridge (previously it was incorrect Withdraw)
…cs-Bridge-Deposit
Fixing selectors 2 bridgePage artifacts feature files since deposit has different logic for switch network
…cs-Bridge-Deposit
@abilevych PR is ready for review again - could you please review? |
Added autotests fot the next cases
TC1677 Deposit - Bridge - [Artifacts] "Insufficient balance" warning message (Zero token balance)
TC1618 Bridge - Deposit - Empty wallet - Atrifacts
TC1605 Bridge - Redirection - "View on Explorer" links
TC1412 Deposit - Transactions - Artifacts - "Transaction submitted" pop up