-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(e2e): Migrated address metadata test + refactoring (#16298)
- Loading branch information
1 parent
f2e4046
commit a405e89
Showing
6 changed files
with
119 additions
and
75 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
7 changes: 7 additions & 0 deletions
7
packages/suite-desktop-core/e2e/support/enums/accountLabelId.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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export enum AccountLabelId { | ||
BitcoinDefault1 = "m/84'/0'/0'", | ||
BitcoinDefault2 = "m/84'/0'/1'", | ||
BitcoinDefault3 = "m/84'/0'/2'", | ||
BitcoinSegwit1 = "m/49'/0'/0'", | ||
BitcoinSegwit2 = "m/49'/0'/1'", | ||
} |
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
49 changes: 49 additions & 0 deletions
49
packages/suite-desktop-core/e2e/tests/metadata/address-metadata.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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { test, expect } from '../../support/fixtures'; | ||
import { MetadataProvider } from '../../support/metadataProviderMocks'; | ||
|
||
const metadataEl = '@metadata/addressLabel/bc1q7e6qu5smalrpgqrx9k2gnf0hgjyref5p36ru2m'; | ||
|
||
test.describe('Metadata - address labeling', { tag: ['@group=metadata', '@webOnly'] }, () => { | ||
test.use({ | ||
emulatorStartConf: { wipe: true }, | ||
emulatorSetupConf: { mnemonic: 'mnemonic_all' }, | ||
}); | ||
|
||
test.beforeEach(async ({ metadataProviderMocks }) => { | ||
await metadataProviderMocks.initializeProviderMocking(MetadataProvider.GOOGLE); | ||
}); | ||
test('google provider', async ({ page, onboardingPage, metadataPage, dashboardPage }) => { | ||
// Pass through onboarding and device authentication | ||
await onboardingPage.completeOnboarding(); | ||
|
||
// Finish discovery process | ||
// Discovery process completed | ||
await dashboardPage.discoveryShouldFinish(); | ||
await expect(page.getByTestId('@account-menu/btc/normal/0')).toBeVisible(); | ||
|
||
// Interact with accounts and metadata | ||
await page.getByTestId('@account-menu/btc/normal/0').click(); | ||
await page.getByTestId('@wallet/menu/wallet-receive').click(); | ||
await page.getByTestId('@wallet/receive/used-address/show-more').click(); | ||
await page.getByTestId(`${metadataEl}/add-label-button`).click(); | ||
|
||
// Initialize metadata flow | ||
// Metadata provider: google | ||
metadataPage.passThroughInitMetadata(MetadataProvider.GOOGLE); | ||
|
||
await metadataPage.metadataInput.fill('meow address'); | ||
await page.keyboard.press('Enter'); | ||
await expect(page.getByTestId(metadataEl)).toHaveText('meow address'); | ||
|
||
// Edit metadata label | ||
await page.getByTestId(metadataEl).hover(); | ||
await page.getByTestId(`${metadataEl}/edit-label-button`).click(); | ||
await metadataPage.metadataInput.fill('meow meow'); | ||
await page.keyboard.press('Enter'); | ||
await expect(page.getByTestId(metadataEl)).toHaveText('meow meow'); | ||
}); | ||
|
||
test.afterEach(({ metadataProviderMocks }) => { | ||
metadataProviderMocks.stopProviderMocking(); | ||
}); | ||
}); |
42 changes: 0 additions & 42 deletions
42
packages/suite-web/e2e/tests/metadata/address-metadata.test.ts
This file was deleted.
Oops, something went wrong.