-
-
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
99 additions
and
91 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 |
---|---|---|
@@ -1,19 +1,13 @@ | ||
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: 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 | ||
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
60 changes: 33 additions & 27 deletions
60
packages/suite-desktop-core/e2e/tests/general/cardano-discovery.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,35 +1,41 @@ | ||
import { test, expect } from '../../support/fixtures'; | ||
|
||
test.use({ | ||
emulatorConf: { | ||
needs_backup: true, | ||
mnemonic: | ||
'cloth trim improve bag pigeon party wave mechanic beyond clean cake maze protect left assist carry guitar bridge nest faith critic excuse tooth dutch', | ||
}, | ||
}); | ||
test.describe('Cardano discovery', { tag: ['@group=wallet'] }, () => { | ||
test.use({ | ||
emulatorConf: { | ||
needs_backup: true, | ||
mnemonic: | ||
'cloth trim improve bag pigeon party wave mechanic beyond clean cake maze protect left assist carry guitar bridge nest faith critic excuse tooth dutch', | ||
}, | ||
}); | ||
|
||
test.beforeEach(async ({ onboardingPage, dashboardPage }) => { | ||
await onboardingPage.completeOnboarding(); | ||
await dashboardPage.discoveryShouldFinish(); | ||
}); | ||
test.beforeEach(async ({ onboardingPage, dashboardPage }) => { | ||
await onboardingPage.completeOnboarding(); | ||
await dashboardPage.discoveryShouldFinish(); | ||
}); | ||
|
||
/** | ||
* Test case: | ||
* 1. Enable cardano and wait for discovery to finish | ||
* 2. Check that all types of Cardano accounts are discovered | ||
* 3. Check that Staking section is available | ||
*/ | ||
test('Discover all Cardano account types', async ({ dashboardPage, settingsPage, walletPage }) => { | ||
await settingsPage.navigateTo(); | ||
await settingsPage.coinsTabButton.click(); | ||
await settingsPage.enableCoin('ada'); | ||
await settingsPage.disableCoin('btc'); | ||
/** | ||
* Test case: | ||
* 1. Enable cardano and wait for discovery to finish | ||
* 2. Check that all types of Cardano accounts are discovered | ||
* 3. Check that Staking section is available | ||
*/ | ||
test('Discover all Cardano account types', async ({ | ||
dashboardPage, | ||
settingsPage, | ||
walletPage, | ||
}) => { | ||
await settingsPage.navigateTo(); | ||
await settingsPage.coinsTabButton.click(); | ||
await settingsPage.enableCoin('ada'); | ||
await settingsPage.disableCoin('btc'); | ||
|
||
await dashboardPage.navigateTo(); | ||
await dashboardPage.discoveryShouldFinish(); | ||
await dashboardPage.navigateTo(); | ||
await dashboardPage.discoveryShouldFinish(); | ||
|
||
await walletPage.expandAllAccountsInMenu(); | ||
await walletPage.checkStakesOfCardanoAccounts(); | ||
await walletPage.expandAllAccountsInMenu(); | ||
await walletPage.checkStakesOfCardanoAccounts(); | ||
|
||
expect(await walletPage.getAccountsCount('ada')).toEqual(3); | ||
expect(await walletPage.getAccountsCount('ada')).toEqual(3); | ||
}); | ||
}); |
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(); | ||
}); | ||
}); |