-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
.markbot.yml
77 lines (63 loc) · 1.94 KB
/
.markbot.yml
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
repo: "simple-to-do-list"
naming: true
restrictFileTypes: true
liveWebsite: true
git:
numCommits: 2
allCommitted: true
allSynced: true
html:
- path: "index.html"
valid: true
bestPractices: true
has:
- 'script[src*="jquery"]'
- 'script[src="js/main.js"]'
- "form"
- "form label[for]"
- "form input"
- 'form button[type="submit"]'
- 'ul'
css:
- path: "css/main.css"
valid: true
bestPractices: true
has:
- ['html', 'box-sizing', 'border-box', 'The `border-box` layout model is needed for this assignment—use the `borderbox` snippet']
- ['*', 'box-sizing', 'inherit', 'The `border-box` layout model is needed for this assignment—use the `borderbox` snippet']
search:
- "line-through"
js:
- path: "js/main.js"
valid: true
bestPractices: true
search:
- "\\.on\\('submit', function"
- "\\.on\\('click', 'li', function"
- "\\.toggleClass\\("
- "\\.preventDefault\\(\\)"
- "\\$\\('form'\\)"
- "\\$\\('<li>'\\)"
- "\\.html\\("
- "\\.append\\("
- "\\.val\\("
- "\\.val\\(''\\)"
functionality:
- path: "index.html"
tests:
- |
let ul = $('ul');
let input = $('input');
let form = $('form');
if (ul.innerHTML.trim() != '') fail('The <ul> should be empty');
input.value = 'Books';
form.dispatchEvent(ev('submit'));
if ($('li:last-child').innerHTML != 'Books') fail('The new to-do doesn’t match what was written in the <input>');
pass();
- |
let li = $('li:first-child');
li.dispatchEvent(ev('click'));
if (css(li).textDecoration != 'line-through') fail('The to-do item doesn’t get a line-through when clicked');
li.dispatchEvent(ev('click'));
if (css(li).textDecoration == 'line-through') fail('The to-do item’s line-through isn’t removed when clicking a second time');
pass();