web: Specify polyfill/ path specifically, so it can be other paths later
This commit is contained in:
parent
de36fc2d82
commit
dda7411589
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Flash inside frame with injected ruffle", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/classic_frames_injected`);
|
||||
});
|
||||
|
||||
it("polyfills inside a frame", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Flash inside frame with provided ruffle", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/classic_frames_provided`);
|
||||
});
|
||||
|
||||
it("polyfills inside a frame", async () => {
|
||||
|
|
|
@ -8,7 +8,7 @@ use(chaiHtml);
|
|||
// [NA] Disabled for now as the test can take too long on CI
|
||||
describe.skip("Doesn't error with cross-origin frames", () => {
|
||||
it("Loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/crossorigin_broken_cors`);
|
||||
});
|
||||
|
||||
it("Polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed tag", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_default`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed with case-insensitive MIME type", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_insensitive`);
|
||||
});
|
||||
|
||||
it("Polyfills", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed inside audio node", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_inside_audio`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed without src attribute", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_missing_src`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed without type attribute", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_missing_type`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed with unexpected string", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_unexpected_string`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed with wrong type attribute value", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_wrong_type`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Embed with Flash YouTube video", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/embed_youtube`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Flash inside iframe with injected ruffle", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/iframes_injected`);
|
||||
});
|
||||
|
||||
it("polyfills inside an iframe", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("iframe onload", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/iframes_onload`);
|
||||
});
|
||||
|
||||
it("runs the iframe onload event", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Flash inside iframe with provided ruffle", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/iframes_provided`);
|
||||
});
|
||||
|
||||
it("polyfills inside an iframe", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with case-insensitive MIME type", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_MIME_insensitive`);
|
||||
});
|
||||
|
||||
it("Polyfills", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with case-insensitive clsid", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_clsid_insensitive`);
|
||||
});
|
||||
|
||||
it("Polyfills", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with clsid and embed", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_clsid_with_embed`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with only data attribute", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_data`);
|
||||
});
|
||||
|
||||
it("Polyfills", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object tag", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_default`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with another object tag", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_double_object`);
|
||||
});
|
||||
|
||||
it("polyfills only the first tag with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object using classid with another object tag without classid", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_double_object_classid`);
|
||||
});
|
||||
|
||||
it("polyfills only the second tag with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object tag", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_flashvars`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object tag", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_flashvars_in_url`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object for old IE must work everywhere", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_ie_only`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object inside audio node", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_inside_audio`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object without data attribute", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_missing_data`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object without type attribute", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_missing_type`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object without type and classid attributes", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_missing_type_and_classid`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with unexpected string", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_unexpected_string`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with ruffle-embed tag", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_with_ruffle_embed`);
|
||||
});
|
||||
|
||||
it("already polyfilled with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with wrong type attribute value", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_wrong_type`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Object with Flash YouTube video", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/object_youtube`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("PDF object", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/pdf`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("PDF with .swf GET", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/pdf_with_get`);
|
||||
});
|
||||
|
||||
it("doesn't polyfill with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("Remove object", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/remove_object`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("SPL", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/spl`);
|
||||
});
|
||||
|
||||
it("polyfills with ruffle", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("SWF extension insensitive", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/swf_extension_insensitive`);
|
||||
});
|
||||
|
||||
it("Polyfills", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("SWF extension, file with fragment", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/swf_extension_with_fragment`);
|
||||
});
|
||||
|
||||
it("Polyfills", async () => {
|
||||
|
|
|
@ -7,7 +7,7 @@ use(chaiHtml);
|
|||
|
||||
describe("SWF extension, file with GET parameter", () => {
|
||||
it("loads the test", async () => {
|
||||
await openTest(browser, import.meta.dirname);
|
||||
await openTest(browser, `polyfill/swf_extension_with_get`);
|
||||
});
|
||||
|
||||
it("Polyfills", async () => {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import path from "path";
|
||||
import { expect } from "chai";
|
||||
import { PublicAPI, RufflePlayer } from "ruffle-core";
|
||||
|
||||
|
@ -132,13 +131,10 @@ export async function injectRuffleAndWait(browser: WebdriverIO.Browser) {
|
|||
|
||||
export async function openTest(
|
||||
browser: WebdriverIO.Browser,
|
||||
absoluteDir: string,
|
||||
directory: string,
|
||||
filename: string = "index.html",
|
||||
) {
|
||||
const dirname = path.basename(absoluteDir);
|
||||
await browser.url(
|
||||
`http://localhost:4567/test/polyfill/${dirname}/${filename}`,
|
||||
);
|
||||
await browser.url(`http://localhost:4567/test/${directory}/${filename}`);
|
||||
}
|
||||
|
||||
/** Test set-up for JS API testing. */
|
||||
|
|
Loading…
Reference in New Issue