mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 20:22:15 +01:00
playwright (#3)
* add playwright setup and tests for auth, profile and organization settings * add playwright github action * add sqlite database * fix playwright base url * add mailpit and parallelization * remove additional waitForUrl in fixture * fix tests * remove waitforurl in tests * change playwright github action to only one worker * try promiso all to avoid loading errors * change environment to include http protocol * convert back to simpler structure * add caching of playwright browser binaries * test if playwright in ci works faster with multiple workers * change back to one worker * remove browser binary caching * try using playwright container to speedup browser setup * rollback image changes * add playwright gitignore changes --------- Co-authored-by: Gregor Vostrak <gregorvostrak@Gregors-MacBook-Pro.local>
This commit is contained in:
21
e2e/profile.spec.ts
Normal file
21
e2e/profile.spec.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { test, expect } from '../playwright/fixtures';
|
||||
import { PLAYWRIGHT_BASE_URL } from '../playwright/config';
|
||||
|
||||
test('test that user name can be updated', async ({ page }) => {
|
||||
await page.goto(PLAYWRIGHT_BASE_URL + '/user/profile');
|
||||
await page.getByLabel('Name').fill('NEW NAME');
|
||||
await page.getByRole('button', { name: 'Save' }).first().click();
|
||||
await page.reload();
|
||||
await expect(page.getByLabel('Name')).toHaveValue('NEW NAME');
|
||||
});
|
||||
|
||||
test('test that user email can be updated', async ({ page }) => {
|
||||
await page.goto(PLAYWRIGHT_BASE_URL + '/user/profile');
|
||||
const emailId = Math.round(Math.random() * 10000);
|
||||
await page.getByLabel('Email').fill(`newemail+${emailId}@test.com`);
|
||||
await page.getByRole('button', { name: 'Save' }).first().click();
|
||||
await page.reload();
|
||||
await expect(page.getByLabel('Email')).toHaveValue(
|
||||
`newemail+${emailId}@test.com`
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user