File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ function smartuiSnapshot(name, options = {}) {
1414
snapshot: name,
1515
});
1616
}
17-
18-
if (!(await client.isSmartUIRunning())) {
19-
throw new Error('Cannot find SmartUI server.');
20-
}
2117

22-
let resp = await client.fetchDOMSerializer();
18+
let resp = await client.isSmartUIRunning()
19+
if (!resp.body.cliVersion) throw new Error(`cannot find SmartUI server; ${JSON.stringify(resp)}`);
20+
21+
resp = await client.fetchDOMSerializer();
2322
eval(resp.body.data.dom);
2423

2524
return cy.document({ log: false }).then({ timeout: CY_TIMEOUT }, dom => {

0 commit comments

Comments
 (0)