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 {
2730
2730
2731
2731
this . debugSection ( 'REQUEST: ' , JSON . stringify ( information ) ) ;
2732
2732
2733
- information . requestPostData = JSON . parse ( information . requestPostData ) ;
2733
+ if ( typeof information . requestPostData === 'object' ) {
2734
+ information . requestPostData = JSON . parse ( information . requestPostData ) ;
2735
+ }
2736
+
2734
2737
this . requests . push ( information ) ;
2735
2738
} ) ;
2736
2739
}
@@ -2923,7 +2926,7 @@ class Playwright extends Helper {
2923
2926
}
2924
2927
2925
2928
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.' ) ;
2927
2930
}
2928
2931
2929
2932
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 () {
795
795
I . amOnPage ( 'https://codecept.io/' ) ;
796
796
await I . seeTraffic ( { name : 'traffics' , url : 'https://codecept.io/img/companies/BC_LogoScreen_C.jpg' } ) ;
797
797
} 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.' ) ;
799
799
}
800
800
} ) ;
801
801
You can’t perform that action at this time.
0 commit comments