add tests to check for the addCalendar button available when date is there
This commit is contained in:
parent
1989343ad2
commit
dc595382d6
1 changed files with 17 additions and 1 deletions
|
@ -17,7 +17,6 @@ import static com.google.android.apps.common.testing.ui.espresso.assertion.ViewA
|
||||||
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed;
|
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.isDisplayed;
|
||||||
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId;
|
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withId;
|
||||||
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText;
|
import static com.google.android.apps.common.testing.ui.espresso.matcher.ViewMatchers.withText;
|
||||||
import static org.hamcrest.CoreMatchers.not;
|
|
||||||
|
|
||||||
@TargetApi(14)
|
@TargetApi(14)
|
||||||
public class TheTicketViewActivity extends BaseIntegration<TicketViewActivity> {
|
public class TheTicketViewActivity extends BaseIntegration<TicketViewActivity> {
|
||||||
|
@ -66,6 +65,23 @@ public class TheTicketViewActivity extends BaseIntegration<TicketViewActivity> {
|
||||||
onView(withId(R.id.date)).check(matches(isDisplayed()));
|
onView(withId(R.id.date)).check(matches(isDisplayed()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MediumTest
|
||||||
|
public void testLinkToCalendarIsThereWhenPassbookHasDate() {
|
||||||
|
act_pass.relevantDate = new DateTime();
|
||||||
|
getActivity();
|
||||||
|
|
||||||
|
onView(withId(R.id.addCalendar)).check(matches(isDisplayed()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@MediumTest
|
||||||
|
public void testLinkToCalendarIsNotThereWhenPassbookHasNoDate() {
|
||||||
|
act_pass.relevantDate = null;
|
||||||
|
getActivity();
|
||||||
|
|
||||||
|
onView(withId(R.id.addCalendar)).check(matches(not(isDisplayed())));
|
||||||
|
}
|
||||||
|
|
||||||
@MediumTest
|
@MediumTest
|
||||||
public void test_click_on_barcode_opens_fullscreen_barcode() {
|
public void test_click_on_barcode_opens_fullscreen_barcode() {
|
||||||
getActivity();
|
getActivity();
|
||||||
|
|
Loading…
Reference in a new issue