You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.fail(`Traffic named "${name}" not found in recorded traffic within ${timeout} seconds.\n`+`Expected url: ${url}.\n`+`Recorded traffic:\n${getTrafficDump.call(this)}`)
65
56
}
66
57
}
67
58
68
59
asyncfunctiongrabRecordedNetworkTraffics(){
69
-
if(!this.recording||!this.recordedAtLeastOnce){
70
-
thrownewError('Failure in test automation. You use "I.grabRecordedNetworkTraffics", but "I.startRecordingTraffic" was never called before.');
60
+
if(!this.recordedAtLeastOnce){
61
+
thrownewError('Failure in test automation. You use "I.grabRecordedNetworkTraffics", but "I.startRecordingTraffic" was never called before.')
71
62
}
72
63
73
-
constpromises=this.requests.map(async(request)=>{
74
-
constresp=awaitrequest.response;
64
+
constpromises=this.requests.map(asyncrequest=>{
65
+
constresp=awaitrequest.response
75
66
76
67
if(!resp){
77
68
return{
@@ -81,13 +72,13 @@ async function grabRecordedNetworkTraffics() {
81
72
statusText: '',
82
73
body: '',
83
74
},
84
-
};
75
+
}
85
76
}
86
77
87
-
letbody;
78
+
letbody
88
79
try{
89
80
// There's no 'body' for some requests (redirect etc...)
90
-
body=JSON.parse((awaitresp.body()).toString());
81
+
body=JSON.parse((awaitresp.body()).toString())
91
82
}catch(e){
92
83
// only interested in JSON, not HTML responses.
93
84
}
@@ -99,19 +90,21 @@ async function grabRecordedNetworkTraffics() {
0 commit comments