Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: import_key() MM refactor #170

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: npx playwright install --with-deps

- name: Run wallets tests
run: xvfb-run --auto-servernum -- yarn test:widgets
run: xvfb-run --auto-servernum -- yarn test:widgets --repeat-each 15
working-directory: wallets-testing
env:
RPC_URL: ${{ secrets.RPC_URL }}
Expand Down
8 changes: 3 additions & 5 deletions packages/wallets/src/metamask/metamask.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class MetamaskPage implements WalletPage {
.waitFor({ state: 'visible' });
await this.unlock();
if (await this.networkDisplay.isVisible()) {
console.log('da visible');
await this.closePopover();
}
});
Expand Down Expand Up @@ -253,11 +254,8 @@ export class MetamaskPage implements WalletPage {
await test.step('Import key', async () => {
if (!this.page) throw "Page isn't ready";
await this.navigate();
// Remove me when MM to be more stable
do {
await this.page.reload();
await this.closePopover();
} while (!(await this.page.getByTestId('account-menu-icon').isVisible()));
await this.closePopover();

await this.page.click('data-testid=account-menu-icon');
await this.page.click('text=Add account or hardware wallet');
await this.page.click('text=Import account');
Expand Down
2 changes: 1 addition & 1 deletion wallets-testing/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const config: PlaywrightTestConfig = {
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
// forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
Expand Down
2 changes: 1 addition & 1 deletion wallets-testing/test/widgets/ethereum.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test.describe('Ethereum', () => {
browserService = moduleFixture.get<BrowserService>(BrowserService);
});

test(`Metamask stake`, async () => {
test.only(`Metamask stake`, async () => {
await browserService.setupWithNode(
METAMASK_COMMON_CONFIG,
ETHEREUM_WIDGET_CONFIG,
Expand Down
Loading