forked from upstream-mirrors/OpenTracks
Add checks about the switch of start and pause image button.
This commit is contained in:
+12
@@ -154,6 +154,10 @@ public class PauseRecordingTest extends ActivityInstrumentationTestCase2<TrackLi
|
|||||||
*/
|
*/
|
||||||
static void checkNotRecording() {
|
static void checkNotRecording() {
|
||||||
EndToEndTestUtils.instrumentation.waitForIdleSync();
|
EndToEndTestUtils.instrumentation.waitForIdleSync();
|
||||||
|
assertEquals(
|
||||||
|
EndToEndTestUtils.activityMytracks.getString(R.string.icon_record_track),
|
||||||
|
(String) EndToEndTestUtils.SOLO.getCurrentActivity()
|
||||||
|
.findViewById(R.id.track_controller_record).getContentDescription());
|
||||||
assertFalse(EndToEndTestUtils.SOLO.getCurrentActivity()
|
assertFalse(EndToEndTestUtils.SOLO.getCurrentActivity()
|
||||||
.findViewById(R.id.track_controller_stop).isEnabled());
|
.findViewById(R.id.track_controller_stop).isEnabled());
|
||||||
assertNull(EndToEndTestUtils.findTextView(EndToEndTestUtils.activityMytracks
|
assertNull(EndToEndTestUtils.findTextView(EndToEndTestUtils.activityMytracks
|
||||||
@@ -170,6 +174,10 @@ public class PauseRecordingTest extends ActivityInstrumentationTestCase2<TrackLi
|
|||||||
*/
|
*/
|
||||||
static void checkUnderRecording() {
|
static void checkUnderRecording() {
|
||||||
EndToEndTestUtils.instrumentation.waitForIdleSync();
|
EndToEndTestUtils.instrumentation.waitForIdleSync();
|
||||||
|
assertEquals(
|
||||||
|
EndToEndTestUtils.activityMytracks.getString(R.string.icon_pause_recording),
|
||||||
|
(String) EndToEndTestUtils.SOLO.getCurrentActivity()
|
||||||
|
.findViewById(R.id.track_controller_record).getContentDescription());
|
||||||
assertTrue(EndToEndTestUtils.SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
assertTrue(EndToEndTestUtils.SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
||||||
.isEnabled());
|
.isEnabled());
|
||||||
assertNotNull(EndToEndTestUtils.findTextView(EndToEndTestUtils.activityMytracks
|
assertNotNull(EndToEndTestUtils.findTextView(EndToEndTestUtils.activityMytracks
|
||||||
@@ -190,6 +198,10 @@ public class PauseRecordingTest extends ActivityInstrumentationTestCase2<TrackLi
|
|||||||
*/
|
*/
|
||||||
static void checkUnderPaused() {
|
static void checkUnderPaused() {
|
||||||
EndToEndTestUtils.instrumentation.waitForIdleSync();
|
EndToEndTestUtils.instrumentation.waitForIdleSync();
|
||||||
|
assertEquals(
|
||||||
|
EndToEndTestUtils.activityMytracks.getString(R.string.icon_record_track),
|
||||||
|
(String) EndToEndTestUtils.SOLO.getCurrentActivity()
|
||||||
|
.findViewById(R.id.track_controller_record).getContentDescription());
|
||||||
assertTrue(EndToEndTestUtils.SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
assertTrue(EndToEndTestUtils.SOLO.getCurrentActivity().findViewById(R.id.track_controller_stop)
|
||||||
.isEnabled());
|
.isEnabled());
|
||||||
assertNull(EndToEndTestUtils.findTextView(EndToEndTestUtils.activityMytracks
|
assertNull(EndToEndTestUtils.findTextView(EndToEndTestUtils.activityMytracks
|
||||||
|
|||||||
Reference in New Issue
Block a user