Skip to content

Commit 5a628d2

Browse files
authored
💎 Bump to version 8.6.1
1 parent 12faae3 commit 5a628d2

File tree

18 files changed

+41
-113
lines changed

18 files changed

+41
-113
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## Version 8.6.1 (2019-08-26)
2+
3+
* Bumps version to 8.6 to be in sync with other platforms.
4+
* Updates native SDK dependencies to 8.6.1.
5+
16
## Version 1.0.0 (2019-07-29)
27

38
**⚠️ Package on pub has been renamed to `instabug_flutter` the old package `instabug` is deprecated**
@@ -72,4 +77,4 @@
7277
Adds the following APIs:
7378

7479
* start(String token, List<InvocationEvent> invocationEvents)
75-
* showWelcomeMessageWithMode(WelcomeMessageMode welcomeMessageMode)
80+
* showWelcomeMessageWithMode(WelcomeMessageMode welcomeMessageMode)

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
A Flutter plugin for [Instabug](https://instabug.com/).
66

7-
⚠️ While this plugin is currently in beta, it's safe to start using it and ship apps with it to production. If you'd like to give us [feedback](https://github.com/Instabug/Instabug-Flutter/issues) or create a [pull request](https://github.com/Instabug/Instabug-Flutter/pulls), we would highly appreciate it!
8-
97
## Available Features
108

119
| Feature | Status |

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ android {
3434
}
3535

3636
dependencies {
37-
implementation 'com.instabug.library:instabug:8.5.0.1'
37+
implementation 'com.instabug.library:instabug:8.6.1.0'
3838
testImplementation 'junit:junit:4.12'
3939
}

android/src/main/java/com/instabug/instabugflutter/ArgsRegistry.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ final class ArgsRegistry {
5252
registerWelcomeMessageArgs(ARGS);
5353
registerColorThemeArgs(ARGS);
5454
registerLocaleArgs(ARGS);
55-
registerInvocationModeArgs(ARGS);
5655
registerInvocationOptionsArgs(ARGS);
5756
registerCustomTextPlaceHolderKeysArgs(ARGS);
5857
registerInstabugReportTypesArgs(ARGS);
@@ -119,11 +118,6 @@ static void registerColorThemeArgs(Map<String, Object> args) {
119118
args.put("ColorTheme.dark", InstabugColorTheme.InstabugColorThemeDark);
120119
}
121120

122-
static void registerInvocationModeArgs(Map<String, Object> args) {
123-
args.put("InvocationMode.bug", BugReporting.ReportType.BUG);
124-
args.put("InvocationMode.feedback", BugReporting.ReportType.FEEDBACK);
125-
}
126-
127121
static void registerInvocationOptionsArgs(Map<String, Object> args) {
128122
args.put("InvocationOption.commentFieldRequired", Option.COMMENT_FIELD_REQUIRED);
129123
args.put("InvocationOption.disablePostSendingDialog", Option.DISABLE_POST_SENDING_DIALOG);
@@ -168,6 +162,7 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
168162
args.put("CustomTextPlaceHolderKey.emailFieldHint", InstabugCustomTextPlaceHolder.Key.EMAIL_FIELD_HINT);
169163
args.put("CustomTextPlaceHolderKey.commentFieldHintForBugReport", InstabugCustomTextPlaceHolder.Key.COMMENT_FIELD_HINT_FOR_BUG_REPORT);
170164
args.put("CustomTextPlaceHolderKey.commentFieldHintForFeedback", InstabugCustomTextPlaceHolder.Key.COMMENT_FIELD_HINT_FOR_FEEDBACK);
165+
args.put("CustomTextPlaceHolderKey.commentFieldHintForQuestion", InstabugCustomTextPlaceHolder.Key.COMMENT_FIELD_HINT_FOR_QUESTION);
171166
args.put("CustomTextPlaceHolderKey.addVoiceMessage", InstabugCustomTextPlaceHolder.Key.ADD_VOICE_MESSAGE);
172167
args.put("CustomTextPlaceHolderKey.addImageFromGallery", InstabugCustomTextPlaceHolder.Key.ADD_IMAGE_FROM_GALLERY);
173168
args.put("CustomTextPlaceHolderKey.addExtraScreenshot", InstabugCustomTextPlaceHolder.Key.ADD_EXTRA_SCREENSHOT);
@@ -194,6 +189,7 @@ static void registerCustomTextPlaceHolderKeysArgs(Map<String, Object> args) {
194189
static void registerInstabugReportTypesArgs(Map<String, Object> args) {
195190
args.put("ReportType.bug", BugReporting.ReportType.BUG);
196191
args.put("ReportType.feedback", BugReporting.ReportType.FEEDBACK);
192+
args.put("ReportType.question", BugReporting.ReportType.QUESTION);
197193
}
198194

199195
static void registerInstabugExtendedBugReportModeArgs(Map<String, Object> args) {

android/src/main/java/com/instabug/instabugflutter/InstabugFlutterPlugin.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -315,27 +315,6 @@ public void run() {
315315
});
316316
}
317317

318-
/**
319-
* invoke sdk manually with desire invocation mode
320-
*
321-
* @param invocationMode the invocation mode
322-
* @param invocationOptions the array of invocation options
323-
*/
324-
public void invokeWithMode(String invocationMode, List<String> invocationOptions) {
325-
switch (invocationMode) {
326-
case "InvocationMode.chats" : Chats.show();
327-
return;
328-
case "InvocationMode.replies" : Replies.show();
329-
return;
330-
}
331-
int[] options = new int[invocationOptions.size()];
332-
for (int i = 0; i < invocationOptions.size(); i++) {
333-
options[i] = ArgsRegistry.getDeserializedValue(invocationOptions.get(i), Integer.class);
334-
}
335-
int invMode = ArgsRegistry.getDeserializedValue(invocationMode, Integer.class);
336-
BugReporting.show(invMode, options);
337-
}
338-
339318
/**
340319
* Logs a user event that happens through the lifecycle of the application.
341320
* Logged user events are going to be sent with each report, as well as at the end of a session.

example/android/app/src/androidTest/java/com/instabug/instabugflutterexample/InvokeInstabugUITest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void ensureInstabugInvocati1on() throws InterruptedException {
2828
disableScreenShotByMediaProjection();
2929
onView(withResourceName("instabug_floating_button")).perform(click());
3030
Thread.sleep(5000);
31-
onView(withText("Report a problem")).perform(click());
31+
onView(withText("Report a bug")).perform(click());
3232
Thread.sleep(5000);
3333
onView(withResourceName("instabug_edit_text_email")).perform(replaceText("[email protected]"));
3434
onView(withResourceName("instabug_bugreporting_send")).perform(click());

example/android/app/src/main/java/com/instabug/instabugflutterexample/OnMethodCallTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,17 +77,17 @@ public void testAppendTags() {
7777
verify(instabugMock).appendTags(tags);
7878
}
7979

80-
public void testInvokeWithMode() {
81-
String methodName = "invokeWithMode";
80+
public void testShowBugReportingWithReportTypeAndOptions() {
81+
String methodName = "showBugReportingWithReportTypeAndOptions";
8282
ArrayList<Object> argsList = new ArrayList<>();
8383
ArrayList<String> options = new ArrayList<>();
8484
options.add("commentFieldRequired");
8585
options.add("disablePostSendingDialog");
8686
argsList.add("bug");
8787
argsList.add(options);
88-
Mockito.doNothing().when(instabugMock).invokeWithMode(any(String.class),any(ArrayList.class));
88+
Mockito.doNothing().when(instabugMock).showBugReportingWithReportTypeAndOptions(any(String.class),any(ArrayList.class));
8989
testMethodCall(methodName,argsList);
90-
verify(instabugMock).invokeWithMode("bug", options);
90+
verify(instabugMock).showBugReportingWithReportTypeAndOptions("bug", options);
9191
}
9292

9393
public void testSetSessionProfilerEnabled() {

example/android/app/src/test/java/com/instabug/instabugflutterexample/InstabugFlutterPluginTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public void testAppendTags() {
4646
* (String, ArrayList<String>)
4747
*/
4848
@Test
49-
public void testInvokeWithMode() {
50-
new OnMethodCallTests().testInvokeWithMode();
49+
public void testShowBugReportingWithReportTypeAndOptions() {
50+
new OnMethodCallTests().testShowBugReportingWithReportTypeAndOptions();
5151
}
5252

5353
/**

example/ios/instabug_flutter_exampleTests/instabug_flutter_exampleTests.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,17 @@ - (void)testAppendTags {
6464
[[[mock verify] classMethod] appendTags:tags];
6565
}
6666

67-
- (void)testInvokeWithMode {
67+
- (void)testShowBugReportingWithReportTypeAndOptions {
6868
id mock = OCMClassMock([InstabugFlutterPlugin class]);
6969
InstabugFlutterPlugin *instabug = [[InstabugFlutterPlugin alloc] init];
7070
id result;
7171

7272
NSArray *options = [NSArray arrayWithObjects:@"commentFieldRequired", @"disablePostSendingDialog", nil];
7373
NSArray *arguments = [NSArray arrayWithObjects:@"bug", options, nil];
74-
FlutterMethodCall *call = [FlutterMethodCall methodCallWithMethodName:@"invokeWithMode:options:" arguments:arguments];
75-
[[[mock stub] classMethod] invokeWithMode:@"bug"options:options];
74+
FlutterMethodCall *call = [FlutterMethodCall methodCallWithMethodName:@"showBugReportingWithReportTypeAndOptions:options:" arguments:arguments];
75+
[[[mock stub] classMethod] showBugReportingWithReportTypeAndOptions:@"bug"options:options];
7676
[instabug handleMethodCall:call result:result];
77-
[[[mock verify] classMethod] invokeWithMode:@"bug"options:options];
77+
[[[mock verify] classMethod] showBugReportingWithReportTypeAndOptions:@"bug"options:options];
7878
}
7979

8080
- (void)testSetSessionProfilerEnabled {

example/ios/instabug_flutter_exampleUITests/instabug_flutter_exampleUITests.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ - (void)testInstabugSendBugReport {
2424
XCUIApplication *app = [[XCUIApplication alloc] init];
2525
XCUIElement *ibgfloatingbuttonaccessibilityidentifierElement = app/*@START_MENU_TOKEN@*/.otherElements[@"IBGFloatingButtonAccessibilityIdentifier"]/*[[".otherElements[@\"Floating Button\"]",".otherElements[@\"IBGFloatingButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/;
2626
[ibgfloatingbuttonaccessibilityidentifierElement tap];
27-
[app.tables/*@START_MENU_TOKEN@*/.staticTexts[@"Report a problem"]/*[[".cells[@\"Report a problem\"].staticTexts[@\"Report a problem\"]",".cells[@\"IBGReportBugPromptOptionAccessibilityIdentifier\"].staticTexts[@\"Report a problem\"]",".staticTexts[@\"Report a problem\"]"],[[[-1,2],[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/ tap];
27+
[app.tables.staticTexts[@"Report a bug"] tap];
2828

2929
XCUIElement *textField = app.scrollViews.otherElements.textFields[@"IBGBugInputViewEmailFieldAccessibilityIdentifier"];
3030
[textField tap];
@@ -33,7 +33,7 @@ - (void)testInstabugSendBugReport {
3333
[app.menuItems[@"Select All"] tap];
3434
}
3535
[textField typeText:@"[email protected]"];
36-
[app.navigationBars[@"Report a problem"]/*@START_MENU_TOKEN@*/.buttons[@"IBGBugVCNextButtonAccessibilityIdentifier"]/*[[".buttons[@\"Send\"]",".buttons[@\"IBGBugVCNextButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/ tap];
36+
[app.navigationBars[@"Report a bug"]/*@START_MENU_TOKEN@*/.buttons[@"IBGBugVCNextButtonAccessibilityIdentifier"]/*[[".buttons[@\"Send\"]",".buttons[@\"IBGBugVCNextButtonAccessibilityIdentifier\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/ tap];
3737

3838
XCUIElement *element = app.staticTexts[@"Thank you"];
3939
[self waitForElementToAppear:element withTimeout:5];

0 commit comments

Comments
 (0)