@@ -4,11 +4,12 @@ function runTest() {
4
4
cy . contains ( '#hydration-marker' , 'hydrated' ) . should ( 'be.hidden' )
5
5
cy . get ( '#json' ) . should (
6
6
'have.text' ,
7
- '{"string":null,"int":null,"float":null,"bool":null}'
7
+ '{"string":null,"int":null,"float":null,"index":null," bool":null}'
8
8
)
9
9
cy . get ( '#string' ) . should ( 'be.empty' )
10
10
cy . get ( '#int' ) . should ( 'be.empty' )
11
11
cy . get ( '#float' ) . should ( 'be.empty' )
12
+ cy . get ( '#index' ) . should ( 'be.empty' )
12
13
cy . get ( '#bool' ) . should ( 'be.empty' )
13
14
cy . location ( 'search' ) . should ( 'be.empty' )
14
15
@@ -17,60 +18,70 @@ function runTest() {
17
18
cy . get ( '#string' ) . should ( 'have.text' , 'Hello' )
18
19
cy . get ( '#json' ) . should (
19
20
'have.text' ,
20
- '{"string":"Hello","int":null,"float":null,"bool":null}'
21
+ '{"string":"Hello","int":null,"float":null,"index":null," bool":null}'
21
22
)
22
23
23
24
cy . contains ( 'Set int' ) . click ( )
24
25
cy . location ( 'search' ) . should ( 'include' , 'int=42' )
25
26
cy . get ( '#int' ) . should ( 'have.text' , '42' )
26
27
cy . get ( '#json' ) . should (
27
28
'have.text' ,
28
- '{"string":"Hello","int":42,"float":null,"bool":null}'
29
+ '{"string":"Hello","int":42,"float":null,"index":null," bool":null}'
29
30
)
30
31
31
32
cy . contains ( 'Set float' ) . click ( )
32
33
cy . location ( 'search' ) . should ( 'include' , 'float=3.14159' )
33
34
cy . get ( '#float' ) . should ( 'have.text' , '3.14159' )
34
35
cy . get ( '#json' ) . should (
35
36
'have.text' ,
36
- '{"string":"Hello","int":42,"float":3.14159,"bool":null}'
37
+ '{"string":"Hello","int":42,"float":3.14159,"index":null,"bool":null}'
38
+ )
39
+
40
+ cy . contains ( 'Set index' ) . click ( )
41
+ cy . location ( 'search' ) . should ( 'include' , 'index=9' )
42
+ cy . get ( '#index' ) . should ( 'have.text' , '8' )
43
+ cy . get ( '#json' ) . should (
44
+ 'have.text' ,
45
+ '{"string":"Hello","int":42,"float":3.14159,"index":8,"bool":null}'
37
46
)
38
47
39
48
cy . contains ( 'Toggle bool' ) . click ( )
40
49
cy . location ( 'search' ) . should ( 'include' , 'bool=true' )
41
50
cy . get ( '#bool' ) . should ( 'have.text' , 'true' )
42
51
cy . get ( '#json' ) . should (
43
52
'have.text' ,
44
- '{"string":"Hello","int":42,"float":3.14159,"bool":true}'
53
+ '{"string":"Hello","int":42,"float":3.14159,"index":8," bool":true}'
45
54
)
46
55
cy . contains ( 'Toggle bool' ) . click ( )
47
56
cy . location ( 'search' ) . should ( 'include' , 'bool=false' )
48
57
cy . get ( '#bool' ) . should ( 'have.text' , 'false' )
49
58
cy . get ( '#json' ) . should (
50
59
'have.text' ,
51
- '{"string":"Hello","int":42,"float":3.14159,"bool":false}'
60
+ '{"string":"Hello","int":42,"float":3.14159,"index":8," bool":false}'
52
61
)
53
62
54
63
cy . get ( '#clear-string' ) . click ( )
55
64
cy . location ( 'search' ) . should ( 'not.include' , 'string=Hello' )
56
65
cy . get ( '#string' ) . should ( 'be.empty' )
57
66
cy . get ( '#json' ) . should (
58
67
'have.text' ,
59
- '{"string":null,"int":42,"float":3.14159,"bool":false}'
68
+ '{"string":null,"int":42,"float":3.14159,"index":8," bool":false}'
60
69
)
61
70
62
71
cy . get ( '#clear' ) . click ( )
63
72
cy . location ( 'search' ) . should ( 'not.include' , 'string' )
64
73
cy . location ( 'search' ) . should ( 'not.include' , 'int' )
65
74
cy . location ( 'search' ) . should ( 'not.include' , 'float' )
75
+ cy . location ( 'search' ) . should ( 'not.include' , 'index' )
66
76
cy . location ( 'search' ) . should ( 'not.include' , 'bool' )
67
77
cy . get ( '#json' ) . should (
68
78
'have.text' ,
69
- '{"string":null,"int":null,"float":null,"bool":null}'
79
+ '{"string":null,"int":null,"float":null,"index":null," bool":null}'
70
80
)
71
81
cy . get ( '#string' ) . should ( 'be.empty' )
72
82
cy . get ( '#int' ) . should ( 'be.empty' )
73
83
cy . get ( '#float' ) . should ( 'be.empty' )
84
+ cy . get ( '#index' ) . should ( 'be.empty' )
74
85
cy . get ( '#bool' ) . should ( 'be.empty' )
75
86
cy . location ( 'search' ) . should ( 'be.empty' )
76
87
}
0 commit comments