This commit is contained in:
Lukáš Kaňka
2023-08-15 18:27:27 +02:00
commit a117466599
116 changed files with 6597 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { test, expect } from '@playwright/test';
import { HomePage } from '../page-objects/HomePage';
// test odsouhlasení cookies
test('HomePage click Accept cookies', async ({ page }) => {
const homePage = new HomePage(page);
await homePage.gotoHome();
await homePage.clickCookiesButtonAccept();
});
// test zamítnutí cookies
test('HomaPage click Decline cookies' , async ({page}) => {
const homePage = new HomePage(page);
await homePage.gotoHome();
await homePage.clickCookiesButtonDecline();
})

View 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 the URL to contain intro.
await expect(page).toHaveURL(/.*intro/);
});

View File

@ -0,0 +1,14 @@
import { test, expect } from '@playwright/test';
import { HomePage } from '../page-objects/HomePage';
test('Click menu button with HomePage' , async ({ page }) => {
const homePage = new HomePage(page);
await homePage.gotoHome();
await homePage.clickUvodniStranaButton();
await homePage.clickOMneButton();
await homePage.clickZOOUButton();
await homePage.clickPodporovateleButton();
//await context.close();
//await browser.close();
});

View File

@ -0,0 +1,10 @@
import { test, expect } from '@playwright/test';
import { HomePage } from '../page-objects/HomePage';
test('Search web' , async ({ page }) => {
const homePage = new HomePage(page);
await homePage.gotoHome();
await homePage.enterTextSearchFields();
await homePage.clickSearchButton();
});

View File

@ -0,0 +1,6 @@
import { test, expect } from '@playwright/test';
test('test', async ({ page }) => {
await page.goto('https://lukan.cz/');
await page.getByRole('link', { name: 'Úvodní stránka' }).click();
});