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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,34 @@ Feature: Artifacts - UI
#Error state
Then Element with "partial class" "has-error" should be "visible"
Then Element with "partial class" "amount-input-error" should be "visible"
When I confirm the network switching
Then Element with "text" " Continue " should be "disabled"

@id1618
Scenario: Check the Empty wallet Artifacts on the Bridge Deposit Page
Given I go to page "/bridge?network=era-goerli"
When I click by text "Deposit"
When I choose "ETH" as token and insert "0" as amount
When Element with "text" " Insufficient " should be "visible"
Then Message "ETH" should be visible
Then Message " balance on Ethereum Goerli Testnet to cover the fee. We recommend having at least " should be visible
Then Message " on Goerli Testnet for deposit. " should be visible
Then Element with "text" "Fee:" should be "invisible"
#Fee component
Then Element with "testId" "fee-amount" should be "invisible"

pcheremu marked this conversation as resolved.
Show resolved Hide resolved
@id1677
Scenario: Check "Insufficient balance" warning message (Zero token balance) (Bridge)
Given A wallet should be "empty"
When I go to page "/bridge?network=era-goerli"
When I click by text "Deposit"
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"
When I confirm the network switching
Then Element with "text" " Continue " should be "disabled"

@id1676 @transfer
Scenario: Check "Insufficient balance" warning message (Zero token balance) (Transfer)
Expand All @@ -57,4 +85,4 @@ 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"
68 changes: 68 additions & 0 deletions tests/e2e/features/artifacts/bridgePage/artifacts-deposit.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
@bridge @bridgePage @regression @smoke @artifacts @richWallet @deposit
Feature: Bridge

Background:
Given Connect Metamask extension with login action

@id756
Scenario: Check the Bridge artifacts on Deposit (Testnet)
Given I go to page "/bridge?network=era-goerli"
Then Element with "text" "Bridge" should be "visible"
Then Element with "text" "Deposit" should be "visible"
Then Element with "text" "Withdraw" should be "visible"
Then Element with "text" "From" should be "visible"
Then Element with "text" "Ethereum Goerli Testnet" should be "visible"
Then Element with "class" "account-button" should be "visible"
Then Element with "class" "account-button" should be "clickable"
Then Element with "testId" "token-dropDown" should be "visible"
Then Element with "testId" "token-dropDown" should be "clickable"
Then Element with "partial string" "Balance:" should be "visible"
Then Element with "id" "amount-input" should be "visible"
Then Element with "id" "amount-input" should be "clickable"
Then Element with "text" " Max " should be "visible"
Then Element with "text" " Max " should be "clickable"
#Block
Then Element with "text" "Your zkSync Era Testnet account" should be "visible"
Then Element with "text" "Your zkSync Era Testnet account" should be "clickable"
Then Element with "text" "0x2CF4...75d" should be "visible"
Then Element with "text" "0x2CF4...75d" should be "clickable"
Then Element with "class" "address-avatar address-card-avatar" should be "visible"
Then Element with "partial src" "eth.svg" should be "visible"
#Fee block
Then Element with "testId" "fee-amount" should be "visible"
Then Element with "partial string" "$" should be "visible"
Then Element with "class" "circle" should be "enabled"
Then Element with "text" "ETH" should be "visible"
Then Element with "type" "submit" should be "visible"
# Bottom block part
When I confirm the network switching
Then Element with "partial string" "Arriving in ~15 minutes" should be "visible"
Then Element with "type" "submit" should be "visible"
Then Element with "partial string" " Continue " should be "visible"

@id1611
Scenario: Check the editing recipient address in Bridge (Deposit)
Given I go to page "/bridge?network=era-goerli"
When I click by text "Deposit"
When I click by "text" with "Your zkSync Era Testnet account" value
Then Element with "text" "Bridge to" should be "visible"
When I fill the input field contains "placeholder" type "Address or ENS or contact name" value with "0x52B6d10d7d865B3d4103f8809AA3521288568f46" text
When I click by text "0x52B6...f46"
Then Element with "text" "zkSync Era Testnet address" should be "visible"
Then Element with "text" "0x52B6...f46" should be "visible"

@id1598
Scenario: Check the Bridge artifacts on Deposit: a wallet is not connected
Given I'm logged out
Given I go to page "/bridge?network=era-goerli"
Then Element with "text" "Bridge" should be "visible"
When I click by text "Deposit"
Then Element with "text" " Connect wallet " should be "visible"
Then Element with "text" " Connect wallet " should be "clickable"
Then Element with "testId" "token-dropDown" should be "visible"
Then Element with "testId" "token-dropDown" should be "clickable"
Then Element with "text" "Connect wallet to see balance" should be "visible"
Then Element with "placeholder" "0" should be "visible"
Then Element with "xpath" "//*[contains(@class,'solid') and text()=' Connect wallet ']" should be "visible"
Then Element with "xpath" "//*[contains(@class,'solid') and text()=' Connect wallet ']" should be "clickable"

Original file line number Diff line number Diff line change
@@ -1,41 +1,9 @@
@bridge @bridgePage @regression @smoke @artifacts @richWallet
Feature: Withdraw
Feature: Bridge

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 @@ -158,7 +126,6 @@ Feature: Withdraw
Then Element with "testId" "token-dropDown" should be "clickable"
Then Element with "text" "Connect wallet to see balance" should be "visible"
Then Element with "placeholder" "0" should be "visible"
Then Element with "partial class and text" "0" should be "visible"
Then Element with "xpath" "//*[contains(@class,'solid') and text()=' Connect wallet ']" should be "visible"
Then Element with "xpath" "//*[contains(@class,'solid') and text()=' Connect wallet ']" should be "clickable"

Expand All @@ -173,64 +140,38 @@ Feature: Withdraw
Then Element with "text" "Ethereum Goerli Testnet address" should be "visible"
Then Element with "text" "0x9CC8...eB8" should be "visible"

@id756
Scenario: Check the Bridge artifacts on Deposit (Testnet)
Given I go to page "/bridge?network=era-goerli"
Then Element with "text" "Bridge" should be "visible"
Then Element with "text" "Deposit" should be "visible"
Then Element with "text" "Withdraw" should be "visible"
Then Element with "text" "From" should be "visible"
Then Element with "text" "Ethereum Goerli Testnet" should be "visible"
Then Element with "class" "account-button" should be "visible"
Then Element with "class" "account-button" should be "clickable"
Then Element with "testId" "token-dropDown" should be "visible"
Then Element with "testId" "token-dropDown" should be "clickable"
Then Element with "partial string" "Balance:" should be "visible"
Then Element with "id" "amount-input" should be "visible"
Then Element with "id" "amount-input" should be "clickable"
Then Element with "text" " Max " should be "visible"
Then Element with "text" " Max " should be "clickable"
#Block
Then Element with "text" "Your zkSync Era Testnet account" should be "visible"
Then Element with "text" "Your zkSync Era Testnet account" should be "clickable"
Then Element with "text" "0x2CF4...75d" should be "visible"
Then Element with "text" "0x2CF4...75d" should be "clickable"
Then Element with "class" "address-avatar address-card-avatar" should be "visible"
Then Element with "partial src" "eth.svg" should be "visible"
#Fee block
Then Element with "testId" "fee-amount" should be "visible"
Then Element with "partial string" "$" should be "visible"
Then Element with "class" "circle" should be "enabled"
Then Element with "text" "ETH" should be "visible"
Then Element with "type" "submit" should be "visible"
# Bottom block part
Then Element with "string" "Arriving in ~15 minutes" should be "visible"
Then Element with "type" "submit" should be "visible"
Then Element with "string" "Continue" should be "visible"

@id1598
Scenario: Check the Bridge artifacts on Deposit: a wallet is not connected
Given I'm logged out
Given I go to page "/bridge?network=era-goerli"
Then Element with "text" "Bridge" should be "visible"
When I click by text "Deposit"
Then Element with "text" " Connect wallet " should be "visible"
Then Element with "text" " Connect wallet " should be "clickable"
Then Element with "testId" "token-dropDown" should be "visible"
Then Element with "testId" "token-dropDown" should be "clickable"
Then Element with "text" "Connect wallet to see balance" should be "visible"
Then Element with "placeholder" "0" should be "visible"
Then Element with "partial class and text" "0" should be "visible"
Then Element with "xpath" "//*[contains(@class,'solid') and text()=' Connect wallet ']" should be "visible"
Then Element with "xpath" "//*[contains(@class,'solid') and text()=' Connect wallet ']" should be "clickable"

@id1611
Scenario: Check the editing recipient address in Bridge (Deposit)


@id1605:I @testnet
Scenario Outline: Check redirection for the Bridge "View on Explorer" links (Testnet)
Given I go to page "/bridge?network=era-goerli"
When I click by text "Deposit"
When I click by "text" with "Your zkSync Era Testnet account" value
Then Element with "text" "Bridge to" should be "visible"
When I fill the input field contains "placeholder" type "Address or ENS or contact name" value with "0x52B6d10d7d865B3d4103f8809AA3521288568f46" text
When I click by text "0x52B6...f46"
Then Element with "text" "zkSync Era Testnet address" should be "visible"
Then Element with "text" "0x52B6...f46" should be "visible"
When I click by partial text "..."
Then Element with "text" "View on Explorer" should be "visible"
When I click by text "View on Explorer"
Then Modal card element with the "//*[text()='View on explorer']" xpath should be "visible"
When I click by the "<Explorer item>" text on the Explorer Modal
Then New page has "<url>" address

Examples:
| Explorer item | url |
| zkSync Era Testnet | https://goerli.explorer.zksync.io/address/0x2CF4F78917A16C9584AeB5d4c5bD2713d724C75d |
| Ethereum Goerli Testnet | https://goerli.etherscan.io/address/0x2CF4F78917A16C9584AeB5d4c5bD2713d724C75d |
| zkSync Lite Goerli | https://goerli.zkscan.io/explorer/accounts/0x2cf4f78917a16c9584aeb5d4c5bd2713d724c75d |


@id1605:II @mainnet
Scenario Outline: Check redirection for the Bridge "View on Explorer" links (Mainnet)
Given I go to page "/bridge?network=era-mainnet"
When I click by partial text "..."
Then Element with "text" "View on Explorer" should be "visible"
When I click by text "View on Explorer"
Then Modal card element with the "//*[text()='View on explorer']" xpath should be "visible"
When I click by the "<Explorer item>" text on the Explorer Modal
Then New page has "<url>" address

Examples:
| Explorer item | url |
| zkSync Era Mainnet | https://explorer.zksync.io/address/0x2CF4F78917A16C9584AeB5d4c5bD2713d724C75d |
| Ethereum Mainnet | https://etherscan.io/address/0x2CF4F78917A16C9584AeB5d4c5bD2713d724C75d |
| zkSync Lite Mainnet| https://zkscan.io/explorer/accounts/0x2cf4f78917a16c9584aeb5d4c5bd2713d724c75d |

Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,34 @@ Feature: Artifacts - UI
Then Element with "text" "0x1ab721...184" should be "visible"
Then Element with "partial src" "zz.png" should be "visible"

@id1412
Scenario: Check artifacts for "Transaction submitted" pop up (Deposit)
Given I am on the Main page
When I go to page "/transaction/zksync/era/deposit/?network=era-goerli"
When I click by "text" with "Your account" value
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
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" " Go to Assets page " should be "visible"

@id1399
Scenario: Check max button functionality - Deposit
Given I go to page "/transaction/zksync/era/deposit/?network=era-goerli"
Expand All @@ -247,7 +275,7 @@ Feature: Artifacts - UI
Then Element with "partial text" "Max" should be "visible"
Then Element with "partial text" "Max" should be "clickable"
# Check hover tooltip
Then Element with "partial title" "Your max amount is" should be "visible"
Then Element with "class" "amount-input-max-button" should be "visible"
#Get the Max input value (Step to receive max value for comparison)
When I choose "ETH" as token and insert "100000000" as amount
When I save Max Balance Error Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Feature: Withdraw
Then Element with "partial src" "eth.svg" should be "visible"
Then Element with "placeholder" "0" should be "visible"
Then Element with "class" "break-all" should be "visible"
Then Element with "data-testid" "token-dropDown" should be "visible"
Then Element with "data-testid" "token-dropDown" should be "clickable"
Then Element with "testId" "token-dropDown" should be "visible"
Then Element with "testId" "token-dropDown" should be "clickable"
Then Element with "class" "amount-input-max-button" should be "visible"
Then Element with "class" "amount-input-max-button" should be "clickable"
# Fee block tc1432
Expand Down
Loading
Loading