-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathui-test-_localize.js
52 lines (36 loc) · 1.61 KB
/
ui-test-_localize.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
const kDefaultRoute = require('./controller.js').OLSKControllerRoutes().shift();
kDefaultRoute.OLSKRouteLanguageCodes.forEach(function (OLSKRoutingLanguage) {
const uLocalized = function (inputData) {
return OLSKTestingLocalized(inputData, OLSKRoutingLanguage);
};
describe('OLSKAppFeatureList_Localize-' + OLSKRoutingLanguage, function () {
before(function() {
return browser.OLSKVisit(kDefaultRoute, {
OLSKRoutingLanguage,
});
});
uLocalized('OLSKAppFeatureListArray').forEach(function ([name, blurb], i) {
it('localizes KOMVitrineStandardFeaturesItem', function () {
return browser.assert.text(`.OLSKFeatureListItem:nth-child(${ i + 1 }) .OLSKFeatureListItemName`, name);
});
it('localizes KOMVitrineStandardFeaturesBlurb', function () {
return browser.assert.OLSKInnerHTML(`.OLSKFeatureListItem:nth-child(${ i + 1 }) .OLSKFeatureListItemBlurb`, blurb);
});
});
context('OLSKAppFeatureListRepoURL', function () {
const OLSKAppFeatureListRepoURL = Math.random().toString();
before(function() {
return browser.OLSKVisit(kDefaultRoute, {
OLSKRoutingLanguage,
OLSKAppFeatureListRepoURL,
});
});
it('localizes OLSKAppFeatureOpenSourceName', function () {
return browser.assert.text(OLSKAppFeatureOpenSourceName, uLocalized('OLSKAppFeatureOpenSourceNameText'));
});
it('localizes OLSKAppFeatureOpenSourceBlurb', function () {
return browser.assert.OLSKInnerHTML(OLSKAppFeatureOpenSourceBlurb, require('OLSKString').OLSKStringFormatted(uLocalized('OLSKAppFeatureOpenSourceBlurbFormat'), OLSKAppFeatureListRepoURL));
});
});
});
});