Skip to content

Commit

Permalink
test similar to get started test
Browse files Browse the repository at this point in the history
  • Loading branch information
hsc-nue committed Sep 29, 2023
1 parent d0f43aa commit d899f5b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions e2e/test-1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ test.beforeEach(async ({ page }) => {
await page.getByRole("button", { name: "Login" }).click();
});

test("test", async ({ page }) => {
test("home content", async ({ page }) => {
await expect(
page.getByRole("heading", { name: "HSC Leihnoten Verwaltung" })
).toBeDefined();
expect(page.getByRole('link', { name: 'Ausleihen anzeigen' })).toBeDefined();
expect(page.getByRole('link', { name: 'QRCode für Login anzeigen' })).toBeDefined();
await expect(page.getByRole('link', { name: 'QRCode für Login anzeigen' })).toBeVisible();
// await expect(page.getByRole('link', { name: 'QRCode für Login anzeigen' })).toBeVisible();
});
16 changes: 16 additions & 0 deletions e2e/test-2.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto("https://kind-pear-cowboy-boots.cyclic.app/login");

// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/HSC Leihnoten Verwaltung/);
});

test('Password forgotten link', async ({ page }) => {
await page.goto("https://kind-pear-cowboy-boots.cyclic.app/login");

await page.getByRole('link', { name: 'Passwort vergessen' }).click();

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

0 comments on commit d899f5b

Please sign in to comment.