Skip to content

Commit

Permalink
Mark test as slow
Browse files Browse the repository at this point in the history
  • Loading branch information
benmalcom committed Aug 3, 2024
1 parent b565e2b commit 2672dab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ class AuthCallBackPage {
}

// eslint-disable-next-line class-methods-use-this
async handleInPageAccountCreation(email: string, page: Page) {
await expect(page.getByText('Oops! This account doesn\'t seem to exist. Please create one below.')).toBeVisible();
await expect(page.locator('[data-testid="email_create"]')).toHaveValue(email);
await expect(page.locator('[data-testid="username_create"]')).toHaveValue(getEmailId(email));
await page.waitForSelector('button:has-text("Continue"):enabled');
await page.click('button:has-text("Continue")');
await expect(page.getByText('Loading...')).toBeVisible({ timeout: TIMEOUT });
await expect(page.getByText('Loading...')).not.toBeVisible({ timeout: TIMEOUT });
await expect(page.getByText('Redirecting to app...')).toBeVisible({ timeout: TIMEOUT });
async handleInPageAccountCreation(email: string) {
await expect(this.page.getByText('Oops! This account doesn\'t seem to exist. Please create one below.')).toBeVisible();
await expect(this.page.locator('[data-testid="email_create"]')).toHaveValue(email);
await expect(this.page.locator('[data-testid="username_create"]')).toHaveValue(getEmailId(email));
await this.page.waitForSelector('button:has-text("Continue"):enabled');
await this.page.click('button:has-text("Continue")');
await expect(this.page.getByText('Loading...')).toBeVisible({ timeout: TIMEOUT });
await expect(this.page.getByText('Loading...')).not.toBeVisible({ timeout: TIMEOUT });
await expect(this.page.getByText('Redirecting to app...')).toBeVisible({ timeout: TIMEOUT });
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/near-fast-auth-signer-e2e-tests/tests/auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ test('should create account and login with passkeys', async ({ page }) => {
});

test('should create account if logged in with an unregistered account details ', async ({ page }) => {
test.slow();
const pm = new PageManager(page);
test.setTimeout(240000);
const readUIDLs = [];
const { email } = getRandomEmailAndAccountId();

Expand All @@ -89,6 +89,6 @@ test('should create account if logged in with an unregistered account details ',
creationKeypair: KeyPair.fromRandom('ED25519'),
retrievalKeypair: KeyPair.fromRandom('ED25519'),
});
await pm.getAuthCallBackPage().handleInPageAccountCreation(email, page);
await pm.getAuthCallBackPage().handleInPageAccountCreation(email);
await pm.getAppPage().isLoggedIn();
});

0 comments on commit 2672dab

Please sign in to comment.