Skip to content
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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

amelnytskyi
Copy link

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

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

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

@amelnytskyi
Copy link
Author

@pcheremu could you please review the PR?
Thanks in advance

pcheremu
pcheremu previously approved these changes Aug 30, 2023
@amelnytskyi
Copy link
Author

@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"

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

Copy link
Author

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)
@amelnytskyi amelnytskyi force-pushed the UEXP-4412-Portal-Write-tests-for-the-smoke-tcs-Bridge-Deposit branch from 16d23d7 to 2efa405 Compare August 30, 2023 13:14
Changed data-testid to testId
Fixed getElementByTestId to work correctly with checkElementVisible - 'try-catch'
Changed "data-testid" selector to "testId"
Fixes failing tests
@@ -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 {

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)

Copy link
Author

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

@@ -235,6 +239,7 @@ export class BasePage {
}

async returnElementByType(elementType: string, value: string) {
//element = undefined;

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

Copy link
Author

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

Copy link

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uncommented in latest commit

amelnytskyi and others added 8 commits September 1, 2023 11:00
Removed scrollIntoViewIfNeeded for getElementByTestId method
Removed obsolete comment
Moved id1609 id1607 tcs to id785 (because they need deposit tag for correct work)
Renamed feature to Bridge (previously it was incorrect Withdraw)
Fixing selectors
 2 bridgePage artifacts feature files since deposit has different logic for switch network
@amelnytskyi
Copy link
Author

@abilevych PR is ready for review again - could you please review?
Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants