31 lines
852 B
JavaScript
31 lines
852 B
JavaScript
const {
|
|
injectRuffleAndWait,
|
|
openTest,
|
|
playAndMonitor,
|
|
} = require("../../utils");
|
|
const { expect, use } = require("chai");
|
|
const chaiHtml = require("chai-html");
|
|
const fs = require("fs");
|
|
|
|
use(chaiHtml);
|
|
|
|
describe("Object for old IE must work everywhere", () => {
|
|
it("loads the test", async () => {
|
|
await openTest(browser, __dirname);
|
|
});
|
|
|
|
it("polyfills with ruffle", async () => {
|
|
await injectRuffleAndWait(browser);
|
|
const actual = await browser.$("#test-container").getHTML(false);
|
|
const expected = fs.readFileSync(`${__dirname}/expected.html`, "utf8");
|
|
expect(actual).html.to.equal(expected);
|
|
});
|
|
|
|
it("Plays a movie", async () => {
|
|
await playAndMonitor(
|
|
browser,
|
|
await browser.$("#test-container").$("<ruffle-object />")
|
|
);
|
|
});
|
|
});
|