Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

domaci ukol #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

domaci ukol #3

wants to merge 1 commit into from

Conversation

LDLenka
Copy link

@LDLenka LDLenka commented Dec 2, 2024

No description provided.

Copy link
Collaborator

@ZanetaK ZanetaK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okomenotvala jsem ti tenhle PR, ale ve vysledku ho zamitnu, jelikoz je to merge do forkleho repa, nikoliv do tveho repa. Pri vytvareni PR musis zmenit ten czechitas na svuj LDLenka, aby to smerovalo do tveho repa.

Co se tyce ukolu, tak za me hezke. Jenom jsem dala v podstate komentare k organizaci testu a nejaka doporuceni.

});
});

function getUniqueEmail() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

funkce je schovana mezi testy. lepsi by bylo ji dat na zacatek radek 3 cca, nebo do jineho souboru uplne.

await expect(page.getByLabel('Kontrola hesla')).toBeVisible()
});

await test.step('kontrola zobrazeni oproti screenshotu', async () => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v tomhle kroku k zadne kontrole screenshotu nedocazi, pouze se screenshot vytvari.
lepsi pouzit await expect(page).toHaveScreenshot();
https://playwright.dev/docs/test-snapshots

const fullname = 'Lenka Nová';
const password = 'Lenka123';

console.log(email);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.logy do testu uplne nepatri to je spis pro vlastni debugging ✂️

test.beforeEach(async ({ page }) => {
await page.goto('/registrace');
const fullname = 'Lenka Nová'
console.log(fullname);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log ✂️


const email = `[email protected]`;
const password = 'LenkaNova123'
console.log(email);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log ✂️

const email = getUniqueEmail();
const password = '1234567890123';

console.log(email);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log ✂️


test('3 registrace uzivatele s existujicim mailem', async ({ page }) => {

const email = `[email protected]`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

je dobre primo pojmenovat konstantu existingEmail, at je to specificke a nikdo jiny se nemusi ptat: co je to za email?

import { test, expect } from '@playwright/test';
const { v4: uuidv4 } = require('uuid');


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tohle jenom organizacni doporuceni. Scenare mohly byt rozdeleny do dvou describe bloku, nebo vsechny v jednom. Tady to zacina be describe bloku a pozdeji mas definovay describe blok, tak mi to prijde mene prehledne.

@LDLenka
Copy link
Author

LDLenka commented Dec 28, 2024

Okomenotvala jsem ti tenhle PR, ale ve vysledku ho zamitnu, jelikoz je to merge do forkleho repa, nikoliv do tveho repa. Pri vytvareni PR musis zmenit ten czechitas na svuj LDLenka, aby to smerovalo do tveho repa.

Co se tyce ukolu, tak za me hezke. Jenom jsem dala v podstate komentare k organizaci testu a nejaka doporuceni.

tady je link na spravny PR - https://github.com/LDLenka/test-automation-playwright-js/pull/2/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants