-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui-test-_misc.js
113 lines (77 loc) · 3.01 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
const kDefaultRoute = require('./controller.js').OLSKControllerRoutes().shift();
describe('OLSKModalView_Misc', function () {
const OLSKModalViewTitleText = Math.random().toString();
const OLSKModalViewCloseText = Math.random().toString();
const OLSKModalViewIsCapped = uRandomElement(true, false);
before(function() {
return browser.OLSKVisit(kDefaultRoute, {
OLSKModalViewTitleText,
OLSKModalViewCloseText,
OLSKModalViewIsCapped,
});
});
before(function () {
return browser.pressButton('#TestOLSKModalViewShow');
});
describe('OLSKModalView', function test_OLSKModalView () {
it.skip('sets aria-hidden', function () {
return browser.assert.attribute(OLSKModalView, 'aria-hidden', 'true');
});
it('binds OLSKModalViewContent', function () {
return browser.assert.text('.OLSKStandardViewBody', 'TestOLSKModalViewContent');
});
context('OLSKModalViewIsCapped', function () {
it('classes OLSKModalViewCapped', function () {
return OLSKModalViewIsCapped ? browser.assert.hasClass(OLSKModalView, 'OLSKModalViewCapped') : browser.assert.hasNoClass(OLSKModalView, 'OLSKModalViewCapped');
});
});
});
describe('OLSKModalViewTitle', function test_OLSKModalViewTitle () {
it('binds OLSKModalViewTitleText', function () {
return browser.assert.text(OLSKModalViewTitle, OLSKModalViewTitleText);
});
});
describe('OLSKModalViewCloseButton', function test_OLSKModalViewCloseButton () {
it('binds OLSKModalViewCloseText', function () {
return browser.assert.text(OLSKModalViewCloseButton, OLSKModalViewCloseText);
});
});
describe('OLSKModalViewHead', function test_OLSKModalViewHead () {
it('classes OLSKToolbar', function () {
return browser.assert.hasClass(OLSKModalViewHead, 'OLSKToolbar');
});
it('classes OLSKToolbarJustify', function () {
return browser.assert.hasClass(OLSKModalViewHead, 'OLSKToolbarJustify');
});
it('classes OLSKCommonEdgeBottom', function () {
return browser.assert.hasClass(OLSKModalViewHead, 'OLSKCommonEdgeBottom');
});
});
describe('OLSKModalViewCloseButton', function test_OLSKModalViewCloseButton () {
it('classes OLSKDecorButtonNoStyle', function () {
return browser.assert.hasClass(OLSKModalViewCloseButton, 'OLSKDecorButtonNoStyle');
});
it('classes OLSKDecorTappable', function () {
return browser.assert.hasClass(OLSKModalViewCloseButton, 'OLSKDecorTappable');
});
context('click', function () {
before(function () {
return browser.pressButton(OLSKModalViewCloseButton);
});
it('sends OLSKModalViewDidClose', function () {
return browser.assert.text('#TestOLSKModalViewDidClose', '1');
});
context('Escape', function () {
before(function () {
return browser.pressButton('#TestOLSKModalViewShow');
});
before(function () {
return browser.OLSKFireKeyboardEvent(browser.window, 'Escape');
});
it.skip('sends OLSKModalViewDidClose', function () {
return browser.assert.text('#TestOLSKModalViewDidClose', '2');
});
});
});
});
});