summaryrefslogtreecommitdiff
path: root/tests/example.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/example.spec.ts')
-rw-r--r--tests/example.spec.ts23
1 files changed, 8 insertions, 15 deletions
diff --git a/tests/example.spec.ts b/tests/example.spec.ts
index 54a906a..fe87980 100644
--- a/tests/example.spec.ts
+++ b/tests/example.spec.ts
@@ -1,18 +1,11 @@
import { test, expect } from '@playwright/test';
-test('has title', async ({ page }) => {
- await page.goto('https://playwright.dev/');
-
- // Expect a title "to contain" a substring.
- await expect(page).toHaveTitle(/Playwright/);
-});
-
-test('get started link', async ({ page }) => {
- await page.goto('https://playwright.dev/');
-
- // Click the get started link.
- await page.getByRole('link', { name: 'Get started' }).click();
-
- // Expects page to have a heading with the name of Installation.
- await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
+test('Milchtankstelle', async ({ page }) => {
+ await page.goto('https://www.facebook.com/people/Milchtankstelle-in-Oberwellenborn/100057319515068/');
+
+ await page.getByRole('button', {name: 'Decline optional cookies'}).click();
+ await page.getByRole('button', {name: 'Close'}).click();
+ let first = await page.$('xpath=//div[@role="article" and @aria-posinset="1"]');
+ let firstText = await first.innerHTML();
+ expect(firstText.includes('Unsere Milchtankstelle ist defekt!')).toBeTruthy();
});