Compare commits
1 commit
ae22692f80
...
e828efdfa7
Author | SHA1 | Date | |
---|---|---|---|
e828efdfa7 |
1 changed files with 27 additions and 0 deletions
|
@ -7,3 +7,30 @@ test('home page loads correctly', async ({ page }) => {
|
|||
await expect(page.getByRole('heading', { name: 'Willkommensbonus' })).toBeVisible();
|
||||
await expect(page.getByText('von bis zu €')).toBeVisible();
|
||||
});
|
||||
|
||||
test('registration popup should open and close', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.getByRole('button', { name: 'Registrieren' }).click();
|
||||
|
||||
await expect(page.getByText('Konto erstellenE-')).toBeVisible();
|
||||
|
||||
await page.getByRole('button', { name: 'Dialog schließen' }).click();
|
||||
|
||||
await expect(page.getByText('Konto erstellenE-')).not.toBeVisible();
|
||||
});
|
||||
|
||||
test('registration should work', async ({ page }) => {
|
||||
await page.goto('/');
|
||||
await page.getByRole('button', { name: 'Registrieren' }).click();
|
||||
|
||||
await page.getByRole('textbox', { name: 'E-Mail' }).fill('test@kjan.email');
|
||||
await page.getByRole('textbox', { name: 'Benutzername' }).fill('test-playwright');
|
||||
await page.getByRole('textbox', { name: 'Passwort' }).fill('BananaMan123');
|
||||
await page.locator('form').getByRole('button', { name: 'Registrieren' }).click();
|
||||
await page.getByRole('button', { name: 'Dialog schließen' }).click();
|
||||
await page.getByRole('navigation').getByRole('button', { name: 'Anmelden' }).click();
|
||||
await page.getByRole('textbox', { name: 'Benutzername oder E-Mail' }).fill('test@kjan.email');
|
||||
await page.getByRole('textbox', { name: 'Passwort' }).fill('BananaMan123');
|
||||
await page.locator('form').getByRole('button', { name: 'Anmelden' }).click();
|
||||
await expect(page.getByText('Email not verified')).toBeVisible();
|
||||
});
|
||||
|
|
Reference in a new issue