Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: Update WebdriverIO to 9.2.2, resolving advisory in ws #17539

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,733 changes: 2,993 additions & 3,740 deletions web/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"@eslint/js": "^9.13.0",
"@types/eslint__js": "^8.42.3",
"@wdio/browserstack-service": "^9.2.2",
"@wdio/cli": "^8.40.2",
"@wdio/local-runner": "^8.40.2",
"@wdio/cli": "^9.2.2",
"@wdio/local-runner": "^9.2.2",
"@wdio/mocha-framework": "^9.2.2",
"@wdio/spec-reporter": "^9.2.2",
"@wdio/static-server-service": "^9.2.2",
Expand All @@ -38,7 +38,7 @@
"typedoc-plugin-mdn-links": "^3.3.5",
"typescript": "^5.6.3",
"typescript-eslint": "^8.11.0",
"webdriverio": "^8.40.0",
"webdriverio": "^9.2.2",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function supportsClipboardReadText(): Promise<boolean> {
});
}

async function focusFlashInput(player: WebdriverIO.Element) {
async function focusFlashInput(player: ChainablePromiseElement) {
await player.click({ x: 10 - 200, y: 110 - 200 });
expect(await getTraceOutput(browser, player)).to.equal(
"onMouseDown()\nonMouseUp()\n",
Expand All @@ -35,16 +35,16 @@ async function focusHtmlInput() {
});
}

async function openContextMenu(player: WebdriverIO.Element) {
async function openContextMenu(player: ChainablePromiseElement) {
await player.click({ x: 10 - 200, y: 10 - 200, button: "right" });
}

async function openContextMenuOnInput(player: WebdriverIO.Element) {
async function openContextMenuOnInput(player: ChainablePromiseElement) {
await player.click({ x: 10 - 200, y: 110 - 200, button: "right" });
}

async function clickContextMenuEntry(
player: WebdriverIO.Element,
player: ChainablePromiseElement,
text: string,
button: string = "left",
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import chaiHtml from "chai-html";

use(chaiHtml);

async function focusElement(element: WebdriverIO.Element) {
async function focusElement(element: ChainablePromiseElement) {
await browser.execute((element) => {
const el = element as unknown as HTMLElement;
el.focus();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ describe("Flash inside frame with injected ruffle", () => {

it("polyfills inside a frame", async () => {
await injectRuffleAndWait(browser);
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand All @@ -30,16 +32,18 @@ describe("Flash inside frame with injected ruffle", () => {
});

// Then reload
await browser.switchToFrame(null);
await browser.switchToFrame(await browser.$("#nav-frame"));
await browser.switchFrame(null);
await browser.switchFrame(await browser.$("#nav-frame"));
await browser.$("#reload-link").click();

// And finally, check
await browser.switchToFrame(null);
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(null);
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ describe("Flash inside frame with provided ruffle", () => {
});

it("polyfills inside a frame", async () => {
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand All @@ -29,16 +31,18 @@ describe("Flash inside frame with provided ruffle", () => {
});

// Then reload
await browser.switchToFrame(null);
await browser.switchToFrame(await browser.$("#nav-frame"));
await browser.switchFrame(null);
await browser.switchFrame(await browser.$("#nav-frame"));
await browser.$("#reload-link").click();

// And finally, check
await browser.switchToFrame(null);
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(null);
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
4 changes: 3 additions & 1 deletion web/packages/selfhosted/test/polyfill/embed_default/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Embed tag", () => {

it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ describe("Embed with case-insensitive MIME type", () => {
await injectRuffleAndWait(browser);
await browser.$("<ruffle-embed />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Embed inside audio node", () => {

it("doesn't polyfill with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Embed without src attribute", () => {

it("doesn't polyfill with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Embed without type attribute", () => {

it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Embed with unexpected string", () => {

it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Embed with wrong type attribute value", () => {

it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
4 changes: 3 additions & 1 deletion web/packages/selfhosted/test/polyfill/embed_youtube/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Embed with Flash YouTube video", () => {

it("doesn't polyfill with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
16 changes: 10 additions & 6 deletions web/packages/selfhosted/test/polyfill/iframes_injected/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ describe("Flash inside iframe with injected ruffle", () => {

it("polyfills inside an iframe", async () => {
await injectRuffleAndWait(browser);
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand All @@ -30,15 +32,17 @@ describe("Flash inside iframe with injected ruffle", () => {
});

// Then reload
await browser.switchToFrame(null);
await browser.switchFrame(null);
await browser.$("#reload-link").click();

// And finally, check
await browser.switchToFrame(null);
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(null);
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
4 changes: 3 additions & 1 deletion web/packages/selfhosted/test/polyfill/iframes_onload/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ describe("iframe onload", () => {
await injectRuffleAndWait(browser);
await browser.$("<div />").waitForExist();

const actual = await browser.$("#container").getHTML(false);
const actual = await browser
.$("#container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
16 changes: 10 additions & 6 deletions web/packages/selfhosted/test/polyfill/iframes_provided/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ describe("Flash inside iframe with provided ruffle", () => {
});

it("polyfills inside an iframe", async () => {
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand All @@ -29,15 +31,17 @@ describe("Flash inside iframe with provided ruffle", () => {
});

// Then reload
await browser.switchToFrame(null);
await browser.switchFrame(null);
await browser.$("#reload-link").click();

// And finally, check
await browser.switchToFrame(null);
await browser.switchToFrame(await browser.$("#test-frame"));
await browser.switchFrame(null);
await browser.switchFrame(await browser.$("#test-frame"));
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ describe("Object with case-insensitive MIME type", () => {
await injectRuffleAndWait(browser);
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ describe("Object with case-insensitive clsid", () => {
await injectRuffleAndWait(browser);
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Object with clsid and embed", () => {

it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
4 changes: 3 additions & 1 deletion web/packages/selfhosted/test/polyfill/object_data/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ describe("Object with only data attribute", () => {
await injectRuffleAndWait(browser);
await browser.$("<ruffle-object />").waitForExist();

const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
4 changes: 3 additions & 1 deletion web/packages/selfhosted/test/polyfill/object_default/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Object tag", () => {

it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Object with another object tag", () => {

it("polyfills only the first tag with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Object using classid with another object tag without classid", () => {

it("polyfills only the second tag with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("Object tag", () => {

it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const actual = await browser
.$("#test-container")
.getHTML({ includeSelectorTag: false, pierceShadowRoot: false });
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
Expand Down
Loading