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: README.md
+58-3Lines changed: 58 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Testing-Playground ([demo])
1
+
# Testing-Playground ([demo][playground])
2
2
3
3
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
4
4
@@ -14,8 +14,60 @@ Testing-Library makes it easy to get started with testing. But even then, it can
14
14
15
15
Testing-Playground provides you with direct feedback. Trying to visualize the direct impact of adding and removing specific (aria) attributes. All to give you some visual support while learning about the importance of aria roles, labels, and attributes.
Create a template element, in which you add to `script` tags. One for `html` and one for `javascript`. Make sure to type them correctly, as that's the what that our embedder uses to populate the different panes.
36
+
37
+
Note that the `data-testing-playground` attribute is required as well.
38
+
39
+
```html
40
+
<templatedata-testing-playground>
41
+
<scripttype="text/html"></script>
42
+
43
+
<scripttype="text/javascript"></script>
44
+
</template>
45
+
```
46
+
47
+
Now, you can populate the `html` and `javascript` elements:
48
+
49
+
```html
50
+
<templatedata-testing-playground>
51
+
<scripttype="text/html">
52
+
<button>one</button>
53
+
</script>
54
+
55
+
<scripttype="text/javascript">
56
+
screen.getByRole('button');
57
+
</script>
58
+
</template>
59
+
```
60
+
61
+
#### options
62
+
63
+
To configure your playground even further, add one or more of the following attributes to your opening `<template>` tag. Note, don't remove the `data-testing-playground` attribute!
0 commit comments