app/src/androidTest/java/com/example/android/testing/espresso/DataAdapterSample/LongListActivityTest.java
@Test
    public void toggle_ClickDoesntPropagate() {
        // Click on one of the rows.
        onRow(TEXT_ITEM_30).onChildView(withId(R.id.rowContentTextView)).perform(click());

        // Click on the toggle button, in a different row.
        onRow(TEXT_ITEM_60).onChildView(withId(R.id.rowToggleButton)).perform(click());

        // Check that the activity didn't detect the click on the first column.
        onView(ViewMatchers.withId(R.id.selection_row_value))
                .check(matches(withText(TEXT_ITEM_30_SELECTED)));
    }
/**
     * Make sure that clicking on the toggle button doesn't trigger a click on the row.
     */
Make sure that clicking on the toggle button doesn't trigger a click on the row.
Make sure that clicking on the toggle button doesn ' t trigger a click on the row .
@Test
    public void toggle_ClickDoesntPropagate() {
        onRow(TEXT_ITEM_30).onChildView(withId(R.id.rowContentTextView)).perform(click());
        onRow(TEXT_ITEM_60).onChildView(withId(R.id.rowToggleButton)).perform(click());
        onView(ViewMatchers.withId(R.id.selection_row_value))
                .check(matches(withText(TEXT_ITEM_30_SELECTED)));
    }
@ Test public void toggle_ClickDoesntPropagate ( ) { onRow ( TEXT_ITEM_30 ) . onChildView ( withId ( R . id . rowContentTextView ) ) . perform ( click ( ) ) ; onRow ( TEXT_ITEM_60 ) . onChildView ( withId ( R . id . rowToggleButton ) ) . perform ( click ( ) ) ; onView ( ViewMatchers . withId ( R . id . selection_row_value ) ) . check ( matches ( withText ( TEXT_ITEM_30_SELECTED ) ) ) ; }
Make sure that clicking on the toggle button doesn't trigger a click on the row.
Make sure that clicking on the toggle button doesn ' t trigger a click on the row .
// Click on one of the rows. // Click on the toggle button, in a different row. // Check that the activity didn't detect the click on the first column.