Skip to content

Commit 4025fd4

Browse files
Fix bugs setViewHirearchyEnabled ios spec
- Map bug reporting spec to the correct method i.e. setViewHirearchyEnabled instead of setViewHierarchyEnabled. - Fix bug reporting specs to assert on non-default values.
1 parent 9c002b0 commit 4025fd4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

InstabugSample/ios/InstabugSampleTests/InstabugSampleTests.m

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ - (void)testShowingSurveyWithToken {
322322
*/
323323

324324
- (void) testgivenBoolean$setBugReportingEnabled_whenQuery_thenShouldCallNativeApi {
325-
BOOL enabled = false;
325+
BOOL enabled = true;
326326
[self.instabugBridge setBugReportingEnabled:enabled];
327-
XCTAssertFalse(IBGBugReporting.enabled);
327+
XCTAssertTrue(IBGBugReporting.enabled);
328328
}
329329

330330
- (void) testgivenInvocationEvent$setInvocationEvents_whenQuery_thenShouldCallNativeApiWithArgs {
@@ -495,9 +495,9 @@ - (void) testgivenArgs$showBugReportingWithReportTypeAndOptions_whenQuery_thenSh
495495
}
496496

497497
- (void) testgivenBoolean$setAutoScreenRecordingEnabled_whenQuery_thenShouldCallNativeApi {
498-
BOOL enabled = false;
498+
BOOL enabled = true;
499499
[self.instabugBridge setAutoScreenRecordingEnabled:enabled];
500-
XCTAssertFalse(IBGBugReporting.autoScreenRecordingEnabled);
500+
XCTAssertTrue(IBGBugReporting.autoScreenRecordingEnabled);
501501
}
502502

503503
- (void) testgivenArgs$setAutoScreenRecordingMaxDuration_whenQuery_thenShouldCallNativeApi {
@@ -507,9 +507,9 @@ - (void) testgivenArgs$setAutoScreenRecordingMaxDuration_whenQuery_thenShouldCal
507507
}
508508

509509
- (void) testgivenBoolean$setViewHierarchyEnabled_whenQuery_thenShouldCallNativeApi {
510-
BOOL enabled = false;
511-
[self.instabugBridge setViewHierarchyEnabled:enabled];
512-
XCTAssertFalse(IBGBugReporting.shouldCaptureViewHierarchy);
510+
BOOL enabled = true;
511+
[self.instabugBridge setViewHirearchyEnabled:enabled];
512+
XCTAssertTrue(IBGBugReporting.shouldCaptureViewHierarchy);
513513
}
514514

515515

ios/RNInstabug/InstabugReactBridge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,6 @@
116116

117117
- (void)setAutoScreenRecordingMaxDuration:(CGFloat)duration;
118118

119-
- (void)setViewHierarchyEnabled:(BOOL)viewHierarchyEnabled;
119+
- (void)setViewHirearchyEnabled:(BOOL)viewHirearchyEnabled;
120120

121121
@end

0 commit comments

Comments
 (0)