-
-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(e2e): Debuging PW web tests on CI
- Loading branch information
Showing
7 changed files
with
115 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: "3.9" | ||
services: | ||
trezor-user-env-unix: | ||
image: ghcr.io/trezor/trezor-user-env:c637c2f58e799284f6019481fa0de30457bd6b60 | ||
environment: | ||
- SDL_VIDEODRIVER=dummy | ||
- XDG_RUNTIME_DIR=/var/tmp | ||
network_mode: host | ||
bitcoin-regtest: | ||
image: ghcr.io/trezor/trezor-user-env-regtest # this is a special image that runs regtest and blockbook | ||
depends_on: | ||
- trezor-user-env-unix | ||
network_mode: service:trezor-user-env-unix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,38 @@ | ||
version: "4.0" | ||
version: "3.9" | ||
services: | ||
trezor-user-env-unix: | ||
image: ghcr.io/trezor/trezor-user-env:c637c2f58e799284f6019481fa0de30457bd6b60 | ||
environment: | ||
- SDL_VIDEODRIVER=dummy | ||
- XDG_RUNTIME_DIR=/var/tmp | ||
ports: | ||
- "9001:9001" | ||
- "21325:21325" | ||
- "21326:21326" | ||
|
||
network_mode: bridge # this makes docker reuse existing networks | ||
test-run: | ||
image: cypress/included:13.6.4 | ||
entrypoint: [] | ||
environment: | ||
- CYPRESS_SNAPSHOT=$CYPRESS_SNAPSHOT | ||
- CYPRESS_updateSnapshots=$CYPRESS_updateSnapshots | ||
- CYPRESS_baseUrl=$CYPRESS_baseUrl | ||
- CYPRESS_ASSET_PREFIX=$CYPRESS_ASSET_PREFIX | ||
- CYPRESS_TEST_URLS=$CYPRESS_TEST_URLS | ||
- CYPRESS_USE_TREZOR_USER_ENV_BRIDGE=$CYPRESS_USE_TREZOR_USER_ENV_BRIDGE | ||
- LOCAL_USER_ID=$LOCAL_USER_ID | ||
- TEST_GROUP=$TEST_GROUP | ||
- TRACK_SUITE_URL=$TRACK_SUITE_URL | ||
- ALLOW_RETRY=$ALLOW_RETRY | ||
- CI_JOB_URL=$CI_JOB_URL | ||
- CI_JOB_ID=$CI_JOB_ID | ||
- CI_COMMIT_BRANCH=$CI_COMMIT_BRANCH | ||
- CI_COMMIT_MESSAGE=$CI_COMMIT_MESSAGE | ||
- CI_COMMIT_SHA=$CI_COMMIT_SHA | ||
- FIRMWARE=$FIRMWARE | ||
network_mode: service:trezor-user-env-unix | ||
working_dir: /trezor-suite | ||
command: bash -c "cd packages/suite-web && yarn tsx ./e2e/run_tests.ts --group=$TEST_GROUP" | ||
volumes: | ||
- ../:/trezor-suite | ||
bitcoin-regtest: | ||
image: ghcr.io/trezor/trezor-user-env-regtest # this is a special image that runs regtest and blockbook | ||
depends_on: | ||
- trezor-user-env-unix | ||
ports: | ||
- "50001:50001" | ||
network_mode: service:trezor-user-env-unix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 31 additions & 29 deletions
60
packages/suite-desktop-core/e2e/tests/general/suite-guide.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,36 @@ | ||
import { test, expect } from '../../support/fixtures'; | ||
|
||
test.use({ startEmulator: false }); | ||
/** | ||
* Test case: | ||
* 1. Go to Bug section in Suite Guide | ||
* 2. Select Dashboard | ||
* 3. Write into feedback field | ||
* 4. Submit bug report (reporttext) | ||
*/ | ||
test('Send a bug report', async ({ suiteGuidePage }) => { | ||
await suiteGuidePage.openPanel(); | ||
await suiteGuidePage.supportAndFeedbackButton.click(); | ||
await suiteGuidePage.sendBugReport({ | ||
location: 'account', | ||
report: 'Henlo this is testy test writing hangry test user report', | ||
test.describe('Suite Guide', { tag: '@suite' }, () => { | ||
test.use({ startEmulator: false }); | ||
/** | ||
* Test case: | ||
* 1. Go to Bug section in Suite Guide | ||
* 2. Select Dashboard | ||
* 3. Write into feedback field | ||
* 4. Submit bug report (reporttext) | ||
*/ | ||
test('Send a bug report', async ({ suiteGuidePage }) => { | ||
await suiteGuidePage.openPanel(); | ||
await suiteGuidePage.supportAndFeedbackButton.click(); | ||
await suiteGuidePage.sendBugReport({ | ||
location: 'account', | ||
report: 'Henlo this is testy test writing hangry test user report', | ||
}); | ||
await expect(suiteGuidePage.feedbackSuccessToast).toBeVisible(); | ||
await suiteGuidePage.closeGuide(); | ||
}); | ||
await expect(suiteGuidePage.feedbackSuccessToast).toBeVisible(); | ||
await suiteGuidePage.closeGuide(); | ||
}); | ||
|
||
/** | ||
* Test case: | ||
* 1. Go to Suggestion section in Suite Guide | ||
* 2. Look up an article | ||
* 3. Verify that the article is displayed | ||
*/ | ||
test('Look up an article', async ({ suiteGuidePage }) => { | ||
const article = 'Install firmware'; | ||
await suiteGuidePage.openPanel(); | ||
await suiteGuidePage.lookupArticle(article); | ||
await expect(suiteGuidePage.articleHeader).toHaveText(article); | ||
await suiteGuidePage.closeGuide(); | ||
/** | ||
* Test case: | ||
* 1. Go to Suggestion section in Suite Guide | ||
* 2. Look up an article | ||
* 3. Verify that the article is displayed | ||
*/ | ||
test('Look up an article', async ({ suiteGuidePage }) => { | ||
const article = 'Install firmware'; | ||
await suiteGuidePage.openPanel(); | ||
await suiteGuidePage.lookupArticle(article); | ||
await expect(suiteGuidePage.articleHeader).toHaveText(article); | ||
await suiteGuidePage.closeGuide(); | ||
}); | ||
}); |