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
feat(logging): don't log DOM in Cypress, don't highlight in the browser (#45)
* fix: don't crash when jsdom's document is passed to prettyDOM.
* feat(logging): don't log DOM in Cypress, don't highlight in the browser.
- added test to check whether Cypress doesn't log DOM
- ignore .idea folder (JetBrains IDE's)
- added myself to contributors
* fix: `.control` support landed in jsdom, updated istanbul ignore comments for improved coverage.
* Updated error message code style. Updated istanbul ignore.
* Improved error handling code style.
* Updated environment check.
Copy file name to clipboardExpand all lines: src/__tests__/__snapshots__/element-queries.js.snap
+23-9Lines changed: 23 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,63 +1,77 @@
1
1
// Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
3
3
exports[`get throws a useful error message 1`] =`
4
-
"Unable to find a label with the text of: LucyRicardo
4
+
"Unable to find a label with the text of: LucyRicardo
5
5
6
6
[36m<div>[39m
7
7
[36m<div />[39m
8
8
[36m</div>[39m"
9
9
`;
10
10
11
11
exports[`get throws a useful error message 2`] =`
12
-
"Unable to find an element with the placeholder text of: LucyRicardo
12
+
"Unable to find an element with the placeholder text of: LucyRicardo
13
13
14
14
[36m<div>[39m
15
15
[36m<div />[39m
16
16
[36m</div>[39m"
17
17
`;
18
18
19
19
exports[`get throws a useful error message 3`] =`
20
-
"Unable to find an element with the text: LucyRicardo. 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.
20
+
"Unable to find an element with the text: LucyRicardo. 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.
21
21
22
22
[36m<div>[39m
23
23
[36m<div />[39m
24
24
[36m</div>[39m"
25
25
`;
26
26
27
27
exports[`get throws a useful error message 4`] =`
28
-
"Unable to find an element by: [data-testid=\\"LucyRicardo\\"]
28
+
"Unable to find an element by: [data-testid=\\"LucyRicardo\\"]
29
29
30
30
[36m<div>[39m
31
31
[36m<div />[39m
32
32
[36m</div>[39m"
33
33
`;
34
34
35
35
exports[`get throws a useful error message 5`] =`
36
-
"Unable to find an element with the alt text: LucyRicardo
36
+
"Unable to find an element with the alt text: LucyRicardo
37
37
38
38
[36m<div>[39m
39
39
[36m<div />[39m
40
40
[36m</div>[39m"
41
41
`;
42
42
43
43
exports[`get throws a useful error message 6`] =`
44
-
"Unable to find an element with the title: LucyRicardo.
44
+
"Unable to find an element with the title: LucyRicardo.
45
45
46
46
[36m<div>[39m
47
47
[36m<div />[39m
48
48
[36m</div>[39m"
49
49
`;
50
50
51
51
exports[`get throws a useful error message 7`] =`
52
-
"Unable to find an element with the value: LucyRicardo.
52
+
"Unable to find an element with the value: LucyRicardo.
53
53
54
54
[36m<div>[39m
55
55
[36m<div />[39m
56
56
[36m</div>[39m"
57
57
`;
58
58
59
+
exports[`get throws a useful error message without DOM in Cypress 1`] =`"Unable to find a label with the text of: LucyRicardo"`;
60
+
61
+
exports[`get throws a useful error message without DOM in Cypress 2`] =`"Unable to find an element with the placeholder text of: LucyRicardo"`;
62
+
63
+
exports[`get throws a useful error message without DOM in Cypress 3`] =`"Unable to find an element with the text: LucyRicardo. 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."`;
64
+
65
+
exports[`get throws a useful error message without DOM in Cypress 4`] =`"Unable to find an element by: [data-testid=\\"LucyRicardo\\"]"`;
66
+
67
+
exports[`get throws a useful error message without DOM in Cypress 5`] =`"Unable to find an element with the alt text: LucyRicardo"`;
68
+
69
+
exports[`get throws a useful error message without DOM in Cypress 6`] =`"Unable to find an element with the title: LucyRicardo."`;
70
+
71
+
exports[`get throws a useful error message without DOM in Cypress 7`] =`"Unable to find an element with the value: LucyRicardo."`;
72
+
59
73
exports[`label with no form control 1`] =`
60
-
"Found a label with the text of: /alone/, however no form control was found associated to that label. Make sure you're using the \\"for\\" attribute or \\"aria-labelledby\\" attribute correctly.
74
+
"Found a label with the text of: /alone/, however no form control was found associated to that label. Make sure you're using the \\"for\\" attribute or \\"aria-labelledby\\" attribute correctly.
61
75
62
76
[36m<div>[39m
63
77
[36m<label>[39m
@@ -67,7 +81,7 @@ exports[`label with no form control 1`] = `
67
81
`;
68
82
69
83
exports[`totally empty label 1`] =`
70
-
"Found a label with the text of: , however no form control was found associated to that label. Make sure you're using the \\"for\\" attribute or \\"aria-labelledby\\" attribute correctly.
84
+
"Found a label with the text of: , however no form control was found associated to that label. Make sure you're using the \\"for\\" attribute or \\"aria-labelledby\\" attribute correctly.
0 commit comments