1- const { log } = require ( './utils/logger' ) ;
1+ // const { log } = require('./utils/logger');
22const client = require ( './utils/httpClient' ) ;
33const testType = 'cypress-driver' ;
44const 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 } ) ;
0 commit comments