Merge pull request from GHSA-vw39-6w7q-gfx5

Co-authored-by: Robin Ward <robin.ward@gmail.com>
This commit is contained in:
Mark VanLandingham
2020-02-27 11:47:15 -06:00
committed by GitHub
parent 87f15f9ed6
commit 337b823ec6
5 changed files with 53 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
import componentTest from "helpers/component-test";
moduleForComponent("iframed-html", { integration: true });
componentTest("appends the html into the iframe", {
template: `{{iframed-html html="<h1 id='find-me'>hello</h1>" className='this-is-an-iframe'}}`,
async test(assert) {
const iframe = find("iframe.this-is-an-iframe");
assert.equal(iframe.length, 1, "inserts an iframe");
assert.ok(
iframe[0].classList.contains("this-is-an-iframe"),
"Adds className to the iframes classList"
);
assert.equal(
iframe[0].contentWindow.document.body.querySelectorAll("#find-me").length,
1,
"inserts the passed in html into the iframe"
);
}
});