-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathui-test-_misc.js
115 lines (77 loc) · 2.84 KB
/
ui-test-_misc.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
113
114
115
const mod = require('./ui-behaviour.js');
const kDefaultRoute = mod.OLSKControllerRoutes().APRVitrineRoute;
describe('APRVitrine_Misc', function () {
before(function() {
return browser.OLSKVisit(kDefaultRoute);
});
it('sets lang', function() {
browser.assert.attribute('html', 'lang', 'en');
});
it('sets encoding', function () {
browser.assert.attribute('meta[http-equiv="Content-Type"]', 'content', 'text/html; charset=utf-8');
});
it('sets width', function () {
browser.assert.attribute('meta[name="viewport"]', 'content', 'width=device-width');
});
it('sets og:image', function () {
browser.assert.attribute('link[rel="apple-touch-icon"]', 'href', 'https://static.rosano.ca/swar/touch.png');
});
it('sets og:image', function () {
browser.assert.attribute('meta[property="og:image"]', 'content', 'https://static.rosano.ca/swar/touch.png');
});
it('sets title', function() {
browser.assert.text('title', 'Appring');
});
describe('APRVitrineRandomLink', function test_APRVitrineRandomLink () {
it('sets text', function () {
browser.assert.text(APRVitrineRandomLink, 'Random');
});
it('sets href', function () {
browser.assert.attribute(APRVitrineRandomLink, 'href', '#' + mod.APRVitrineRandomAnchor());
});
it('classes APRNoScriptHide', function () {
browser.assert.hasClass(APRVitrineRandomLink, 'APRNoScriptHide');
});
});
describe('APRVitrineInfoLink', function test_APRVitrineInfoLink () {
it('sets text', function () {
browser.assert.text(APRVitrineInfoLink, 'More info');
});
it('sets href', function () {
browser.assert.attribute(APRVitrineInfoLink, 'href', 'https://github.com/0dataapp/small-web-app-ring');
});
});
context('APRRandomRoute', function () {
before(function() {
return browser.OLSKVisit(mod.OLSKControllerRoutes().APRRandomRoute);
});
describe('APRRandom', function test_APRRandom () {
it('classes APRNoScriptHide', function () {
browser.assert.hasClass(APRRandom, 'APRNoScriptHide');
});
});
describe('APRRandomTitle', function test_APRRandomTitle () {
it('sets text', function () {
browser.assert.text(APRRandomTitle, 'Doorless App Ring');
});
});
describe('APRRandomBlurb', function test_APRRandomBlurb () {
it('sets text', function () {
browser.assert.text(APRRandomBlurb, 'A webring for web apps');
});
});
describe('APRRandomRedirecting', function test_APRRandomRedirecting () {
it('sets text', function () {
browser.assert.text(APRRandomRedirecting, 'Redirecting to');
});
});
describe('APRRandomDirectoryLink', function test_APRRandomDirectoryLink () {
it('sets text', function () {
browser.assert.text(APRRandomDirectoryLink, 'Directory');
});
it('sets href', function () {
browser.assert.attribute(APRRandomDirectoryLink, 'href', '#');
});
});
});
});