Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public void checkIfMessageShownAsPopUpForImproperIntent() throws Exception {
onView(withText("Tips and tricks 2")).perform(click());
intended(allOf(hasComponent(IterableInboxMessageActivity.class.getName())), times(0));
onView(withId(R.id.webView)).inRoot(isDialog()).check(matches(isDisplayed()));
onWebView(withId(R.id.webView)).forceJavascriptEnabled();
onWebView().withElement(findElement(Locator.XPATH, "//*[contains(text(),'Ok, got it')]"));
}

Expand All @@ -165,6 +166,7 @@ public void checkIfMessageShownAsPopUpForUnexpectedIntent() throws Exception {
onView(withText("Tips and tricks 2")).perform(click());
intended(allOf(hasComponent(IterableInboxMessageActivity.class.getName())), times(0));
onView(withId(R.id.webView)).inRoot(isDialog()).check(matches(isDisplayed()));
onWebView(withId(R.id.webView)).forceJavascriptEnabled();
onWebView().withElement(findElement(Locator.XPATH, "//*[contains(text(),'Ok, got it')]"));
}

Expand All @@ -182,6 +184,7 @@ public void checkIfMessageShownAsPopUpForNoIntent() throws Exception {
onView(withText("Tips and tricks 2")).perform(click());
intended(allOf(hasComponent(IterableInboxMessageActivity.class.getName())), times(0));
onView(withId(R.id.webView)).inRoot(isDialog()).check(matches(isDisplayed()));
onWebView(withId(R.id.webView)).forceJavascriptEnabled();
onWebView().withElement(findElement(Locator.XPATH, "//*[contains(text(),'Ok, got it')]"));
}

Expand All @@ -203,6 +206,7 @@ public void checkIfMessageShownAsPopUp() throws Exception {
onView(withText("Tips and tricks 2")).perform(click());
intended(allOf(hasComponent(IterableInboxMessageActivity.class.getName())), times(0));
onView(withId(R.id.webView)).inRoot(isDialog()).check(matches(isDisplayed()));
onWebView(withId(R.id.webView)).forceJavascriptEnabled();
onWebView().withElement(findElement(Locator.XPATH, "//*[contains(text(),'Ok, got it')]"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ public void onProgressChanged(WebView view, int newProgress) {
getSettings().setUseWideViewPort(true);

//resize:
getSettings().setJavaScriptEnabled(true);
getSettings().setJavaScriptEnabled(false);
}
}