-
Notifications
You must be signed in to change notification settings - Fork 0
/
todo.spec.js
103 lines (71 loc) · 2.54 KB
/
todo.spec.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
const { todoPage } = require('../pages/todo.page');
const { setState, states } = require('../utils/state-manager');
describe('todo app', () => {
before(() => {
todoPage.open();
});
// #2:
it.skip('create todo', () => {
// setup 0 todo items and navigate to the page
setState([]);
todoPage.open();
// create a todo item
// assert that there is only one item in the todo list
// assert that the list contains the created item
});
// #3:
it.skip('edit todo', () => {
// setup 1 todo items and navigate to the page
setState([states[0]]);
todoPage.open();
// edit the todo item
// assert that the title of the item has changed
});
// #4:
it.skip('delete todo', () => {
// setup 2 todo items and navigate to the page
// delete the first todo item
// assert that there is only one item in the todo list
// assert that the second todo item still exists
});
// #5:
it.skip('complete one todo', () => {
// setup 2 todo items and navigate to the page
// complete the first todo item
// assert that the first todo item has the class `completed`
});
// #6:
it.skip('show active/completed todos', () => {
// setup 2 (one completed and one uncompleted) todo items and navigate to the page
setState([{ ...states[0], completed: true }, states[1]]);
todoPage.open();
// click on the `active` button
// assert that the second todo item is shown
// click on the `completed` button
// assert that the first todo item is shown
});
// #7:
it.skip('complete all todos', () => {
// setup 4 todo items and navigate to the page
// click on the `toggle all` button (the downward facing arrow)
// assert that all todo items are completed
});
// #8:
it.skip('delete all completed todos', () => {
// setup 4 (completed) todo items and navigate to the page
// click on the `clear completed` button
// assert that there are no todo items shown
});
// #9:
it.skip('add custom command to the Browser object', () => {
// navigate to the page
// add a custom command to the Browser object
// execute the command
});
// #10:
it.skip('add custom command to the Element object', () => {
// navigate to the page
// add a custom command to the Element object
// execute the command
});
});