You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: exercises/03.best-practices/01.problem.accessibility-selectors/README.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,3 +8,5 @@ The way you access different elements in tests matters a lot. It can vary from g
8
8
9
9
👨💼 In this exercise, your task is to write a simple integration test for a new React component called <InlineFilefile="./src/discount-code-form.tsx">
10
10
`<DiscountCodeForm />`</InlineFile>. And what do you know—this component is a _form_! This means plenty of elements for you to locate. Use locators like `.getByRole()` and `.getByLabelText()`, and write assertions that make sure all the necessary form elements are present on the page.
11
+
12
+
> Note that I've made the browser tests run in a _headless_ mode by setting `test.browser.headless` to `true` in <InlineFilefile="./vite.config.ts">`vite.configt.ts`</InlineFile>.
0 commit comments