mirror of
https://github.com/Queer-Lexikon/regenbogenkarte
synced 2024-11-10 06:34:21 +00:00
e98c3de747
This commit includes all data from the current map, excluding: - the actual data - the deployment script to the server We've added a comprehensive README for newcomers, so that they can understand what's going on. Co-authored-by: xenia <xhartmann@posteo.de>
23 lines
934 B
TypeScript
23 lines
934 B
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("exit button", () => {
|
|
test.beforeEach(async ({ page, baseURL }) => {
|
|
test.fail(baseURL === undefined, "baseURL should be set");
|
|
await page.goto(baseURL!);
|
|
});
|
|
test("should open new tab with wikipedia", async ({ page }) => {
|
|
const [wikipedia] = await Promise.all([
|
|
page.waitForEvent("popup"),
|
|
page.locator("text=Notausgang").click(),
|
|
]);
|
|
await expect(wikipedia).toHaveURL("https://de.wikipedia.org/wiki/Wikipedia:Hauptseite");
|
|
});
|
|
test("should navigate to google", async ({ page }) => {
|
|
await Promise.all([page.waitForEvent("popup"), page.locator("text=Notausgang").click()]);
|
|
await expect(page).toHaveURL(/google\.com/);
|
|
});
|
|
test("should open two tabs in total", async ({ page }) => {
|
|
await Promise.all([page.waitForEvent("popup"), page.locator("text=Notausgang").click()]);
|
|
await expect(page.context().pages()).toHaveLength(2);
|
|
});
|
|
});
|