-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui-test-_misc.js
67 lines (46 loc) · 1.85 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
const kDefaultRoute = require('./controller.js').OLSKControllerRoutes().shift();
describe('OLSKTube_Misc', function () {
const ParamPlaylist = Math.random().toString();
const ParamAutoplay = uRandomElement(true, false);
before(function() {
return browser.OLSKVisit(kDefaultRoute, {
ParamPlaylist,
ParamAutoplay,
});
});
describe('OLSKTube', function test_OLSKTube() {
it('classes OLSKDecor', function () {
return browser.assert.hasClass(OLSKTube, 'OLSKDecor');
});
it('sets lang', function () {
return browser.assert.attribute(OLSKTube, 'lang', 'en');
});
});
describe('OLSKTubeEmbed', function test_OLSKTubeEmbed () {
it('sets id', function () {
return browser.assert.attribute(OLSKTubeEmbed, 'id', 'youtube-player');
});
it('sets allow', function () {
return browser.assert.attribute(OLSKTubeEmbed, 'allow', `accelerometer; ${ ParamAutoplay ? 'autoplay; ' : '' }clipboard-write; encrypted-media; gyroscope; picture-in-picture`);
});
it('sets src', function () {
return browser.assert.attribute(OLSKTubeEmbed, 'src', `https://www.youtube-nocookie.com/embed/videoseries?rel=0&enablejsapi=1&list=${ ParamPlaylist }&modestbranding=1${ ParamAutoplay ? '&autoplay=1' : '' }`);
});
});
describe('OLSKTubeButtonsPrevious', function test_OLSKTubeButtonsPrevious () {
it('classes OLSKDecorPressCall', function () {
return browser.assert.hasClass(OLSKTubeButtonsPrevious, 'OLSKDecorPressCall');
});
it('sets text', function () {
return browser.assert.text(OLSKTubeButtonsPrevious, 'back');
});
});
describe('OLSKTubeButtonsNext', function test_OLSKTubeButtonsNext () {
it('classes OLSKDecorPressCall', function () {
return browser.assert.hasClass(OLSKTubeButtonsNext, 'OLSKDecorPressCall');
});
it('sets text', function () {
return browser.assert.text(OLSKTubeButtonsNext, 'next / zap');
});
});
});