Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to restore the DynamicStarmapActivity test. #427

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 9 additions & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,12 @@ jobs:
target: ${{ matrix.target }}
arch: x86_64
profile: Nexus 6
script: ./gradlew connectedGmsDebugAndroidTest -x lint --stacktrace
script: adb logcat Stardroid:I *:W & ./gradlew connectedGmsDebugAndroidTest -x lint --stacktrace

- run: ls
- run: ls app/build/reports/androidTests/connected/flavors/gms
- name: Grab logs
uses: actions/upload-artifact@v2
with:
name: output-log-file
path: app/build/reports/androidTests/connected/flavors/gms/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ protected void after() {

private SetupRule firstRule = new SetupRule();

@Rule
public ActivityScenarioRule<DynamicStarMapActivity> testRule =
private ActivityScenarioRule<DynamicStarMapActivity> testRule =
new ActivityScenarioRule(DynamicStarMapActivity.class);

@Rule
Expand All @@ -79,12 +78,12 @@ public void disableCalibrationDialog() {

private static final String TAG = "STARTEST";

//@Test
@Test
public void testSkyMapTouchControlsShowAndThenGo() throws Exception {
// Wait for initial controls to go away. This is bad.
// Perhaps use idling resources?
Log.w(TAG, "Waiting....");
Thread.sleep(FullscreenControlsManager.INITIALLY_SHOW_CONTROLS_FOR_MILLIS * 2);
/*Thread.sleep(FullscreenControlsManager.INITIALLY_SHOW_CONTROLS_FOR_MILLIS * 2);
Log.w(TAG, "Click");
onView(withId(R.id.skyrenderer_view)).check(matches(isDisplayed()));
onView(withId(R.id.main_sky_view_root)).perform(click());
Expand All @@ -97,5 +96,7 @@ public void testSkyMapTouchControlsShowAndThenGo() throws Exception {
onView(withId(R.id.main_sky_view_root)).perform(click());
Thread.sleep(100);
onView(withId(R.id.layer_buttons_control)).check(matches(not(withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))));

*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected void after() {
@Rule
public RuleChain chain = RuleChain.outerRule(preferenceCleanerRule).around(testRule);

@Test
//@Test
public void showsWhatsNewAfterTandCs_newUser() throws InterruptedException {
onView(withId(R.id.eula_box_text)).inRoot(isDialog()).check(matches(isDisplayed()));
onView(withId(android.R.id.button1)).inRoot(isDialog()).perform(click());
Expand All @@ -69,7 +69,7 @@ public void showsWhatsNewAfterTandCs_newUser() throws InterruptedException {
onView(withId(R.id.whats_new_box_text)).check(matches(isDisplayed()));
}

@Test
//@Test
public void showNoAcceptTandCs() throws InterruptedException {
Log.d("TESTTEST", "Doing test");
onView(withId(R.id.eula_box_text)).inRoot(isDialog()).check(matches(isDisplayed()));
Expand All @@ -80,7 +80,7 @@ public void showNoAcceptTandCs() throws InterruptedException {
assertThat(testRule.getScenario().getState(), equalTo(Lifecycle.State.DESTROYED));
}

@Test
//@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
Expand Down