Skip to content

Commit a38ea11

Browse files
committed
fix: E2e test & runtime
1 parent 9bf75fd commit a38ea11

2 files changed

Lines changed: 13 additions & 9 deletions

File tree

test/fixtures/e2e/runtime/test/qunit/Configuration.qunit.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ sap.ui.define([
2929
});
3030

3131
QUnit.test("getCalendarType", function (assert) {
32-
assert.ok(Configuration.getCalendarType() instanceof CalendarType, "The result from getCalendarType() is a CalendarType instance");
33-
assert.ok(globalConfiguration.getCalendarType() instanceof CalendarType, "The result from getCalendarType() is a CalendarType instance");
34-
assert.ok(sap.ui.getCore().getConfiguration().getCalendarType() instanceof CalendarType, "The result from getCalendarType() is a CalendarType instance");
32+
var list = CalendarType;
33+
assert.ok(list[Configuration.getCalendarType()], "The result from getCalendarType() is a CalendarType instance");
34+
assert.ok(list[globalConfiguration.getCalendarType()], "The result from getCalendarType() is a CalendarType instance");
35+
assert.ok(list[sap.ui.getCore().getConfiguration().getCalendarType()], "The result from getCalendarType() is a CalendarType instance");
3536
});
3637

3738
QUnit.test("getCalendarWeekNumbering", function (assert) {
38-
assert.ok(Configuration.getCalendarWeekNumbering() instanceof CalendarWeekNumbering, "The result from getCalendarWeekNumbering() is a CalendarWeekNumbering instance");
39-
assert.ok(globalConfiguration.getCalendarWeekNumbering() instanceof CalendarWeekNumbering, "The result from getCalendarWeekNumbering() is a CalendarWeekNumbering instance");
40-
assert.ok(sap.ui.getCore().getConfiguration().getCalendarWeekNumbering() instanceof CalendarWeekNumbering, "The result from getCalendarWeekNumbering() is a CalendarWeekNumbering instance");
39+
var list = CalendarWeekNumbering;
40+
assert.ok(list[Configuration.getCalendarWeekNumbering()], "The result from getCalendarWeekNumbering() is a CalendarWeekNumbering instance");
41+
assert.ok(list[globalConfiguration.getCalendarWeekNumbering()], "The result from getCalendarWeekNumbering() is a CalendarWeekNumbering instance");
42+
assert.ok(list[sap.ui.getCore().getConfiguration().getCalendarWeekNumbering()], "The result from getCalendarWeekNumbering() is a CalendarWeekNumbering instance");
4143
});
4244

4345
QUnit.test("getFrameOptions", function (assert) {
@@ -101,9 +103,10 @@ sap.ui.define([
101103
});
102104

103105
QUnit.test("AnimationMode", function (assert) {
104-
assert.ok(Configuration.getAnimationMode() instanceof Configuration.AnimationMode, "The result from getAnimationMode() is an AnimationMode instance");
105-
assert.ok(globalConfiguration.getAnimationMode() instanceof Configuration.AnimationMode, "The result from getAnimationMode() is an AnimationMode instance");
106-
assert.ok(sap.ui.getCore().getConfiguration().getAnimationMode() instanceof Configuration.AnimationMode, "The result from getAnimationMode() is an AnimationMode instance");
106+
var list = Configuration.AnimationMode;
107+
assert.ok(list[Configuration.getAnimationMode()], "The result from getAnimationMode() is an AnimationMode instance");
108+
assert.ok(list[globalConfiguration.getAnimationMode()], "The result from getAnimationMode() is an AnimationMode instance");
109+
assert.ok(list[sap.ui.getCore().getConfiguration().getAnimationMode()], "The result from getAnimationMode() is an AnimationMode instance");
107110

108111
Configuration.setAnimationMode(Configuration.AnimationMode.minimal);
109112
assert.strictEqual(globalConfiguration.getAnimationMode(), Configuration.AnimationMode.minimal, "The animation mode is set to minimal");

test/fixtures/e2e/runtime/test/qunit/testsuite.qunit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ sap.ui.define(() => {
1212
}
1313
},
1414
tests: {
15+
"Configuration": {},
1516
"Globals": {},
1617
"jQuery.sap.charToUpperCase": {},
1718
"jQuery.sap.endsWith": {},

0 commit comments

Comments
 (0)