Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ost-ptk committed Nov 15, 2023
1 parent ed3346b commit b3a6f31
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions e2e-tests/popup/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,33 @@ import { test } from '../fixtures';
import { vaultPassword } from '../common';

test('test', async ({ extensionId, context, page }) => {
const importAccountPage = await context.newPage();
await importAccountPage.goto(
`chrome-extension://${extensionId}/import-account-with-file.html`
);

await test
.expect(
importAccountPage.getByRole('heading', {
name: 'Import account from secret key file'
})
)
.toBeVisible();
await page.goto(`chrome-extension://${extensionId}/popup.html`);

await page.getByPlaceholder('Password', { exact: true }).fill(vaultPassword);
await page.getByRole('button', { name: 'Unlock wallet' }).click();

await page.getByTestId('menu-open-icon').click();

const [importAccountPage] = await Promise.all([
const [importAccountPage2] = await Promise.all([
context.waitForEvent('page'),
await page.getByText('Import account').click()
]);

await test
.expect(
importAccountPage.getByRole('heading', {
importAccountPage2.getByRole('heading', {
name: 'Import account from secret key file'
})
)
Expand Down

0 comments on commit b3a6f31

Please sign in to comment.