-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ui-test-_access.js
112 lines (81 loc) · 2.71 KB
/
ui-test-_access.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
const kDefaultRoute = require('./ui-behaviour.js').OLSKControllerRoutes().APRVitrineRoute;
Object.entries({
APRVitrine: '.APRVitrine',
APRVitrineList: '.APRVitrineList',
APRVitrineBlurb: '.APRVitrineBlurb',
APRVitrineJoin: '.APRVitrineJoin',
APRVitrineRandomLink: '.APRVitrineRandomLink',
APRVitrineInfoLink: '.APRVitrineInfoLink',
APRRandom: '.APRRandom',
APRRandomTitle: '.APRRandomTitle',
APRRandomBlurb: '.APRRandomBlurb',
APRRandomRedirecting: '.APRRandomRedirecting',
APRRandomTargetDomain: '.APRRandomTargetDomain',
APRRandomTargetName: '.APRRandomTargetName',
APRRandomTargetBlurb: '.APRRandomTargetBlurb',
APRRandomRefresh: 'meta[http-equiv="refresh"]',
APRRandomDirectoryLink: '.APRRandomDirectoryLink',
}).map(function (e) {
return global[e.shift()] = e.pop();
});
describe('APRVitrine_Access', function () {
before(function() {
return browser.OLSKVisit(kDefaultRoute);
});
it('shows APRVitrine', function() {
browser.assert.elements(APRVitrine, 1);
});
it('shows APRVitrineList', function () {
browser.assert.elements(APRVitrineList, 1);
});
it('shows APRVitrineBlurb', function () {
browser.assert.elements(APRVitrineBlurb, 1);
});
it('shows APRVitrineJoin', function () {
browser.assert.elements(APRVitrineJoin, 1);
});
it('shows APRVitrineRandomLink', function () {
browser.assert.elements(APRVitrineRandomLink, 1);
});
it('shows APRVitrineInfoLink', function () {
browser.assert.elements(APRVitrineInfoLink, 1);
});
it('hides APRRandom', function () {
browser.assert.elements(APRRandom, 0);
});
context('APRRandomRoute', function () {
before(function() {
return browser.OLSKVisit(require('./ui-behaviour.js').OLSKControllerRoutes().APRRandomRoute);
});
it('hides APRVitrine', function() {
browser.assert.elements(APRVitrine, 0);
});
it('shows APRRandom', function () {
browser.assert.elements(APRRandom, 1);
});
it('shows APRRandomTitle', function () {
browser.assert.elements(APRRandomTitle, 1);
});
it('shows APRRandomBlurb', function () {
browser.assert.elements(APRRandomBlurb, 1);
});
it('shows APRRandomRedirecting', function () {
browser.assert.elements(APRRandomRedirecting, 1);
});
it('shows APRRandomTargetDomain', function () {
browser.assert.elements(APRRandomTargetDomain, 1);
});
it('shows APRRandomTargetName', function () {
browser.assert.elements(APRRandomTargetName, 1);
});
it('shows APRRandomTargetBlurb', function () {
browser.assert.elements(APRRandomTargetBlurb, 1);
});
it('shows APRRandomRefresh', function () {
browser.assert.elements(APRRandomRefresh, 1);
});
it('shows APRRandomDirectoryLink', function () {
browser.assert.elements(APRRandomDirectoryLink, 1);
});
});
});