Skip to content

Commit

Permalink
test: switching back to node bridge, simplifying app build proces
Browse files Browse the repository at this point in the history
  • Loading branch information
andrcj committed May 20, 2024
1 parent 95d8120 commit ed5a84d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 80 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/test-suite-desktop-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,11 @@ jobs:
run: |
yarn install --immutable
yarn message-system-sign-config
yarn workspace @trezor/suite-data build:lib
yarn workspace @trezor/connect-iframe build:lib
yarn workspace @trezor/transport-bridge build:lib
- name: Build linux suite-desktop
- name: Build app.js for tests
run: |
yarn workspace @trezor/suite-desktop build:linux
bash packages/suite-desktop-core/scripts/gnupg-sign.sh
mv packages/suite-desktop/build-electron/* .
yarn workspace @trezor/suite-desktop build:app
yarn workspace @trezor/suite-desktop build:ui
- name: Run e2e desktop tests
env:
Expand Down
51 changes: 0 additions & 51 deletions ci/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,57 +5,6 @@
- schedules
- /^release\//

# @trezor/suite-desktop
# .e2e desktop:
# stage: integration testing
# retry: 1
# dependencies:
# - install
# variables:
# COMPOSE_PROJECT_NAME: $CI_JOB_ID # for unique containers
# COMPOSE_FILE: ./docker/docker-compose.suite-desktop-ci.yml
# TEST_FILE: $TEST_FILE
# before_script:
# - docker login $CI_DEPENDENCY_PROXY_SERVER -u $CI_DEPENDENCY_PROXY_USER -p $CI_DEPENDENCY_PROXY_PASSWORD
# script:
# - yarn install --immutable
# # 3 next steps could be removed if we passed packages/suite-desktop/dist and build folder as an artifact
# # but since this is run only in nightly builds it can be probably built inside the job for now..
# - yarn message-system-sign-config
# - yarn workspace @trezor/suite-desktop build:linux
# - docker-compose pull
# - docker-compose up -d ${CONTAINERS}
# - docker-compose run test-run
# after_script:
# - docker-compose down
# - docker network prune -f
# artifacts:
# expire_in: 7 days
# when: always
# paths:
# - "**/test-results/**"
# interruptible: true
# parallel:
# matrix:
# - TEST_FILE: ["spawn-tor", "spawn-bridge", "suite-guide", "wallet-discovery"]
# CONTAINERS: "trezor-user-env-unix"
# - TEST_FILE: ["electrum"]
# CONTAINERS: "trezor-user-env-unix electrum-regtest"
# # commented out. coinjoin test is not adapted to current state of this feature
# # - TEST_FILE: ["coinjoin"]
# # CONTAINERS: "trezor-user-env-unix coinjoin-backend"

# suite desktop:
# extends: .e2e desktop
# only:
# <<: *run_everything_rules

# suite desktop manual:
# extends: .e2e desktop
# except:
# <<: *run_everything_rules
# when: manual

.connect-popup legacy npm package base:
stage: integration testing
retry: 0
Expand Down
4 changes: 2 additions & 2 deletions packages/suite-desktop-core/e2e/support/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export const launchSuite = async () => {
args: [
path.join(appDir, './dist/app.js'),
`--log-level=${desiredLogLevel}`,
// '--bridge-node-test',
'--bridge-node-test',
// uncomment to use legacy bridge
'--bridge-legacy-test',
// '--bridge-legacy-test',
],
// when testing electron, video needs to be setup like this. it works locally but not in docker
// recordVideo: { dir: 'test-results' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,8 @@ import { waitForDataTestSelector } from '../common';
class DashboardActions {
async passThroughInitialRun(window: Page) {
await waitForDataTestSelector(window, '@welcome/title');
await window.screenshot({
path: './test-results/zacatek-initial-runu.png',
fullPage: true,
type: 'png',
});
await window.getByTestId('@analytics/continue-button').click();
await window.screenshot({
path: './test-results/po-continue-runu.png',
fullPage: true,
type: 'png',
});
await window.getByTestId('@onboarding/exit-app-button').click();
await window.screenshot({
path: './test-results/po-exitu-runu.png',
fullPage: true,
type: 'png',
});
}

async discoveryShouldFinish(window: Page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ class SettingsActions {
}

async joinEarlyAccessProgram(window: Page) {
await window.screenshot({
path: './test-results/settings.png',
fullPage: true,
type: 'png',
});
await window.getByTestId('@settings/early-access-join-button').scrollIntoViewIfNeeded();
await window.getByTestId('@settings/early-access-join-button').click();
const eapModal = window.getByTestId('@modal');
Expand Down

0 comments on commit ed5a84d

Please sign in to comment.