init commit
This commit is contained in:
18
tests/example.spec.ts
Normal file
18
tests/example.spec.ts
Normal file
@ -0,0 +1,18 @@
|
||||
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();
|
||||
});
|
14
tests/weather-test.spec.ts
Normal file
14
tests/weather-test.spec.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('test', async ({ page }) => {
|
||||
await page.goto('https://test.crate.zip/');
|
||||
await page.getByRole('button').click();
|
||||
await page.getByRole('link', { name: 'View Weather History' }).click();
|
||||
await page.getByRole('link', { name: 'Back to Home' }).click();
|
||||
const page1Promise = page.waitForEvent('popup');
|
||||
await page.getByRole('link', { name: 'More Details' }).click();
|
||||
const page1 = await page1Promise;
|
||||
const page2Promise = page.waitForEvent('popup');
|
||||
await page.getByRole('link', { name: 'View Report' }).click();
|
||||
const page2 = await page2Promise;
|
||||
});
|
Reference in New Issue
Block a user