ruffle/web/packages/selfhosted/test/polyfill/object_ie_only/test.ts

30 lines
884 B
TypeScript

import { injectRuffleAndWait, openTest, playAndMonitor } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";
use(chaiHtml);
describe("Object for old IE must work everywhere", () => {
it("loads the test", async () => {
await openTest(browser, `polyfill/object_ie_only`);
});
it("polyfills with ruffle", async () => {
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
);
expect(actual).html.to.equal(expected);
});
it("Plays a movie", async () => {
await playAndMonitor(
browser,
await browser.$("#test-container").$("<ruffle-object />"),
);
});
});