-
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
Showing
6 changed files
with
1,979 additions
and
957 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,26 @@ | ||
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const test_1 = require("@playwright/test"); | ||
require("dotenv").config(); | ||
test_1.test.beforeEach(({ page }) => __awaiter(void 0, void 0, void 0, function* () { | ||
yield page.goto("https://kind-pear-cowboy-boots.cyclic.app/login"); | ||
yield page.locator('input[name="email"]').click(); | ||
yield page.locator('input[name="email"]').fill(process.env.PLAYWRIGHT_USER); | ||
yield page.locator('input[name="email"]').press("Tab"); | ||
yield page | ||
.locator('input[name="password"]') | ||
.fill(process.env.PLAYWRIGHT_PASSWORD); | ||
yield page.getByRole("button", { name: "Login" }).click(); | ||
})); | ||
(0, test_1.test)("test", ({ page }) => __awaiter(void 0, void 0, void 0, function* () { | ||
yield (0, test_1.expect)(page.getByRole("heading", { name: "HSC rental score management" })).toBeVisible(); | ||
})); |
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
import { test, expect } from '@playwright/test'; | ||
require("dotenv").config(); | ||
|
||
test('has title', async ({ page }) => { | ||
await page.goto(`${process.env.CYCLIC_URL}/login`); | ||
|
||
await expect(page).toHaveTitle(/HSC Leihnoten Verwaltung/); | ||
}); | ||
|
||
test('Password forgotten link', async ({ page }) => { | ||
await page.goto(`${process.env.CYCLIC_URL}/login`); | ||
|
||
await page.getByRole('link', { name: 'Passwort vergessen' }).click(); | ||
|
||
await expect(page.getByRole('heading', { name: 'Passwort vergessen' })).toBeVisible(); | ||
}); | ||
|
||
test('Login link', async ({ page }) => { | ||
await page.goto(`${process.env.CYCLIC_URL}/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(); | ||
}); | ||
|
Oops, something went wrong.