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

30 lines
884 B
TypeScript
Raw Normal View History

import { injectRuffleAndWait, openTest, playAndMonitor } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";
2020-05-23 09:43:22 +00:00
use(chaiHtml);
2020-09-05 18:36:44 +00:00
describe("Object with unexpected string", () => {
it("loads the test", async () => {
await openTest(browser, `polyfill/object_unexpected_string`);
2020-05-23 09:43:22 +00:00
});
it("polyfills with ruffle", async () => {
2023-05-30 20:24:43 +00:00
await injectRuffleAndWait(browser);
const actual = await browser.$("#test-container").getHTML(false);
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
);
2020-05-23 09:43:22 +00:00
expect(actual).html.to.equal(expected);
});
it("Plays a movie", async () => {
2023-05-30 20:24:43 +00:00
await playAndMonitor(
browser,
2023-07-20 11:19:39 +00:00
await browser.$("#test-container").$("<ruffle-embed />"),
);
});
2020-05-23 09:43:22 +00:00
});