Skip to content

Commit

Permalink
[🚀] 2.1.3 RC (#699)
Browse files Browse the repository at this point in the history
* Handling null request tags in survey webview and test.s (#698)
* post 2.1.3 RC creation
  • Loading branch information
eoji authored Jan 3, 2020
1 parent 494a34f commit 1af7205
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/external_version_code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1912091713
1912171853
2 changes: 1 addition & 1 deletion app/external_version_name.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2
2.1.3
2 changes: 1 addition & 1 deletion app/internal_version_code.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1912091713
1912171853
2 changes: 1 addition & 1 deletion app/internal_version_name.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2
2.1.3
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ protected void onCreate(final @Nullable Bundle savedInstanceState) {

private boolean handleProjectUriRequest(final @NonNull Request request, final @NonNull WebView webView) {
this.viewModel.inputs.projectUriRequest(request);
return false;
return true;
}

private boolean handleProjectSurveyUriRequest(final @NonNull Request request, final @NonNull WebView webView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public ViewModel(final @NonNull Environment environment) {
* which indicates a redirect from a successful submit.
*/
private boolean requestTagUrlIsSurveyUrl(final @NonNull Pair<Request, String> projectRequestAndSurveyUrl) {
return ((Request) projectRequestAndSurveyUrl.first.tag()).url().toString()
.equals(projectRequestAndSurveyUrl.second);
final Request tag = (Request) projectRequestAndSurveyUrl.first.tag();
return tag == null || tag.url().toString().equals(projectRequestAndSurveyUrl.second);
}

private final PublishSubject<Void> okButtonClicked = PublishSubject.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,38 @@ public void testSubmitSuccessful_Redirect_ShowConfirmationDialog() {
this.showConfirmationDialog.assertValueCount(1);
}

@Test
public void testSubmitSuccessful_NullTag_ShowConfirmationDialog() {
final String surveyUrl = "https://kck.str/projects/param/heyo/surveys/123";

final SurveyResponse.Urls urlsEnvelope = SurveyResponse.Urls.builder()
.web(SurveyResponse.Urls.Web.builder().survey(surveyUrl).build())
.build();

final SurveyResponse surveyResponse = SurveyResponseFactory.surveyResponse()
.toBuilder()
.urls(urlsEnvelope)
.build();

final Request projectSurveyRequest = new Request.Builder()
.url(surveyUrl)
.build();

final Request projectRequest = new Request.Builder()
.url("https://kck.str/projects/param/heyo")
.build();

setUpEnvironment(environment());
this.vm.intent(new Intent().putExtra(IntentKey.SURVEY_RESPONSE, surveyResponse));

// Survey loads. Successful submit redirects to project uri.
this.vm.inputs.projectSurveyUriRequest(projectSurveyRequest);
this.vm.inputs.projectUriRequest(projectRequest);

// Success confirmation dialog is shown.
this.showConfirmationDialog.assertValueCount(1);
}

@Test
public void testWebViewUrl() {
final SurveyResponse surveyResponse = SurveyResponseFactory.surveyResponse();
Expand Down
10 changes: 5 additions & 5 deletions fastlane/report.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@



<testcase classname="fastlane.lanes" name="0: Verifying fastlane version" time="0.001604">
<testcase classname="fastlane.lanes" name="0: Verifying fastlane version" time="0.001312">

</testcase>


<testcase classname="fastlane.lanes" name="1: default_platform" time="0.001249">
<testcase classname="fastlane.lanes" name="1: default_platform" time="0.001558">

</testcase>


<testcase classname="fastlane.lanes" name="2: build_android_app" time="43.024441">
<testcase classname="fastlane.lanes" name="2: build_android_app" time="39.524221">

</testcase>


<testcase classname="fastlane.lanes" name="3: crashlytics" time="2.937905">
<testcase classname="fastlane.lanes" name="3: crashlytics" time="2.699301">

</testcase>


<testcase classname="fastlane.lanes" name="4: slack" time="0.327769">
<testcase classname="fastlane.lanes" name="4: slack" time="0.307244">

</testcase>

Expand Down

0 comments on commit 1af7205

Please sign in to comment.