-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
Copy path.markbot.yml
59 lines (50 loc) · 1.52 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
repo: 'circle-colourer'
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[type="color"]'
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']
- ['.ball', 'position', 'absolute']
- ['.ball', 'width', '100px']
- ['.ball', 'height', '100px']
- ['.ball', 'border-radius', '50px']
js:
- path: 'js/main.js'
valid: true
bestPractices: true
search:
- "\\.on\\('change', function"
- "\\.css\\('background-color', "
- "\\$\\('.ball'\\)"
- "\\$\\('form'\\)"
- "\\.val\\("
functionality:
- path: 'index.html'
tests:
- |
let ball = $('.ball');
let currentColor = css(ball).backgroundColor;
let input = $('input[type="color"]');
input.value = '#fba597';
input.dispatchEvent(ev('change'));
if (currentColor == css(ball).backgroundColor) fail('The `background-color` of the ball doesn’t change when a new colour is selected from the `<input>`');
pass();