Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/babel/traverse-7.23.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jplukarski committed Jan 9, 2024
2 parents 1e28a5d + afdedb0 commit b583fd5
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 46 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# CHANGELOG

# Unreleased
# 6.0.0

- Update to node v18

- Dev Dependency Updates
- Update to TypeScript 5
- Update Chromedriver to 118

# 5.2.1

Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "[email protected]:braintree/framebus"
},
"homepage": "https://github.com/braintree/framebus",
"version": "5.2.1",
"version": "6.0.0",
"main": "dist/index.js",
"files": [
"dist/"
Expand Down Expand Up @@ -38,7 +38,7 @@
"@wdio/sync": "^7.25.2",
"async": "^3.2.4",
"browserify": "^17.0.0",
"chromedriver": "^114.0.2",
"chromedriver": "^120.0.1",
"del": "^6.0.0",
"ejs": "^3.1.8",
"eslint": "^8.35.0",
Expand Down
40 changes: 24 additions & 16 deletions spec/functional/popup-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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", () => {
Expand Down Expand Up @@ -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");
});
});
});
15 changes: 11 additions & 4 deletions spec/functional/reply-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?");
});
});
});
18 changes: 13 additions & 5 deletions spec/functional/target-frames.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
});
});

0 comments on commit b583fd5

Please sign in to comment.