-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf1c92f
commit e01b9a4
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { test, expect } from '@playwright/test'; | ||
|
||
test('test signup and login', async ({ page }) => { | ||
const email = 'test_' + Date.now() + '@test.com'; | ||
|
||
await page.goto('/signup'); | ||
await page.getByPlaceholder('Deine E-mail-Adresse').click(); | ||
await page.getByPlaceholder('Deine E-mail-Adresse').fill(email); | ||
await page.getByPlaceholder('Deine E-mail-Adresse').press('Tab'); | ||
await page.getByPlaceholder('Vergib ein Passwort').fill('test123'); | ||
await page.getByPlaceholder('Vergib ein Passwort').press('Tab'); | ||
await page.getByPlaceholder('Gib dein neues Passwort noch').fill('test123'); | ||
await page.getByPlaceholder('Gib dein neues Passwort noch').press('Tab'); | ||
await page.getByPlaceholder('Deine Name').fill('Test Name'); | ||
await page.getByPlaceholder('Deine Name').press('Tab'); | ||
await page.getByPlaceholder('Dein Nachname').fill('Test Nachname'); | ||
await page.getByPlaceholder('Dein Nachname').press('Tab'); | ||
await page.getByPlaceholder('Der Benutzername wird in der').fill('test_test'); | ||
await page.getByPlaceholder('Der Benutzername wird in der').press('Tab'); | ||
await page.getByLabel('Standort').selectOption('Langenfeld'); | ||
await page.getByLabel('Gewinner', { exact: true }).selectOption('DEU'); | ||
await page.getByLabel('Geheimen Gewinner').selectOption('POL'); | ||
await page.getByRole('button', { name: 'Registrieren' }).click(); | ||
await page.getByPlaceholder('Deine E-mail-Adresse').click(); | ||
|
||
await expect(page.getByText('Du bist erfolgreich')).toBeVisible(); | ||
await page.getByPlaceholder('Deine E-mail-Adresse').click(); | ||
await page.getByPlaceholder('Deine E-mail-Adresse').fill(email); | ||
|
||
await page.getByPlaceholder('Passwort').click(); | ||
await page.getByPlaceholder('Passwort').fill('test123'); | ||
|
||
await page.getByRole('button', { name: 'Anmelden' }).click(); | ||
await expect(page.getByRole('heading', { name: 'Spielplan' })).toBeVisible(); | ||
}); |