@lambdatest/cypress-driver 1.0.9-beta.1 → 1.0.9-beta.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambdatest/cypress-driver",
3
- "version": "1.0.9-beta.1",
3
+ "version": "1.0.9-beta.3",
4
4
  "description": "Cypress driver for all Lambdatest functionalities",
5
5
  "main": "index.js",
6
6
  "types": "types/index.d.ts",
package/src/smartui.js CHANGED
@@ -1,4 +1,4 @@
1
- const { log } = require('./utils/logger');
1
+ // const { log } = require('./utils/logger');
2
2
  const client = require('./utils/httpClient');
3
3
  const testType = 'cypress-driver';
4
4
  const CY_TIMEOUT = 30 * 1000 * 1.5;
@@ -9,7 +9,7 @@ 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
- cy.task('log', log('info', 'SmartUI snapshot skipped in interactive mode; use "cypress run" instead of "cypress open"'));
12
+ // cy.task('log', log('info', 'SmartUI snapshot skipped in interactive mode; use "cypress run" instead of "cypress open"'));
13
13
  return;
14
14
  }
15
15
 
@@ -29,16 +29,18 @@ function smartuiSnapshot(name, options = {}) {
29
29
  options
30
30
  }, testType).then(resp => {
31
31
  if (resp.status >= 200 && resp.status < 300) {
32
- if (resp.body.data.warnings.length) {
33
- resp.body.data.warnings.map(e => cy.task('log', log('warn', e)));
34
- }
35
- cy.task('log', log('info', `Snapshot captured: ${name}`));
32
+ // if (resp.body.data.warnings.length) {
33
+ // resp.body.data.warnings.map(
34
+ // // cy.task('log', log('warn', e))
35
+ // );
36
+ // }
37
+ // cy.task('log', log('info', `Snapshot captured: ${name}`));
36
38
  } else {
37
39
  throw new Error(resp.body.error.message);
38
40
  }
39
41
  }).catch(error => {
40
- cy.task('log', log('error', `SmartUI snapshot failed "${name}"`));
41
- cy.task('log', log('error', error.message));
42
+ // cy.task('log', log('error', `SmartUI snapshot failed "${name}"`));
43
+ // cy.task('log', log('error', error.message));
42
44
  });
43
45
  });
44
46
  });
@@ -1,24 +1,4 @@
1
1
  const chalk = require('chalk');
2
2
  const pkgName = require('../../package.json').name;
3
3
 
4
- function log(level, message) {
5
- if (typeof message === 'object') {
6
- message = JSON.stringify(message);
7
- }
8
- switch (level) {
9
- case 'debug':
10
- message = chalk.blue(message);
11
- break;
12
- case 'warn':
13
- message = chalk.yellow(`Warning: ${message}`);
14
- break;
15
- case 'error':
16
- message = chalk.red(`Error: ${message}`);
17
- break;
18
- }
19
- return `[${pkgName}] ${message}`;
20
- }
21
4
 
22
- module.exports = {
23
- log
24
- }
@@ -1,5 +1,5 @@
1
1
  function getSmartUIServerAddress() {
2
- if (!Cypress.env('SMARTUI_SERVER_ADDRESS')) throw new Error('SmartUI server address not found');
2
+ if (!Cypress.env('SMARTUI_SERVER_ADDRESS')) return 'http://localhost:49152';
3
3
  return Cypress.env('SMARTUI_SERVER_ADDRESS');
4
4
  }
5
5