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

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.8",
3
+ "version": "1.0.9-beta.1",
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 { cylog, 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,10 +9,8 @@ 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
- details: 'use "cypress run" instead of "cypress open"',
14
- snapshot: name,
15
- });
12
+ cy.task('log', log('info', 'SmartUI snapshot skipped in interactive mode; use "cypress run" instead of "cypress open"'));
13
+ return;
16
14
  }
17
15
 
18
16
  let resp = await client.isSmartUIRunning()
@@ -34,7 +32,6 @@ function smartuiSnapshot(name, options = {}) {
34
32
  if (resp.body.data.warnings.length) {
35
33
  resp.body.data.warnings.map(e => cy.task('log', log('warn', e)));
36
34
  }
37
- cylog('smartuiSnapshot', `Snapshot captured: ${name}`);
38
35
  cy.task('log', log('info', `Snapshot captured: ${name}`));
39
36
  } else {
40
37
  throw new Error(resp.body.error.message);
@@ -1,4 +1,3 @@
1
- const { cylog } = require('./logger');
2
1
  const utils = require('./utils');
3
2
 
4
3
  module.exports = new class httpClient {
@@ -1,15 +1,6 @@
1
1
  const chalk = require('chalk');
2
2
  const pkgName = require('../../package.json').name;
3
3
 
4
- function cylog(name, message, meta = {}) {
5
- return Cypress.log({
6
- name,
7
- message,
8
- displayName: pkgName,
9
- consoleProps: () => meta
10
- });
11
- }
12
-
13
4
  function log(level, message) {
14
5
  if (typeof message === 'object') {
15
6
  message = JSON.stringify(message);
@@ -29,6 +20,5 @@ function log(level, message) {
29
20
  }
30
21
 
31
22
  module.exports = {
32
- cylog,
33
23
  log
34
24
  }