Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hsc-nue committed Sep 29, 2023
1 parent d899f5b commit 876232a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 40 deletions.
18 changes: 0 additions & 18 deletions e2e/example.spec.ts

This file was deleted.

22 changes: 0 additions & 22 deletions e2e/test-1.spec.ts

This file was deleted.

14 changes: 14 additions & 0 deletions e2e/test-2.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { test, expect } from '@playwright/test';
require("dotenv").config();

test('has title', async ({ page }) => {
await page.goto("https://kind-pear-cowboy-boots.cyclic.app/login");
Expand All @@ -14,3 +15,16 @@ test('Password forgotten link', async ({ page }) => {

await expect(page.getByRole('heading', { name: 'Passwort vergessen' })).toBeVisible();
});

test('Login link', async ({ page }) => {
await page.goto("https://kind-pear-cowboy-boots.cyclic.app/login");
await page.locator('input[name="email"]').click();
await page.locator('input[name="email"]').fill(process.env.PLAYWRIGHT_USER!);
await page.locator('input[name="email"]').press("Tab");
await page
.locator('input[name="password"]')
.fill(process.env.PLAYWRIGHT_PASSWORD!);
await page.getByRole("button", { name: "Login" }).click();
await expect(page.getByRole('link', { name: 'QRCode für Login anzeigen' })).toBeVisible();
});

0 comments on commit 876232a

Please sign in to comment.