forked from cypress-io/cypress-example-recipes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapshots.js
194 lines (194 loc) · 4.5 KB
/
snapshots.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
module.exports = {
"UI": {
"advanced": {
"marks completed items": {
"todo-list with 2 completed items": "<ul class=\"todo-list\">\n <li class=\"todo\">\n <div class=\"view\"><input type=\"checkbox\"\n class=\"toggle\"> <label>first item</label> <button\n class=\"destroy\"></button></div>\n </li>\n <li class=\"todo\">\n <div class=\"view\"><input type=\"checkbox\"\n class=\"toggle\"> <label>second item</label> <button\n class=\"destroy\"></button></div>\n </li>\n <li class=\"todo completed\">\n <div class=\"view\"><input type=\"checkbox\"\n class=\"toggle\"> <label>item 3</label> <button class=\"destroy\"></button>\n </div>\n </li>\n <li class=\"todo completed\">\n <div class=\"view\"><input type=\"checkbox\"\n class=\"toggle\"> <label>item 4</label> <button class=\"destroy\"></button>\n </div>\n </li>\n</ul>"
}
}
},
"__version": "3.3.0",
"via API": {
"adds todo deep": {
"1": [
{
"title": "first todo",
"completed": false,
"id": "1"
},
{
"title": "second todo",
"completed": false,
"id": "2"
}
]
},
"adds and deletes a todo": {
"1": [
{
"title": "first todo",
"completed": false,
"id": "1"
}
]
}
},
"API": {
"is adding todo item": {
"1": {
"title": "first item",
"completed": false,
"id": "1"
}
}
},
"UI to Vuex store": {
"has loading, newTodo and todos properties": {
"1": [
"loading",
"todos",
"newTodo"
]
},
"starts empty": {
"1": {
"todos": [],
"newTodo": ""
}
},
"can enter new todo text": {
"1": "learn how to test with Cypress.io"
},
"stores todos in the store": {
"1": [
{
"title": "first todo",
"completed": false
},
{
"title": "second todo",
"completed": false
}
]
},
"stores todos in the store (with ids)": {
"1": [
{
"title": "first todo",
"completed": false,
"id": "1"
},
{
"title": "second todo",
"completed": false,
"id": "2"
}
]
}
},
"Vuex store": {
"starts empty": {
"1": []
},
"can enter new todo text": {
"1": "learn how to test with Cypress.io"
},
"can compare the entire store": {
"1": {
"loading": false,
"todos": [],
"newTodo": ""
}
},
"starts typing after delayed server response": {
"1": "<input autofocus=\"autofocus\"\n autocomplete=\"off\"\n placeholder=\"What needs to be done?\"\n class=\"new-todo\">"
},
"can add a todo, type and compare entire store": {
"1": {
"loading": false,
"todos": [
{
"title": "a random todo",
"completed": false,
"id": "1"
}
],
"newTodo": "learn how to test with Cypress.io"
}
},
"can add a particular todo": {
"1": [
{
"title": "a single todo 1",
"completed": false,
"id": "2"
}
]
},
"can add two todos and delete one": {
"1": [
{
"title": "todo 2",
"completed": false,
"id": "4"
}
]
},
"can be driven by dispatching actions": {
"1": {
"loading": false,
"todos": [
{
"title": "a new todo",
"completed": false,
"id": "1"
}
],
"newTodo": ""
}
}
},
"Store actions": {
"changes the state": {
"1": {
"loading": false,
"todos": [],
"newTodo": ""
}
},
"changes the state after delay": {
"1": {
"loading": false,
"todos": [
{
"title": "a new todo",
"completed": false,
"id": "1"
}
],
"newTodo": ""
}
},
"calls server": {
"1": {
"title": "a new todo",
"completed": false,
"id": "1"
}
},
"calls server with delay": {
"1": {
"title": "a new todo",
"completed": false,
"id": "1"
}
}
},
"adds numbers": {
"1": 5,
"2": 11,
"negatives": -9
},
"converts string to lowercase": {
"lowercase string": "my string"
}
}