Skip to content

Commit d5ca2f8

Browse files
author
Kent C. Dodds
authored
Merge branch 'next' into 372-label-fix
2 parents 8eb8c9f + 6084f53 commit d5ca2f8

26 files changed

+752
-214
lines changed

.all-contributorsrc

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"imageSize": 100,
99
"commit": false,
1010
"contributorsPerLine": 7,
11+
"skipCi": false,
1112
"contributors": [
1213
{
1314
"login": "kentcdodds",
@@ -238,7 +239,8 @@
238239
"avatar_url": "https://avatars2.githubusercontent.com/u/21689428?v=4",
239240
"profile": "http://jonathanstoye.de",
240241
"contributions": [
241-
"doc"
242+
"doc",
243+
"code"
242244
]
243245
},
244246
{
@@ -753,6 +755,55 @@
753755
"contributions": [
754756
"code"
755757
]
758+
},
759+
{
760+
"login": "Westbrook",
761+
"name": "Westbrook Johnson",
762+
"avatar_url": "https://avatars0.githubusercontent.com/u/1156657?v=4",
763+
"profile": "http://westbrookjohnson.com",
764+
"contributions": [
765+
"code"
766+
]
767+
},
768+
{
769+
"login": "iAziz786",
770+
"name": "Mohammad Aziz",
771+
"avatar_url": "https://avatars3.githubusercontent.com/u/17024120?v=4",
772+
"profile": "https://aziz.js.org",
773+
"contributions": [
774+
"code",
775+
"test"
776+
]
777+
},
778+
{
779+
"login": "seetdev",
780+
"name": "seetdev",
781+
"avatar_url": "https://avatars2.githubusercontent.com/u/35116035?v=4",
782+
"profile": "https://www.linkedin.com/in/seetdev/",
783+
"contributions": [
784+
"test",
785+
"code"
786+
]
787+
},
788+
{
789+
"login": "xgbuils",
790+
"name": "Xavier Garcia Buils",
791+
"avatar_url": "https://avatars2.githubusercontent.com/u/6483614?v=4",
792+
"profile": "https://twitter.com/xgbuils",
793+
"contributions": [
794+
"code",
795+
"test"
796+
]
797+
},
798+
{
799+
"login": "aw-davidson",
800+
"name": "aw-davidson",
801+
"avatar_url": "https://avatars2.githubusercontent.com/u/32170938?v=4",
802+
"profile": "https://github.com/aw-davidson",
803+
"contributions": [
804+
"code",
805+
"test"
806+
]
756807
}
757808
],
758809
"repoHost": "https://github.com"

.travis.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
sudo: false
21
language: node_js
3-
cache:
4-
directories:
5-
- ~/.npm
2+
cache: npm
63
notifications:
74
email: false
85
node_js:
9-
- '10'
10-
- '8'
6+
- 10.14
7+
- 12
8+
- node
119
install: npm install
12-
script: npm run validate
13-
after_success: kcd-scripts travis-after-success
10+
script:
11+
- npm run validate
12+
- npx codecov@3
1413
branches:
15-
only: master
14+
only:
15+
- master
16+
- next
17+
18+
jobs:
19+
include:
20+
- stage: release
21+
node_js: 12
22+
script: kcd-scripts travis-release

README.md

Lines changed: 87 additions & 77 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,21 @@
4040
"dist"
4141
],
4242
"dependencies": {
43-
"@babel/runtime": "^7.6.2",
43+
"@babel/runtime": "^7.8.4",
4444
"@sheerun/mutationobserver-shim": "^0.3.2",
45-
"@types/testing-library__dom": "^6.0.0",
46-
"aria-query": "3.0.0",
47-
"pretty-format": "^24.9.0",
48-
"wait-for-expect": "^3.0.0"
45+
"@types/testing-library__dom": "^6.12.1",
46+
"aria-query": "^4.0.2",
47+
"dom-accessibility-api": "^0.3.0",
48+
"pretty-format": "^25.1.0",
49+
"wait-for-expect": "^3.0.2"
4950
},
5051
"devDependencies": {
51-
"@testing-library/jest-dom": "^4.1.0",
52+
"@testing-library/jest-dom": "^5.1.1",
5253
"jest-in-case": "^1.0.2",
5354
"jest-serializer-ansi": "^1.0.3",
54-
"jest-watch-select-projects": "^1.0.0",
55-
"jsdom": "^15.1.1",
56-
"kcd-scripts": "^1.7.0"
55+
"jest-watch-select-projects": "^2.0.0",
56+
"jsdom": "^16.2.0",
57+
"kcd-scripts": "^5.4.0"
5758
},
5859
"eslintConfig": {
5960
"extends": "./node_modules/kcd-scripts/eslint.js",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`getByLabelText query will throw the custom error returned by config.getElementError 1`] = `"My custom error: Unable to find a label with the text of: TEST QUERY"`;
4+
5+
exports[`getByText query will throw the custom error returned by config.getElementError 1`] = `"My custom error: Unable to find an element with the text: TEST QUERY. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible."`;

src/__tests__/__snapshots__/role-helpers.js.snap

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@
33
exports[`logRoles calls console.log with output from prettyRoles 1`] = `
44
"region:
55
6+
Name "a region":
67
<section
7-
data-testid="a-section"
8+
aria-label="a region"
9+
data-testid="named-section"
810
/>
911
1012
--------------------------------------------------
1113
link:
1214
15+
Name "link":
1316
<a
1417
data-testid="a-link"
1518
href="http://whatever.com"
@@ -18,135 +21,160 @@ link:
1821
--------------------------------------------------
1922
navigation:
2023
24+
Name "":
2125
<nav
2226
data-testid="a-nav"
2327
/>
2428
2529
--------------------------------------------------
2630
heading:
2731
32+
Name "Main Heading":
2833
<h1
2934
data-testid="a-h1"
3035
/>
3136
37+
Name "Sub Heading":
3238
<h2
3339
data-testid="a-h2"
3440
/>
3541
42+
Name "Tertiary Heading":
3643
<h3
3744
data-testid="a-h3"
3845
/>
3946
4047
--------------------------------------------------
4148
article:
4249
50+
Name "":
4351
<article
4452
data-testid="a-article"
4553
/>
4654
4755
--------------------------------------------------
4856
command:
4957
58+
Name "":
5059
<menuitem
5160
data-testid="a-menuitem-1"
5261
/>
5362
63+
Name "":
5464
<menuitem
5565
data-testid="a-menuitem-2"
5666
/>
5767
5868
--------------------------------------------------
5969
menuitem:
6070
71+
Name "":
6172
<menuitem
6273
data-testid="a-menuitem-1"
6374
/>
6475
76+
Name "":
6577
<menuitem
6678
data-testid="a-menuitem-2"
6779
/>
6880
6981
--------------------------------------------------
7082
list:
7183
84+
Name "":
7285
<ul
7386
data-testid="a-list"
7487
/>
7588
89+
Name "":
7690
<ul
7791
data-testid="b-list"
7892
/>
7993
8094
--------------------------------------------------
8195
listitem:
8296
97+
Name "":
8398
<li
8499
data-testid="a-list-item-1"
85100
/>
86101
102+
Name "":
87103
<li
88104
data-testid="a-list-item-2"
89105
/>
90106
107+
Name "":
91108
<li
92109
data-testid="b-list-item-1"
93110
/>
94111
112+
Name "":
95113
<li
96114
data-testid="b-list-item-2"
97115
/>
98116
99117
--------------------------------------------------
100118
table:
101119
120+
Name "":
102121
<table
103122
data-testid="a-table"
104123
/>
105124
106125
--------------------------------------------------
107126
rowgroup:
108127
128+
Name "":
109129
<tbody
110130
data-testid="a-tbody"
111131
/>
112132
113133
--------------------------------------------------
114134
row:
115135
136+
Name "Cell 1 Cell 2 Cell 3":
116137
<tr
117138
data-testid="a-row"
118139
/>
119140
120141
--------------------------------------------------
121142
cell:
122143
144+
Name "Cell 1":
123145
<td
124146
data-testid="a-cell-1"
125147
/>
126148
149+
Name "Cell 2":
127150
<td
128151
data-testid="a-cell-2"
129152
/>
130153
154+
Name "Cell 3":
131155
<td
132156
data-testid="a-cell-3"
133157
/>
134158
135159
--------------------------------------------------
136160
form:
137161
162+
Name "a form":
138163
<form
139-
data-testid="a-form"
164+
aria-label="a form"
165+
data-testid="named-form"
140166
/>
141167
142168
--------------------------------------------------
143169
radio:
144170
171+
Name "":
145172
<input
146173
data-testid="a-radio-1"
147174
type="radio"
148175
/>
149176
177+
Name "":
150178
<input
151179
data-testid="a-radio-2"
152180
type="radio"
@@ -155,16 +183,19 @@ radio:
155183
--------------------------------------------------
156184
textbox:
157185
186+
Name "":
158187
<input
159188
data-testid="a-input-1"
160189
type="text"
161190
/>
162191
192+
Name "":
163193
<input
164194
data-testid="a-input-2"
165195
type="text"
166196
/>
167197
198+
Name "":
168199
<textarea
169200
data-testid="a-textarea"
170201
/>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`timers works with fake timers 1`] = `
4+
Array [
5+
Object {
6+
"addedNodes": NodeList [],
7+
"attributeName": "id",
8+
"attributeNamespace": null,
9+
"nextSibling": null,
10+
"oldValue": null,
11+
"previousSibling": null,
12+
"removedNodes": NodeList [],
13+
"target": <div
14+
id="foo"
15+
/>,
16+
"type": "attributes",
17+
},
18+
]
19+
`;
20+
21+
exports[`timers works with real timers 1`] = `
22+
Array [
23+
Object {
24+
"addedNodes": NodeList [],
25+
"attributeName": "id",
26+
"attributeNamespace": null,
27+
"nextSibling": null,
28+
"oldValue": null,
29+
"previousSibling": null,
30+
"removedNodes": NodeList [],
31+
"target": <div
32+
id="foo"
33+
/>,
34+
"type": "attributes",
35+
},
36+
]
37+
`;

0 commit comments

Comments
 (0)