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: apps/website/src/routes/docs/headless/contributing/index.mdx
+72-3Lines changed: 72 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,11 +104,80 @@ Tests ensure we can sleep sound at night and know that our component behavior is
104
104
- get the test passing by adding said feature!
105
105
- enjoy life when refactoring 🏝️
106
106
107
-
We currently use [playwright](https://playwright.dev/docs/intro)for testing.
107
+
We strongly recommend TDD development for the headless library, and we are currently in the process of a playwright integration.
108
108
109
-
> We also currently have a few cypress tests that we are migrating over to playwright.
109
+
Currently, the component testing integration for Qwik & Playwright is in development, and we are using e2e tests for the time being. That said, most tests should be very easy to migrate later on.
110
110
111
-
Shai also has a testing course that Qwik UI contributors get access to for the price of **FREE**! Don't hesitate to reach out.
111
+
#### Getting started w/ testing
112
+
113
+
Here's an example way of getting a testid of the `Hero` select docs example, without affecting any visible markup.
114
+
115
+
```tsx
116
+
<divdata-testid="select-hero-test">
117
+
<Showcasename="hero" />
118
+
</div>
119
+
```
120
+
121
+
Then, we get our testDriver, you can think of it as reusable code we use throughout the test. For example, in the Select component we constantly grab the listbox, trigger, etc.
0 commit comments