@lambdatest/cypress-driver 1.0.7 → 1.0.9-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/smartui.js +11 -10
- package/src/utils/httpClient.js +0 -1
package/package.json
CHANGED
package/src/smartui.js
CHANGED
|
@@ -9,17 +9,18 @@ function smartuiSnapshot(name, options = {}) {
|
|
|
9
9
|
|
|
10
10
|
return cy.then({ timeout: CY_TIMEOUT }, async () => {
|
|
11
11
|
if (Cypress.config('isInteractive') && !Cypress.config('enableSmartUIInteractiveMode')) {
|
|
12
|
-
return cylog('smartuiSnapshot', 'Disabled in interactive mode', {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (!(await client.isSmartUIRunning())) {
|
|
19
|
-
throw new Error('Cannot find SmartUI server.');
|
|
12
|
+
// return cylog('smartuiSnapshot', 'Disabled in interactive mode', {
|
|
13
|
+
// details: 'use "cypress run" instead of "cypress open"',
|
|
14
|
+
// snapshot: name,
|
|
15
|
+
// });
|
|
16
|
+
cy.task('log', log('info', 'SmartUI snapshot skipped in interactive mode; use "cypress run" instead of "cypress open"'));
|
|
17
|
+
return;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
let resp = await client.
|
|
20
|
+
let resp = await client.isSmartUIRunning()
|
|
21
|
+
if (!resp.body.cliVersion) throw new Error(`cannot find SmartUI server; ${JSON.stringify(resp)}`);
|
|
22
|
+
|
|
23
|
+
resp = await client.fetchDOMSerializer();
|
|
23
24
|
eval(resp.body.data.dom);
|
|
24
25
|
|
|
25
26
|
return cy.document({ log: false }).then({ timeout: CY_TIMEOUT }, dom => {
|
|
@@ -35,7 +36,7 @@ function smartuiSnapshot(name, options = {}) {
|
|
|
35
36
|
if (resp.body.data.warnings.length) {
|
|
36
37
|
resp.body.data.warnings.map(e => cy.task('log', log('warn', e)));
|
|
37
38
|
}
|
|
38
|
-
cylog('smartuiSnapshot', `Snapshot captured: ${name}`);
|
|
39
|
+
// cylog('smartuiSnapshot', `Snapshot captured: ${name}`);
|
|
39
40
|
cy.task('log', log('info', `Snapshot captured: ${name}`));
|
|
40
41
|
} else {
|
|
41
42
|
throw new Error(resp.body.error.message);
|
package/src/utils/httpClient.js
CHANGED