Skip to content

Commit

Permalink
test: update tests for sepolia (#112)
Browse files Browse the repository at this point in the history
# What ❔

update ui tests for sepolia

## Why ❔

keep tests up to date

## Checklist


- [+ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ +] Tests for the changes have been added / updated.
- [- ] Documentation comments have been added / updated.
  • Loading branch information
pcheremu committed Feb 15, 2024
1 parent e366f30 commit bc75ffc
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 31 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/app-deploy-feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ jobs:

mainnet:
needs: build
name: Feature Env, Mainnet+
name: Feature on Mainnet + Sepolia
uses: ./.github/workflows/app-e2e.yml
secrets: inherit
permissions:
contents: read
with:
targetUrl: ${{ needs.build.outputs.dappUrl }}
testnet_network_value_for_e2e: "/?network=sepolia"
default_network_value_for_e2e: "/?network=mainnet"
publish_to_allure: true
environmentTags: "and not @productionEnv"
3 changes: 2 additions & 1 deletion .github/workflows/app-deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ jobs:
mainnet:
needs: deploy
name: Staging Env, Mainnet+
name: Staging on Mainnet + Sepolia
uses: ./.github/workflows/app-e2e.yml
secrets: inherit
permissions:
contents: read
with:
targetUrl: ${{ needs.deploy.outputs.dappUrl }}
testnet_network_value_for_e2e: "/?network=sepolia"
default_network_value_for_e2e: "/?network=mainnet"
publish_to_allure: true
environmentTags: "and not @featureEnv"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/app-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
type: string
default: '/?network=mainnet'
required: true
testnet_network_value_for_e2e:
type: string
default: '/?network=sepolia'
required: true
publish_to_allure: #Here we define the variable that can be overwritten by caller workflow
type: boolean
description: "Publish test results to allure"
Expand Down Expand Up @@ -106,7 +110,7 @@ jobs:
echo "Run tests"
if [ "${{ matrix.tags }}" = "@testnetSmokeSuite" ]; then
echo "Run in testnetSmokeSuite only"
E2ENETWORK='/?network=goerli' npx cucumber-js --tags "${{ matrix.tags }} ${{ inputs.environmentTags }} and not @mainnet"
E2ENETWORK='${{ inputs.testnet_network_value_for_e2e }}' npx cucumber-js --tags "${{ matrix.tags }} ${{ inputs.environmentTags }} and not @mainnet"
else
echo "Run in mainnet"
E2ENETWORK='${{ inputs.default_network_value_for_e2e }}' npx cucumber-js --tags "${{ matrix.tags }} ${{ inputs.environmentTags }} and not @testnet"
Expand Down
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,7 @@ lerna-debug.log*
!.vscode/extensions.json

# Allure
#Allure results and artifacts
**/allure-results/
**/e2e/artifacts/
**/playbook/artifacts*
**/playbook/cache*
**/buffer/*.txt
**allure-results/

# App hyperchain config
hyperchain.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Feature: Main Page
Examples:
| Value | Dropdown |
| zkSync Era Goerli Testnet | network |
| zkSync Era Sepolia Testnet | network |

Scenario: Network stats is displayed
Then Element with "text" "Network Stats" should be "visible"
Expand Down
22 changes: 10 additions & 12 deletions packages/app/tests/e2e/features/artifacts/artifactsSet3.feature
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,14 @@ Feature: Main Page
@id380 @mainnet
Scenario: Verify label "in" for Account info on Account page
Given I go to page "/address/0x0000000000000000000000000000000000000000"
# When I click by text "Show more transactions ->"
Then Element with "text" "in" should be "visible"

#@id382 @mainnet
#Scenario: Verify label "self" for Account info on Account page
#Given I go to page "/address/0x94124252B5D343AB6E950A15982599ee1AADE660"
# When I click by text "Show more transactions ->"
#Then Element with "text" "self" should be "visible"
@id382 @mainnet
Scenario: Verify label "self" for Account info on Account page
Given I go to page "/address/0xed7175341f123f7718aBaCF1702d6980CFc08784"
Then Element with "text" "self" should be "visible"

@id580 @id578 @id619 @testnet @testnetSmokeSuite
@id580 @id578 @id619 @testnet
Scenario Outline: Verify label "<label name>" for method column on Contract page
Given I go to page "<Page>"
Then Column with "Method" name includes "<label name>" cell
Expand All @@ -142,11 +140,11 @@ Feature: Main Page

@id258 @testnet @testnetSmokeSuite
Scenario Outline: Check data type dropdown for "<Row>" and select "<Value>"
Given I go to page "/tx/0x4f7406f5565d875ce1a2ebb7c83f582e9795294ad57276eae3909b59537ab051"
Given I go to page "/tx/0x4dca9c536124e5e2b29af17d075c3e55d15f119acf5f3327c9fdb1a3ffeab427"
When I select "Logs" tab on "Transaction" page
When I click on datatype dropdown of "<Row>" row
When I click by text "<Value>"
Then Check the element contains text "<Value>"
Then Check the element have the exact text "<Value>"

Examples:
| Row | Value |
Expand All @@ -165,7 +163,7 @@ Feature: Main Page
When I select "Logs" tab on "Transaction" page
When I click on datatype dropdown of "<Row>" row
When I click by text "<Value>"
Then Check the element contains text "<Value>"
Then Check the element have the exact text "<Value>"

Examples:
| Row | Value |
Expand All @@ -189,15 +187,15 @@ Feature: Main Page

@id588 @testnet @testnetSmokeSuite
Scenario: Check Processed status component for Transaction page
Given I go to page "/tx/0x51cef3cdc8237635c6151b664c1925281766fabe2fa3d60e63f1369829c2f881"
Given I go to page "/tx/0x4dca9c536124e5e2b29af17d075c3e55d15f119acf5f3327c9fdb1a3ffeab427"
Then Verify the badge with "Processed" status is visible
Then Verify the badge with "Executed" status is visible
Then Element with "text" "Executed" should be "visible"
# Then Status component color with "Executed" status should be "green"

@id589 @testnet @testnetSmokeSuite
Scenario: Check Failed status component for Transaction page
Given I go to page "/tx/0xb556d6cd77cf37002c668156b0ea7a1c18050decc1c99a67d6aa3b214647d2ae"
Given I go to page "/tx/0xd5f436a8f6785ae6d4d21375c5f497e4d0350407582a584a867cd7e01efbbc15"
Then Verify the badge with "Failed" status is visible
Then Element with "text" "Failed" should be "visible"
# Then Status component color with "failed" status should be "red"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Feature: Redirection

@id242:I @testnet @testnetSmokeSuite
Scenario Outline: Verify redirection from Contracts page after "<Artifact type>" click
Given I go to page "/address/0xAB2e93b557ef5FD04ABc6f57De6a1D1DE18924c4"
Given I go to page "/address/0x000000000000000000000000000000000000800A"
When I click on the first "<Artifact type>" link
Given Page with part address "<url>" includes ID result

Expand Down Expand Up @@ -91,7 +91,7 @@ Feature: Redirection
#Transaction page 241 - navigation, 553 - redirection
@id241 @id553 @id339 @id340 @testnet @testnetSmokeSuite
Scenario Outline: Verify redirection from Transaction page after "<Artifact type>" click
Given I go to page "/tx/0x6fc015405255af17fb38f5a1408557f5f00d094e07a2f8f6af933a889d9a3330"
Given I go to page "/tx/0x095ba0e946b09767085c7ddfb0f9ff36fab230fc819b56d41185a3033de27bea"
When I click on the first "<Artifact type>" link
Given Page with part address "<url>" includes ID result

Expand Down Expand Up @@ -132,7 +132,7 @@ Feature: Redirection
| Fee | /address/ |


#Tokens page
#Tokens page
@id250 @testnetSmokeSuite
Scenario Outline: Verify redirection from Tokens page after "<Artifact type>" click
Given I go to page "/tokenlist/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Feature: Redirection

Examples:
| Block Number | Artifact type | url |
| 1003 | from address | /address/ |
| 1003 | to address | /address/ |
| 100 | from address | /address/ |
| 100 | to address | /address/ |

@id368:I @mainnet
Scenario: Verify redirection from Block page L1 addresses to etherscan after address click
Expand All @@ -25,8 +25,8 @@ Feature: Redirection

Examples:
| Block Number | Artifact type | url |
| 1003 | from address | /address/ |
| 1003 | to address | /address/ |
| 100 | from address | /address/ |
| 100 | to address | /address/ |

#Main Page - Transaction page
@id338 @testnetSmokeSuite
Expand All @@ -43,7 +43,7 @@ Feature: Redirection
#369 Contract page - Pages - Redirection
@id369 @testnet @testnetSmokeSuite
Scenario: Verify contract link on the Contacts page
Given I go to page "/address/0x0BfcE1D53451B4a8175DD94e6e029F7d8a701e9c"
Given I go to page "/address/0xed7175341f123f7718aBaCF1702d6980CFc08784"
When I click on the first "from address" link
Given Page with part address "/address/" includes ID result

Expand All @@ -65,7 +65,7 @@ Feature: Redirection
| /address/0x000000000000000000000000000000000000800A | zkSync Era Goerli Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli |
| /address/0x000000000000000000000000000000000000800A | Goerli (Stage2) | /address/0x000000000000000000000000000000000000800A/?network=goerli-beta |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Sepolia Testnet | /address/0x000000000000000000000000000000000000800A/?network=sepolia |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Sepolia Testnet | /address/0x000000000000000000000000000000000000800A/?network=sepolia |

@id561:I @id562:I @id563:I @productionEnv
Scenario Outline: Verify redirection to "<Network>" network
Expand All @@ -75,5 +75,6 @@ Feature: Redirection

Examples:
| Initial page | Network | url |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Goerli Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Sepolia Testnet | /address/0x000000000000000000000000000000000000800A/?network=sepolia |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Mainnet | /address/0x000000000000000000000000000000000000800A/?network=mainnet |
| /address/0x000000000000000000000000000000000000800A | zkSync Era Goerli Testnet | /address/0x000000000000000000000000000000000000800A/?network=goerli |
1 change: 1 addition & 0 deletions packages/app/tests/e2e/src/data/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export enum NetworkSwitcher {
zkSyncEraGoerli = "/?network=goerli",
goerliStage2 = "/?network=goerli-beta",
zkSyncEraMainnet = "/?network=mainnet",
zkSyncEraSepolia = "/?network=sepolia",
}

0 comments on commit bc75ffc

Please sign in to comment.