Skip to content

Commit

Permalink
fix: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemoya committed May 17, 2024
1 parent 397bbcc commit b86c18c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/tests/ui/desktop/e2e/account.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,18 @@ test('My Account tabs are displayed and clickable', async ({ page }) => {
await expect(page).toHaveURL('account/settings/');
await expect(page.getByRole('heading', { name: 'Account settings' })).toBeVisible();
});

test('Account dropdown is visible in header', async ({ page }) => {
await page.goto('/login/');
await page.getByLabel('Login').click();
await page.getByLabel('Email').fill(process.env.TEST_ACCOUNT_EMAIL || '');
await page.getByLabel('Password').fill(process.env.TEST_ACCOUNT_PASSWORD || '');
await page.getByRole('button', { name: 'Log in' }).click();
await page.getByRole('heading', { name: 'My Account' }).waitFor();

await page.goto('/');

await page.getByRole('link', { name: 'Account' }).hover();

await expect(page.getByText('Log out')).toBeInViewport();
});

0 comments on commit b86c18c

Please sign in to comment.