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
This commit is contained in:
18
packages/twenty-e2e-testing/tests/login.setup.ts
Normal file
18
packages/twenty-e2e-testing/tests/login.setup.ts
Normal file
@ -0,0 +1,18 @@
|
||||
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'),
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user