2024-04-04 21:01:36 +00:00
|
|
|
import { injectRuffleAndWait, openTest } 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("Embed with unexpected string", () => {
|
2021-08-21 14:34:08 +00:00
|
|
|
it("loads the test", async () => {
|
2024-04-04 21:01:36 +00:00
|
|
|
await openTest(browser, import.meta.dirname);
|
2020-05-23 09:43:22 +00:00
|
|
|
});
|
|
|
|
|
2021-08-21 14:34:08 +00:00
|
|
|
it("polyfills with ruffle", async () => {
|
2023-05-30 20:24:43 +00:00
|
|
|
await injectRuffleAndWait(browser);
|
2021-08-21 14:34:08 +00:00
|
|
|
const actual = await browser.$("#test-container").getHTML(false);
|
2024-04-04 21:01:36 +00:00
|
|
|
const expected = fs.readFileSync(
|
|
|
|
`${import.meta.dirname}/expected.html`,
|
|
|
|
"utf8",
|
|
|
|
);
|
2020-05-23 09:43:22 +00:00
|
|
|
expect(actual).html.to.equal(expected);
|
|
|
|
});
|
|
|
|
});
|