Skip to content

Commit

Permalink
E2e regression split (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
oldGreg5 authored and szymonmaslowski committed Jun 25, 2024
1 parent ff8dca2 commit ff2fbbf
Show file tree
Hide file tree
Showing 7 changed files with 321 additions and 7 deletions.
275 changes: 275 additions & 0 deletions .github/workflows/e2e-tests-linux-split.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,275 @@
name: E2E Tests Linux split

on:
push:
branches:
- 'release/**'
workflow_dispatch:
inputs:
browser:
description: 'Browser to use'
required: true
default: 'chrome'
type: choice
options:
- chrome
- edge
network:
type: choice
description: network to use
options:
- preprod
- mainnet
runner:
type: choice
required: true
default: 'self-hosted'
description: runner to use
options:
- self-hosted
- ubuntu-22.04
- ubuntu-20.04

run-name: "E2E | os: Linux | browser: ${{ github.event.inputs.browser || 'chrome' }} | network: ${{ github.event.inputs.network }} | #${{ github.run_number }}"

env:
BROWSER: ${{ github.event.inputs.browser || 'chrome' }}
NETWORK: ${{ github.event.inputs.network || 'preprod' }}
RUN: ${{ github.run_number }}
DISPLAY: ':99.0'
NODE_OPTIONS: --max-old-space-size=16384
BRANCH: ${{ github.ref_name }}

jobs:
prereq:
runs-on: "${{ inputs.runner }}"
if: ${{ inputs.runner == 'self-hosted' }}
steps:
- name: Deleting chrome tmp files
id: clean-chrome-tmp-files
run: |
runCommand="rm -rf /tmp/.org.chromium.*"
eval "$runCommand";
tests-run-part-1:
runs-on: "${{ inputs.runner }}"
if: always()
needs: prereq
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Decrypt test data
working-directory: ./packages/e2e-tests
run: ./decrypt_secret.sh
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
- name: Build dist version of Lace
uses: ./.github/shared/build
with:
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }}
- name: Start XVFB
run: |
Xvfb :99 &
- name: Execute E2E tests
id: e2e-tests
working-directory: ./packages/e2e-tests
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
TEST_DAPP_URL: ${{ secrets.TEST_DAPP_URL }}
ENV: ${{ env.NETWORK }}
run: |
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch1 --cucumberOpts.tags='@Testnet and not @Pending'"
eval "$runCommand";
- name: Save tests results
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-run-part-1-results
path: ./packages/e2e-tests/reports/allure/results

tests-run-part-2:
runs-on: "${{ inputs.runner }}"
if: always()
needs: prereq
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Decrypt test data
working-directory: ./packages/e2e-tests
run: ./decrypt_secret.sh
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
- name: Build dist version of Lace
uses: ./.github/shared/build
with:
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }}
- name: Start XVFB
run: |
Xvfb :99 &
- name: Execute E2E tests
id: e2e-tests
working-directory: ./packages/e2e-tests
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
TEST_DAPP_URL: ${{ secrets.TEST_DAPP_URL }}
ENV: ${{ env.NETWORK }}
run: |
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch2 --cucumberOpts.tags='@Testnet and not @Pending'"
eval "$runCommand";
- name: Save tests results
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-run-part-2-results
path: ./packages/e2e-tests/reports/allure/results

tests-run-part-3:
runs-on: "${{ inputs.runner }}"
if: always()
needs: prereq
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Decrypt test data
working-directory: ./packages/e2e-tests
run: ./decrypt_secret.sh
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
- name: Build dist version of Lace
uses: ./.github/shared/build
with:
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }}
- name: Start XVFB
run: |
Xvfb :99 &
- name: Execute E2E tests
id: e2e-tests
working-directory: ./packages/e2e-tests
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
TEST_DAPP_URL: ${{ secrets.TEST_DAPP_URL }}
ENV: ${{ env.NETWORK }}
run: |
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch3 --cucumberOpts.tags='@Testnet and not @Pending'"
eval "$runCommand";
- name: Save tests results
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-run-part-3-results
path: ./packages/e2e-tests/reports/allure/results

tests-run-part-4:
runs-on: "${{ inputs.runner }}"
if: always()
needs: prereq
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Decrypt test data
working-directory: ./packages/e2e-tests
run: ./decrypt_secret.sh
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
- name: Build dist version of Lace
uses: ./.github/shared/build
with:
LACE_EXTENSION_KEY: ${{ secrets.MANIFEST_PUBLIC_KEY }}
- name: Start XVFB
run: |
Xvfb :99 &
- name: Execute E2E tests
id: e2e-tests
working-directory: ./packages/e2e-tests
env:
WALLET_1_PASSWORD: ${{ secrets.WALLET_PASSWORD_TESTNET }}
TEST_DAPP_URL: ${{ secrets.TEST_DAPP_URL }}
ENV: ${{ env.NETWORK }}
run: |
runCommand="yarn wdio run wdio.conf.${BROWSER}.ts --suite batch4 --cucumberOpts.tags='@Testnet and not @Pending'"
eval "$runCommand";
- name: Save tests results
if: always()
uses: actions/upload-artifact@v4
with:
name: tests-run-part-4-results
path: ./packages/e2e-tests/reports/allure/results

results-processing:
needs: [tests-run-part-1, tests-run-part-2, tests-run-part-3, tests-run-part-4]
runs-on: "${{ inputs.runner }}"
if: always()
steps:
- name: Download reports from part 1
uses: actions/download-artifact@v4
with:
name: tests-run-part-1-results
path: ./tests-run-part-1-results
- name: Download reports from part 2
uses: actions/download-artifact@v4
with:
name: tests-run-part-2-results
path: ./tests-run-part-2-results
- name: Download reports from part 3
uses: actions/download-artifact@v4
with:
name: tests-run-part-3-results
path: ./tests-run-part-3-results
- name: Download reports from part 4
uses: actions/download-artifact@v4
with:
name: tests-run-part-4-results
path: ./tests-run-part-4-results
- name: Copy allure results
if: always()
run: |
mkdir -p ./allure/results
cp -r ./tests-run-part-1-results/* ./allure/results
cp -r ./tests-run-part-2-results/* ./allure/results
cp -r ./tests-run-part-3-results/* ./allure/results
cp -r ./tests-run-part-4-results/* ./allure/results
- name: Create allure properties
if: success()
working-directory: './allure/results'
run: |
echo "
branch=${BRANCH}
env=${NETWORK}
browser=${BROWSER}
platform=Linux
" > environment.properties
- name: Publish allure report to S3
uses: andrcuns/allure-publish-action@v2.6.0
env:
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.E2E_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.E2E_AWS_SECRET_ACCESS_KEY }}
with:
storageType: s3
resultsGlob: './allure/results'
bucket: lace-e2e-test-results
prefix: 'all/linux/${BROWSER}/${RUN}'
copyLatest: true
ignoreMissingResults: true
baseUrl: 'https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}'
- name: Add link to summary
run: |
echo "TEST RESULTS:"
echo "https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}/all/linux/${{ env.BROWSER }}/${{ env.RUN }}/index.html | browser: ${{ env.BROWSER }} | network: ${{ env.NETWORK }} | platform: linux" >> $GITHUB_STEP_SUMMARY
- name: Publish artifacts (logs, reports, screenshots)
uses: actions/upload-artifact@v4
with:
name: test-artifacts
path: |
./allure
retention-days: 10
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2.3.0
if: success()
env:
SLACK_COLOR: "${{ contains(needs.*.result, 'failure') && 'failure' || 'good' }}"
SLACK_ICON_EMOJI: ':lace:'
SLACK_MESSAGE: 'https://${{ secrets.E2E_REPORTS_USER }}:${{ secrets.E2E_REPORTS_PASSWORD }}@${{ secrets.E2E_REPORTS_URL }}/all/linux/${{ env.BROWSER }}/${{ env.RUN }}/index.html | browser: ${{ env.BROWSER }} | network: ${{ env.NETWORK }} | platform: linux'
SLACK_TITLE: 'Test automation results :rocket:'
SLACK_USERNAME: lace-qa-bot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
3 changes: 0 additions & 3 deletions .github/workflows/e2e-tests-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: E2E Tests Linux
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- 'release/**'
workflow_dispatch:
inputs:
tags:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,4 @@ Feature: NFT - Folders - Extended view
And I left click on the NFT folder with name "SampleFolder"
And I see "SampleFolder" NFT folder page in extended mode
When I click NFT with name "Ibilecoin"
Then I see NFTs Folder path: "Root/SampleFolder"
Then I see NFTs Folder path: "Root/SampleFolder"
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ Feature: NFT - Folders - Popup view
And I left click on the NFT folder with name "SampleFolder"
And I see "SampleFolder" NFT folder page in popup mode
When I click NFT with name "Ibilecoin"
Then I see NFTs Folder path: "Root/SampleFolder"
Then I see NFTs Folder path: "Root/SampleFolder"
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Analytics - Posthog - Address book - Extended view
And I click "Save address" button on "Add new address" drawer
Then I validate latest analytics single event "address book | add new address | save address | click"
And I validate that 2 analytics event(s) have been sent


@LW-8675
Scenario: Analytics - Extended-view - Address Book - Add new address and Cancel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@Settings-Extended @Analytics
@Settings-Extended @Analytics @Testnet
Feature: Analytics - Settings Toggle - Extended View

Background:
Expand Down
42 changes: 42 additions & 0 deletions packages/e2e-tests/wdio.conf.base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,48 @@ import extensionUtils from './src/utils/utils';
export const config: WebdriverIO.Config = {
runner: 'local',
specs: ['./src/features/**/*.feature'],
suites: {
batch1: [
'./src/features/governance/CIP95StaticMethods.feature',
'./src/features/MultiDelegationPageExtended*.feature',
'./src/features/Onboarding*.feature',
'./src/features/SendTransactionSimpleExtended*.feature',
'./src/features/SendTransactionSimplePopup*.feature',
'./src/features/SettingsPageExtended.feature'
],
batch2: ['./src/features/analytics/Analytics*.feature', './src/features/e2e/*.feature'],
batch3: [
'./src/features/AddressBookExtended.feature',
'./src/features/AddressBookPopup.feature',
'./src/features/Collateral*.feature',
'./src/features/NFTsFolders*.feature',
'./src/features/SendTransactionBundlesExtended.feature',
'./src/features/Transactions*.feature'
],
batch4: [
'./src/features/AdaHandle*.feature',
'./src/features/DAppConnector*.feature',
'./src/features/EmptyStates*.feature',
'./src/features/FiatOnRampOffRampBanxa*.feature',
'./src/features/ForgotPassword.feature',
'./src/features/FullExperiencePopup.feature',
'./src/features/HdWalletExtended.feature',
'./src/features/LockWallet*.feature',
'./src/features/MultidelegationDelegatedFunds*.feature',
'./src/features/MultiDelegationPagePopup.feature',
'./src/features/Navigation*.feature',
'./src/features/NetworkSwitching*.feature',
'./src/features/NFTsExtended.feature',
'./src/features/NFTsPopup.feature',
'./src/features/OwnTags*.feature',
'./src/features/SendTransactionMetadata*.feature',
'./src/features/SendTransactionMultipleSelection*.feature',
'./src/features/SettingsPagePopup.feature',
'./src/features/TokensPage*.feature',
'./src/features/Trezor/Trezor.feature',
'./src/features/WalletAccounts*.feature'
]
},
automationProtocol: 'webdriver',
exclude: [],
maxInstances: 1,
Expand Down

0 comments on commit ff2fbbf

Please sign in to comment.