-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy path.markbot.yml
65 lines (54 loc) · 1.73 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
repo: 'circle-maker'
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"]'
hasNot:
- ['body :not(script)', 'The `<script>` tag should be the only tag inside `<body>` — no other HTML is needed']
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\\('keydown', function"
- "\\.css\\('left', "
- "\\.css\\('top', "
- 'Math\.random\(\)'
- "\\$\\('body'\\)"
- "\\$\\('html'\\)"
- "\\$\\('<div>'\\)"
- '\.append\('
functionality:
- path: 'index.html'
tests:
- |
let ball, ball2;
$('html').dispatchEvent(ev('keydown'));
ball = $('.ball');
if (!ball) fail('A ball isn’t added to the screen when a key is pressed');
$('html').dispatchEvent(ev('keydown'));
ball2 = $('.ball:last-child');
if (!ball2) fail('A second ball isn’t added to the screen when a key is pressed again');
if (css(ball).left == css(ball2).left) fail('The location of the balls isn’t randomized');
pass();