diff --git a/CHANGELOG.md b/CHANGELOG.md index 10406eb..cdb01cd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Dev Dependency Updates - Update to TypeScript 5 + - Update Chromedriver to 118 # 5.2.1 diff --git a/package-lock.json b/package-lock.json index a43970e..5a5d311 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3968,9 +3968,9 @@ } }, "chromedriver": { - "version": "114.0.3", - "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-114.0.3.tgz", - "integrity": "sha512-Qy5kqsAUrCDwpovM5pIWFkb3X3IgJLoorigwFEDgC1boL094svny3N7yw06marJHAuyX4CE/hhd25RarIcKvKg==", + "version": "118.0.1", + "resolved": "https://registry.npmjs.org/chromedriver/-/chromedriver-118.0.1.tgz", + "integrity": "sha512-GlGfyRE47IuSJnuadIiDy89EMDMQFBVWxUmiclLJKzQhFsiWAtcIr/mNOxjljZdsw9IwIOQEkrB9wympKYFPLw==", "dev": true, "requires": { "@testim/chrome-version": "^1.1.3", diff --git a/package.json b/package.json index cf06b35..2810e53 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@wdio/sync": "^7.25.2", "async": "^3.2.4", "browserify": "^17.0.0", - "chromedriver": "^114.0.2", + "chromedriver": "^118.0.1", "del": "^6.0.0", "ejs": "^3.1.8", "eslint": "^8.35.0", diff --git a/spec/functional/popup-spec.js b/spec/functional/popup-spec.js index 7a5709a..00fd90d 100644 --- a/spec/functional/popup-spec.js +++ b/spec/functional/popup-spec.js @@ -35,10 +35,12 @@ describe("Popup Events", () => { timeout: 1000, } ); - const actual = $("p").getText(); - - expect($$("p").length).toBe(1); - expect(actual).toBe(expected); + $("p") + .getText() + .then((actual) => { + expect($$("p").length).toBe(1); + expect(actual).toBe(expected); + }); }); it("should be able to send events to opener frames", () => { @@ -71,10 +73,12 @@ describe("Popup Events", () => { timeout: 1000, } ); - const actual = $("p").getText(); - - expect($$("p").length).toBe(1); - expect(actual).toContain(expected); + $("p") + .getText() + .then((actual) => { + expect($$("p").length).toBe(1); + expect(actual).toContain(expected); + }); }); it("should not double-receive events in popups", () => { @@ -107,10 +111,12 @@ describe("Popup Events", () => { timeout: 1000, } ); - const actual = $("p").getText(); - - expect($$("p").length).toBe(1); - expect(actual).not.toContain("FAILURE"); + $("p") + .getText() + .then((actual) => { + expect($$("p").length).toBe(1); + expect(actual).not.toContain("FAILURE"); + }); }); it("should be able to receive messages from opener window", () => { @@ -141,9 +147,11 @@ describe("Popup Events", () => { timeout: 1000, } ); - const actual = $("p").getText(); - - expect($$("p").length).toBe(1); - expect(actual).not.toContain("FAILURE"); + $("p") + .getText() + .then((actual) => { + expect($$("p").length).toBe(1); + expect(actual).not.toContain("FAILURE"); + }); }); }); diff --git a/spec/functional/reply-spec.js b/spec/functional/reply-spec.js index 86d7969..9192b4e 100644 --- a/spec/functional/reply-spec.js +++ b/spec/functional/reply-spec.js @@ -41,9 +41,16 @@ describe("Reply Events", () => { browser.switchToFrame(2); const frame3ReceivedQuestion = $("p").getText(); - expect(indexReceived).toBe(0); - expect(frame1Received).toBe(0); - expect(frame2Received).toBe(0); - expect(frame3ReceivedQuestion).toBe("are you there?"); + Promise.all([ + indexReceived, + frame1Received, + frame2Received, + frame3ReceivedQuestion, + ]).then(() => { + expect(indexReceived).toBe(0); + expect(frame1Received).toBe(0); + expect(frame2Received).toBe(0); + expect(frame3ReceivedQuestion).toBe("are you there?"); + }); }); }); diff --git a/spec/functional/target-frames.js b/spec/functional/target-frames.js index 8299b07..891e223 100644 --- a/spec/functional/target-frames.js +++ b/spec/functional/target-frames.js @@ -38,10 +38,18 @@ describe("targetFrames Events", () => { browser.switchToFrame(2); const frame3ReceivedQuestion = $$("p").length; - expect(indexReceived).toBe(1); - expect(innerframe1Received).toBe(0); - expect(frame1Received).toBe(0); - expect(frame2Received).toBe(0); - expect(frame3ReceivedQuestion).toBe(0); + Promise.all([ + indexReceived, + innerframe1Received, + frame1Received, + frame2Received, + frame3ReceivedQuestion, + ]).then(() => { + expect(indexReceived).toBe(1); + expect(innerframe1Received).toBe(0); + expect(frame1Received).toBe(0); + expect(frame2Received).toBe(0); + expect(frame3ReceivedQuestion).toBe(0); + }); }); });