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

25 lines
711 B
TypeScript
Raw Normal View History

import { openTest, injectRuffleAndWait } from "../../utils.js";
import { expect, use } from "chai";
import chaiHtml from "chai-html";
import fs from "fs";
use(chaiHtml);
describe("iframe onload", () => {
it("loads the test", async () => {
await openTest(browser, import.meta.dirname);
});
it("runs the iframe onload event", async () => {
2023-05-30 20:24:43 +00:00
await injectRuffleAndWait(browser);
await browser.$("<div />").waitForExist();
const actual = await browser.$("#container").getHTML(false);
const expected = fs.readFileSync(
`${import.meta.dirname}/expected.html`,
"utf8",
);
expect(actual).html.to.equal(expected);
});
});