Commit 2bbc8b1 1 parent 49d65b2 commit 2bbc8b1 Copy full SHA for 2bbc8b1
File tree 2 files changed +4
-0
lines changed
catroidUiTest/src/org/catrobat/catroid/uitest/ui
2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ public void testOrientation() throws NameNotFoundException {
84
84
createProject ();
85
85
solo .clickOnButton (solo .getString (R .string .main_menu_continue ));
86
86
solo .clickOnText ("Background" );
87
+ solo .waitForActivity (ProgramMenuActivity .class .getSimpleName ());
87
88
assertEquals ("ProgramMenuActivity not in Portrait mode!" , Configuration .ORIENTATION_PORTRAIT , solo
88
89
.getCurrentActivity ().getResources ().getConfiguration ().orientation );
89
90
@@ -96,6 +97,7 @@ public void testOrientation() throws NameNotFoundException {
96
97
// Note that the activity is _indeed_ rotated on your device/emulator!
97
98
// Robotium can _force_ the activity to be in landscape mode (and so could we, programmatically)
98
99
solo .setActivityOrientation (Solo .LANDSCAPE );
100
+ solo .sleep (200 );
99
101
100
102
assertEquals (ProgramMenuActivity .class .getSimpleName ()
101
103
+ " not set to be in portrait mode in AndroidManifest.xml!" , ActivityInfo .SCREEN_ORIENTATION_PORTRAIT ,
Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ public void testAddedSpriteVisibleOnLongList() {
162
162
public void testOrientation () throws NameNotFoundException {
163
163
/// Method 1: Assert it is currently in portrait mode.
164
164
solo .clickOnButton (solo .getString (R .string .main_menu_continue ));
165
+ solo .waitForActivity (ProjectActivity .class .getSimpleName ());
165
166
assertEquals ("ProjectActivity not in Portrait mode!" , Configuration .ORIENTATION_PORTRAIT , solo
166
167
.getCurrentActivity ().getResources ().getConfiguration ().orientation );
167
168
@@ -174,6 +175,7 @@ public void testOrientation() throws NameNotFoundException {
174
175
// Note that the activity is _indeed_ rotated on your device/emulator!
175
176
// Robotium can _force_ the activity to be in landscape mode (and so could we, programmatically)
176
177
solo .setActivityOrientation (Solo .LANDSCAPE );
178
+ solo .sleep (200 );
177
179
178
180
assertEquals (ProjectActivity .class .getSimpleName () + " not set to be in portrait mode in AndroidManifest.xml!" ,
179
181
ActivityInfo .SCREEN_ORIENTATION_PORTRAIT , activityInfo .screenOrientation );
You can’t perform that action at this time.
0 commit comments