Skip to content

Commit 594e8a7

Browse files
Merge pull request #61 from parthlambdatest/cypress-logging
remove cylog
2 parents 4e64074 + 06f08ea commit 594e8a7

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

packages/cypress/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lambdatest/cypress-driver",
3-
"version": "1.0.9-beta.0",
3+
"version": "1.0.9-beta.1",
44
"description": "Cypress driver for all Lambdatest functionalities",
55
"main": "index.js",
66
"types": "types/index.d.ts",

packages/cypress/src/smartui.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { cylog, log } = require('./utils/logger');
1+
const { log } = require('./utils/logger');
22
const client = require('./utils/httpClient');
33
const testType = 'cypress-driver';
44
const CY_TIMEOUT = 30 * 1000 * 1.5;
@@ -9,10 +9,6 @@ function smartuiSnapshot(name, options = {}) {
99

1010
return cy.then({ timeout: CY_TIMEOUT }, async () => {
1111
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-
// });
1612
cy.task('log', log('info', 'SmartUI snapshot skipped in interactive mode; use "cypress run" instead of "cypress open"'));
1713
return;
1814
}
@@ -36,7 +32,6 @@ function smartuiSnapshot(name, options = {}) {
3632
if (resp.body.data.warnings.length) {
3733
resp.body.data.warnings.map(e => cy.task('log', log('warn', e)));
3834
}
39-
// cylog('smartuiSnapshot', `Snapshot captured: ${name}`);
4035
cy.task('log', log('info', `Snapshot captured: ${name}`));
4136
} else {
4237
throw new Error(resp.body.error.message);

packages/cypress/src/utils/logger.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
const chalk = require('chalk');
22
const pkgName = require('../../package.json').name;
33

4-
function cylog(name, message, meta = {}) {
5-
return Cypress.log({
6-
name,
7-
message,
8-
displayName: pkgName,
9-
consoleProps: () => meta
10-
});
11-
}
12-
134
function log(level, message) {
145
if (typeof message === 'object') {
156
message = JSON.stringify(message);
@@ -29,6 +20,5 @@ function log(level, message) {
2920
}
3021

3122
module.exports = {
32-
cylog,
3323
log
3424
}

0 commit comments

Comments
 (0)