Skip to content

Commit 30769bb

Browse files
authored
Merge pull request #40 from pinanks/DOT-3224
Dot 3224
2 parents f3c7b07 + 3cad3b1 commit 30769bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/cypress/src/smartui.js

Lines changed: 4 additions & 5 deletions
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)