Skip to content

Commit 5e8592f

Browse files
committed
revert changes to exporter test
1 parent 3728845 commit 5e8592f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/spec/core/exporter-spec.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ describe("Core - exporter", () => {
77

88
async function getExportedDoc(ops) {
99
const doc = await makeRSDoc(ops);
10-
11-
doc.getElementById("respec-pill").click();
12-
doc.getElementById("respec-button-export").click();
13-
await new Promise(res => setTimeout(res, 100)); // XXX
14-
const dataURL = doc.getElementById("respec-save-as-html").href;
15-
10+
const dataURL = await new Promise(resolve => {
11+
doc.defaultView.require(["core/exporter"], ({ rsDocToDataURL }) =>
12+
resolve(rsDocToDataURL("text/html", doc))
13+
);
14+
});
1615
const docString = decodeURIComponent(dataURL).replace(
1716
"data:text/html;charset=utf-8,",
1817
""

0 commit comments

Comments
 (0)