Skip to content

Commit a286818

Browse files
remove logger
1 parent 06f08ea commit a286818

File tree

3 files changed

+11
-29
lines changed

3 files changed

+11
-29
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.1",
3+
"version": "1.0.9-beta.2",
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: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { 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,7 +9,7 @@ function smartuiSnapshot(name, options = {}) {
99

1010
return cy.then({ timeout: CY_TIMEOUT }, async () => {
1111
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"'));
1313
return;
1414
}
1515

@@ -29,16 +29,18 @@ function smartuiSnapshot(name, options = {}) {
2929
options
3030
}, testType).then(resp => {
3131
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}`));
3638
} else {
3739
throw new Error(resp.body.error.message);
3840
}
3941
}).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));
4244
});
4345
});
4446
});
Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,4 @@
11
const chalk = require('chalk');
22
const pkgName = require('../../package.json').name;
33

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-
}
214

22-
module.exports = {
23-
log
24-
}

0 commit comments

Comments
 (0)