Skip to content

Konrad Guzek – Etap 4, React Basics#93

Closed
kguzek wants to merge 1 commit into
mainfrom
konrad-guzek/4-react-basics
Closed

Konrad Guzek – Etap 4, React Basics#93
kguzek wants to merge 1 commit into
mainfrom
konrad-guzek/4-react-basics

Conversation

@kguzek

@kguzek kguzek commented Jun 18, 2025

Copy link
Copy Markdown
Member

No description provided.

@kguzek kguzek requested a review from Antoni-Czaplicki June 18, 2025 16:06
@kguzek kguzek self-assigned this Jun 18, 2025
@kguzek kguzek requested review from jmorawiec and removed request for Antoni-Czaplicki June 24, 2025 20:56
@Rei-x Rei-x added the Etap 4 label Jun 25, 2025
render(<SolvroProjectsCombobox />);
const combobox = screen.getByRole("combobox");
expect(combobox).toBeInTheDocument();
expect(combobox).toHaveTextContent(/^wyszukaj projekt/i);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Jednyna rzecz, której ewentualnie bym się przyczepił, to wymienienie tego na po prostu "szukaj", żeby testy spasowały nawet w razie zmiany tekstu przycisku na coś bardziej zwięzłego. Tak poza tym nie mam żadnych uwag.


async function clickCombobox() {
const user = userEvent.setup();
render(<SolvroProjectsCombobox />);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Zastanawiam się, czy w myśl idei izolacji testów nie powinniśmy wykonywać "render" w każdym komponencie z osobna

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

wydaje mi się, że skoro jest to test jednostkowy dla jednego konkretnego komponentu to można założyć, że każdy test w tym pliku będzie go renderował i to tak samo, więc chyba nic nie szkodzi wrzucić to do jednej funkcji

@kguzek kguzek force-pushed the konrad-guzek/4-react-basics branch from 2644dbe to 1aad2eb Compare July 1, 2025 12:11
@Rei-x Rei-x added the odhaczone label Jul 9, 2025
@Rei-x Rei-x closed this Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants