File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -126,4 +126,10 @@ class NetworkLogger {
126
126
}
127
127
return null ;
128
128
}
129
+
130
+ /// Enables or disables network logs sensitive information auto masking.
131
+ /// [boolean] isEnabled
132
+ static Future <void > setAutoMaskingEnabled (bool isEnabled) async {
133
+ return _host.setAutoMaskingEnabled (isEnabled);
134
+ }
129
135
}
Original file line number Diff line number Diff line change @@ -74,4 +74,6 @@ abstract class InstabugHostApi {
74
74
Map <String , bool > isW3CFeatureFlagsEnabled ();
75
75
76
76
void willRedirectToStore ();
77
+
78
+ void setAutoMaskingEnabled (bool isEnabled);
77
79
}
Original file line number Diff line number Diff line change @@ -229,4 +229,14 @@ void main() {
229
229
await logger.networkLog (networkData);
230
230
expect (networkData.requestHeaders['traceparent' ], 'test' );
231
231
});
232
+
233
+ test ('[setAutoMaskingEnabled] should call host method' , () async {
234
+ const enabled = true ;
235
+
236
+ await NetworkLogger .setAutoMaskingEnabled (enabled);
237
+
238
+ verify (
239
+ mInstabugHost.setAutoMaskingEnabled (enabled),
240
+ ).called (1 );
241
+ });
232
242
}
You can’t perform that action at this time.
0 commit comments