Playwright tests - stage 1 - login with email and password test (#8988)

Scenario:
https://github.com/twentyhq/twenty/issues/8469#issuecomment-2471420099

To launch this test, `yarn playwright test --project Authentication`
must be used in `packages/twenty-e2e-testing` directory (for some reason
when launching this test from IDE, be Webstorm or VSCode, it won't fetch
the data from .env)
This commit is contained in:
BOHEUS
2024-12-12 10:05:25 +00:00
committed by GitHub
parent bce5be85a3
commit 182ebb6394
4 changed files with 25 additions and 4 deletions

View File

@ -0,0 +1,17 @@
import { test as base, expect } from '../../lib/fixtures/screenshot';
import { LoginPage } from '../../lib/pom/loginPage';
// fixture
const test = base.extend<{ loginPage: LoginPage }>({
loginPage: async ({ page }, use) => {
await use(new LoginPage(page));
},
});
test('Check login with email', async ({ loginPage }) => {
await loginPage.typeEmail(process.env.DEFAULT_LOGIN);
await loginPage.clickContinueButton();
await loginPage.typePassword(process.env.DEFAULT_PASSWORD);
await loginPage.clickSignInButton();
await expect(loginPage.signInButton).not.toBeVisible();
});