Files
twenty/packages/twenty-e2e-testing/tests/login.setup.ts
BOHEUS b1fbf4b683 E2E tests (#6717)
Continuation of #6644 

Now chromium browser is used in workspaces tests instead of firefox and
screenshots after each test are properly saved in one folder when run
from IDE and from terminal using `yarn test:e2e` command
2024-08-27 11:07:10 +02:00

19 lines
733 B
TypeScript

import { test as setup, expect } from '@playwright/test';
import path from 'path';
setup('Login test', async ({ page }) => {
await page.goto('/');
await page.getByRole('button', { name: 'Continue With Email' }).click();
await page.getByPlaceholder('Email').fill(process.env.DEFAULT_LOGIN);
await page.getByRole('button', { name: 'Continue', exact: true }).click();
await page.getByPlaceholder('Password').fill(process.env.DEFAULT_PASSWORD);
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByText('Welcome to Twenty')).not.toBeVisible();
// End of authentication steps.
await page.context().storageState({
path: path.resolve(__dirname, '..', '.auth', 'user.json'),
});
});