commit 16717447a40ffc6ba0701f224f0d233b0b3e8b39
parent 63c325bfb6b7e19c19492b2ecdfdda746a3e9285
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date: Tue, 17 Nov 2020 09:01:31 -0800
Fix issues with app tests on mobile devices.
Diffstat:
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/tests/test.app.js b/tests/test.app.js
@@ -67,12 +67,16 @@ describe("App", function() {
describe("StartSession method", function() {
it("Should import parameter values", function() {
// Call StartSession
- app.StartSession([1, 2, 3], 4, "test settings");
+ app.StartSession([1, 2, 3], 4, {
+ promptType: "Text", // Required to prevent browser validation alerts
+ inputType: "Text", // Required to prevent browser validation alerts
+ testSetting: "testValue",
+ });
// Assert parameters imported
expect(app.prompts).to.have.members([1, 2, 3]);
expect(app.promptIndex).to.equal(4);
- expect(app.settings).to.equal("test settings");
+ expect(app.settings.testSetting).to.equal("testValue");
});
it("Should set state to 'quizzer'", function() {
@@ -80,7 +84,11 @@ describe("App", function() {
app.state = "settings";
// Call StartSession
- app.StartSession([1, 2, 3], 4, "a", "b", "c", "d");
+ app.StartSession([1, 2, 3], 4, {
+ promptType: "Text", // Required to prevent browser validation alerts
+ inputType: "Text", // Required to prevent browser validation alerts
+ testSetting: "testValue",
+ });
// Assert parameters imported
expect(app.state).to.equal("quizzer");