We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3728845 commit 5e8592fCopy full SHA for 5e8592f
tests/spec/core/exporter-spec.js
@@ -7,12 +7,11 @@ describe("Core - exporter", () => {
7
8
async function getExportedDoc(ops) {
9
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
+ const dataURL = await new Promise(resolve => {
+ doc.defaultView.require(["core/exporter"], ({ rsDocToDataURL }) =>
+ resolve(rsDocToDataURL("text/html", doc))
+ );
+ });
16
const docString = decodeURIComponent(dataURL).replace(
17
"data:text/html;charset=utf-8,",
18
""
0 commit comments