Conversation
| test("submit incorrect email", async ({ page }) => { | ||
| await fillEmailInput(page, "kfjdskfjkdskfldsjlfjdskljfsd@test.pl"); | ||
|
|
||
| await expect(page.getByText(/il musi być z domeny Polite/i)).toBeVisible(); |
There was a problem hiding this comment.
The regex for the email domain error message seems vague. Consider matching the full expected error text to avoid false positives.
| await expect(page.getByText(/il musi być z domeny Polite/i)).toBeVisible(); | |
| await expect(page.getByText(/Email musi być z domeny Politechniki Wrocławskiej/i)).toBeVisible(); |
There was a problem hiding this comment.
ma rację, nie wiem jaki jest sens dawania tylko częsci - dla mnie to jest confusing
| import { Page, expect } from "@playwright/test"; | ||
|
|
||
| export const selectFacultyAndRegistration = async (page: Page) => { | ||
| console.log("selectFacultyAndRegistration - 1"); |
There was a problem hiding this comment.
There are several console.log statements in the test helper. Remove or limit debug logs to keep test output clean.
| console.log("selectFacultyAndRegistration - 1"); |
| await emailInput.press("Enter"); | ||
|
|
||
| await expect(page.getByText(/tuł musi mieć/i)).toBeVisible(); | ||
| await expect(page.getByText(/pis musi mieć co/i)).toBeVisible(); |
There was a problem hiding this comment.
Typographical error: The expected text 'pis musi mieć co' likely should be 'opis musi mieć co najmniej ...' (depending on full context).
| await expect(page.getByText(/pis musi mieć co/i)).toBeVisible(); | |
| await expect(page.getByText(/opis musi mieć co najmniej/i)).toBeVisible(); |
Rei-x
left a comment
There was a problem hiding this comment.
spoczko testy, testują co mają testować i nawet ładnie, że wszystkie mogą lecieć in parallel i są od siebie niezależne. dodatkowy props za stawianie api lokalnie i używanie go, sporo osób używało produkcyjnego
z rzeczy do poprawy to są locatory do rzeczy, w niektórych miejscach bardzo słabe, pewnie też to wynika z tego, że dostępność planera leży, wypadałoby to poprawić
poza tym wszystko jest nawet spoczko, poczytaj sobie też jak zrobić autha w playwrighcie, żeby nie mieć niespodzianek: https://playwright.dev/docs/auth
| build: | ||
| name: Test build | ||
| runs-on: ubuntu-latest | ||
| needs: [lint, prettier, deadcode] |
There was a problem hiding this comment.
po co to w sumie jest? raczej chcemy mieć jak najszybciej feedback, a nie że muszę czekać na formatowanie żeby wiedzieć czy moja apka się builduje
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: lts/* |
There was a problem hiding this comment.
raczej chcemy wersje z repo, a nie obecną najnowszą
| import { Page, expect } from "@playwright/test"; | ||
|
|
||
| export const selectFacultyAndRegistration = async (page: Page) => { | ||
| console.log("selectFacultyAndRegistration - 1"); |
|
|
||
| export const selectFacultyAndRegistration = async (page: Page) => { | ||
| console.log("selectFacultyAndRegistration - 1"); | ||
| await page.waitForTimeout(1000); |
There was a problem hiding this comment.
no raczej nie powinno się takich rzeczy umieszczać w testach
| page, | ||
| }) => { | ||
| await page.route( | ||
| "http://localhost:3333/departments/W5/registrations/W05-APR-SI-3-25Z/courses", |
There was a problem hiding this comment.
zahardkodowany localhost, raczej tak nie powinno być
|
|
||
| await selectFacultyAndRegistration(page); | ||
|
|
||
| await page.waitForTimeout(2000); |
| }); | ||
| }); | ||
|
|
||
| test.describe("Report form tests", () => { |
There was a problem hiding this comment.
wrzuciłbym to do oddzielnego pliku, to raczej osobna rzecz do przetestowania
| await emailInput.press("Enter"); | ||
|
|
||
| await expect(page.getByText(/tuł musi mieć/i)).toBeVisible(); | ||
| await expect(page.getByText(/pis musi mieć co/i)).toBeVisible(); |
| selectFacultyAndRegistration, | ||
| } from "./helpers"; | ||
|
|
||
| test.describe("Plans logic online", () => { |
There was a problem hiding this comment.
nie sprawdzam tego testu, bo wygląda mocno WIP
Lokalnie śmiga
Tylko funkcja wybierania wydziału nie działa na githubie, będę debugowal żeby śmigało też na gicie