File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2730,7 +2730,10 @@ class Playwright extends Helper {
27302730
27312731 this . debugSection ( 'REQUEST: ' , JSON . stringify ( information ) ) ;
27322732
2733- information . requestPostData = JSON . parse ( information . requestPostData ) ;
2733+ if ( typeof information . requestPostData === 'object' ) {
2734+ information . requestPostData = JSON . parse ( information . requestPostData ) ;
2735+ }
2736+
27342737 this . requests . push ( information ) ;
27352738 } ) ;
27362739 }
@@ -2923,7 +2926,7 @@ class Playwright extends Helper {
29232926 }
29242927
29252928 if ( ! this . recording || ! this . recordedAtLeastOnce ) {
2926- throw new Error ( 'Failure in test automation. You use "I.seeInTraffic ", but "I.startRecordingTraffic" was never called before.' ) ;
2929+ throw new Error ( 'Failure in test automation. You use "I.seeTraffic ", but "I.startRecordingTraffic" was never called before.' ) ;
29272930 }
29282931
29292932 for ( let i = 0 ; i <= timeout * 2 ; i ++ ) {
Original file line number Diff line number Diff line change @@ -795,7 +795,7 @@ describe('Playwright', function () {
795795 I . amOnPage ( 'https://codecept.io/' ) ;
796796 await I . seeTraffic ( { name : 'traffics' , url : 'https://codecept.io/img/companies/BC_LogoScreen_C.jpg' } ) ;
797797 } catch ( e ) {
798- expect ( e . message ) . to . equal ( 'Failure in test automation. You use "I.seeInTraffic ", but "I.startRecordingTraffic" was never called before.' ) ;
798+ expect ( e . message ) . to . equal ( 'Failure in test automation. You use "I.seeTraffic ", but "I.startRecordingTraffic" was never called before.' ) ;
799799 }
800800 } ) ;
801801
You can’t perform that action at this time.
0 commit comments