Skip to content

Commit

Permalink
test: automated cases for smoke tcs tc1622 tс1565 tc1674 tc1597 (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
amelnytskyi authored Sep 4, 2023
1 parent 523c5b6 commit baf8ea3
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,18 @@ Feature: Artifacts - UI
Then Element with "partial class" "amount-input-error" should be "visible"
# Technical step to see Continue button
Then I confirm the network switching
Then Element with "text" " Continue " should be "disabled"
Then Element with "text" " Continue " should be "disabled"

@id1674
Scenario: Check "Insufficient balance" warning message (Zero token balance) (Withdraw)
Then A wallet should be "empty"
When I go to page "/transaction/zksync/era/withdraw"
When I click by "text" with "Your account" value
When I choose "ETH" as token and insert "1000" as amount
Then Message " Insufficient balance " should be visible
#Error state
Then Element with "partial class" "has-error" should be "visible"
Then Element with "partial class" "amount-input-error" should be "visible"
Then I confirm the network switching
Then Element with "text" " Continue " should be "disabled"

35 changes: 3 additions & 32 deletions tests/e2e/features/artifacts/bridgePage/artifacts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,6 @@ Feature: Withdraw
Background:
Given Connect Metamask extension with login action

@id1609 @id1607
Scenario: Check Explore ecosystem button on Bridge Deposit
Given I go to page "/bridge?network=era-goerli"
When I click by text "Deposit"
When I choose "ETH" as token and insert "0.0000000001" as amount
When I "confirm" transaction after clicking "Add funds to zkSync Era Testnet" button
Then Message "Transaction submitted" should be visible
#id1607 Check other elements on window
Then Element with "partial class" "progress-plane-animation" should be "visible"
Then Element with "class" "button-line-body-info-underline" should be "visible"
#Token icon
Then Element with "text" "Deposit" should be "visible"
Then Element with "partial text" "0.0000000001" should be "visible"
Then Modal card element with the "//*[contains(@src, 'eth.svg')]" xpath should be "visible"
Then Modal card element with the "//*[text()='ETH']" xpath should be "visible"
Then Modal card element with the "//*[text()='<$0.01']" xpath should be "visible"
Then Arrow element for "Deposit" external link should be "visible"
Then Arrow element for "Deposit" external link should be "clickable"
Then Element with "text" " Your funds will be available on " should be "visible"
Then Element with "text" "zkSync Era Testnet" should be "visible"
Then Element with "text" " after the transaction is committed on " should be "visible"
Then Element with "text" "Ethereum Goerli Testnet" should be "visible"
Then Element with "text" " and then processed on " should be "visible"
Then Element with "text" "zkSync Era Testnet" should be "visible"
Then Element with "text" ". You are free to close this page. " should be "clickable"
Then Element with "text" " Track status " should be "clickable"
Then Element with "text" " Make another transaction " should be "visible"
Then Element with "text" " Explore ecosystem " should be "visible"
#Check redirection id1609
Then I click by "text" with " Explore ecosystem " value
Then New page has "https://ecosystem.zksync.io/" address

@id1602
Scenario: Check the Account Dropdown Artifacts on the Bridge Page
Given I go to page "/bridge?network=era-goerli"
Expand Down Expand Up @@ -102,6 +70,9 @@ Feature: Withdraw
Given I go to page "/bridge?network=era-goerli"
When I click by text "Withdraw"
Then Element with "text" "Bridge" should be "visible"
Then Element with "partial text" "Recent withdrawals" should be "visible"
#Recent withdrawals dropdown
Then Element with "partial class" "transition-transform" should be "visible"
Then Element with "text" "From" should be "visible"
Then Element with "text" "zkSync Era Testnet" should be "visible"
Then Element with "testId" "token-dropDown" should be "visible"
Expand Down
22 changes: 22 additions & 0 deletions tests/e2e/features/redirection/mainPage/redirection.feature
Original file line number Diff line number Diff line change
Expand Up @@ -306,4 +306,26 @@ Feature: External Redirection on the Main Page
Then Message "Transaction submitted" should be visible
When I click by text " Explore ecosystem "
Then New page has "https://ecosystem.zksync.io/" address

@id1622
Scenario: Check redirection for the "Send to" page (Withdraw)
Given I go to page "/transaction/zksync/era/withdraw"
When I click by "text" with "Your account" value
When I confirm the network switching
Then Element with "text" " Arriving in ~24 hours " should be "visible"
When I click by "text" with " Arriving in ~24 hours " value
Then Element with "text" " Arriving in ~24 hours " should be "clickable"
Then New page has "https://era.zksync.io/docs/reference/troubleshooting/withdrawal-delay.html#withdrawal-delay" address

@id1565
Scenario: Check redirection for the "Confirm transaction" modal (Withdraw)
Given I go to page "/transaction/zksync/era/withdraw"
When I click by "text" with "Your account" value
When I confirm the network switching
When I choose "ETH" as token and insert "0.0001" as amount
When I click by text " Continue "
Then Element with "text" "Confirm transaction" should be "visible"
Then Modal card element with the "//*[text()=' Arriving in ~24 hours ']" xpath should be "visible"
When I click by the "//*[text()=' Arriving in ~24 hours ']" text element on the Modal card
Then New page has "https://era.zksync.io/docs/reference/troubleshooting/withdrawal-delay.html#withdrawal-delay" address

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: Deposit
Background:
Given Connect Metamask extension with login action

@id785
@id785 @id1609 @id1607
Scenario: Make a deposit on Bridge (Deposit)
Given I go to page "/bridge?network=era-goerli"
When I click by text "Deposit"
Expand All @@ -16,3 +16,28 @@ Feature: Deposit
When I "confirm" transaction after clicking "Add funds to zkSync Era Testnet" button
Then Message "Transaction submitted" should be visible
Then Element with "partial href" "https://goerli.etherscan.io/tx/" should be "clickable"
#id1607 Check "Transaction submitted" pop up Artifacts
Then Element with "partial class" "progress-plane-animation" should be "visible"
Then Element with "class" "button-line-body-info-underline" should be "visible"
#Token icon
Then Element with "text" "Deposit" should be "visible"
Then Element with "partial text" "0.0000000001" should be "visible"
Then Modal card element with the "//*[contains(@src, 'eth.svg')]" xpath should be "visible"
Then Modal card element with the "//*[text()='ETH']" xpath should be "visible"
Then Modal card element with the "//*[text()='<$0.01']" xpath should be "visible"
Then Arrow element for "Deposit" external link should be "visible"
Then Arrow element for "Deposit" external link should be "clickable"
Then Element with "text" " Your funds will be available on " should be "visible"
Then Element with "text" "zkSync Era Testnet" should be "visible"
Then Element with "text" " after the transaction is committed on " should be "visible"
Then Element with "text" "Ethereum Goerli Testnet" should be "visible"
Then Element with "text" " and then processed on " should be "visible"
Then Element with "text" "zkSync Era Testnet" should be "visible"
Then Element with "text" ". You are free to close this page. " should be "clickable"
Then Element with "text" " Track status " should be "clickable"
Then Element with "text" " Make another transaction " should be "visible"
Then Element with "text" " Explore ecosystem " should be "visible"
#id1609 Check "Explore ecosystem" button
Then I click by "text" with " Explore ecosystem " value
Then New page has "https://ecosystem.zksync.io/" address

0 comments on commit baf8ea3

Please sign in to comment.