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

Outreachy2024/testing system images #289

Open
wants to merge 35 commits into
base: upgrade-jdk11
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
83b69f0
Fix for UI Tests
Stryker101 Jun 1, 2024
1ccb754
Update config.yml
Stryker101 Jun 1, 2024
93138fc
Fix for UI Tests
Stryker101 Jun 1, 2024
bb5ba6c
Update config.yml
Stryker101 Jun 1, 2024
882ac4c
Update config.yml
Stryker101 Jun 1, 2024
bd8faad
Update config.yml
Stryker101 Jun 1, 2024
e9ee2f9
Merge branch 'odk-x:upgrade-jdk11' into upgrade-jdk11
Stryker101 Jun 4, 2024
d56de98
Merge branch 'upgrade-jdk11' of https://github.com/Stryker101/ODK_ser…
Stryker101 Jun 4, 2024
c42011b
fix for ui tests
Stryker101 Jun 4, 2024
8eeed74
attempt to stabilize 1
Stryker101 Jun 6, 2024
b1917fd
rebase with clean history
Stryker101 Jun 8, 2024
1cc4f6d
testing with default system image
Stryker101 Jun 8, 2024
38bd44e
testing with default system image
Stryker101 Jun 8, 2024
853b8b3
testing with default system image
Stryker101 Jun 8, 2024
a012c79
testing with idling resource
Stryker101 Jun 8, 2024
5c95778
testing with idling resource
Stryker101 Jun 8, 2024
f831d69
testing with idling resource corrected
Stryker101 Jun 8, 2024
1921d63
testing with idling resource corrected
Stryker101 Jun 8, 2024
92abddc
testing with idling resource corrected
Stryker101 Jun 8, 2024
591ab6e
testing with idling resource corrected
Stryker101 Jun 8, 2024
d624807
testing with idling resource corrected
Stryker101 Jun 8, 2024
d9c9cbe
testing with idling resource corrected
Stryker101 Jun 8, 2024
cc876c6
testing with idling resource corrected
Stryker101 Jun 8, 2024
38f0cd0
testing with idling resource corrected
Stryker101 Jun 8, 2024
5e26217
testing with idling resource corrected
Stryker101 Jun 8, 2024
4978562
restructure Idling resource
Stryker101 Jun 17, 2024
4b95164
restructure Idling resource
Stryker101 Jun 17, 2024
3be16ad
restructure Idling resource
Stryker101 Jun 17, 2024
f899922
restructure Idling resource
Stryker101 Jun 17, 2024
984f427
using recyclerview idling resource
Stryker101 Jun 17, 2024
c17a6ad
using recyclerview idling resource
Stryker101 Jun 17, 2024
706e85b
using recyclerview idling resource
Stryker101 Jun 17, 2024
47d1672
removed recyclerview idling resource
Stryker101 Jun 17, 2024
ec462fa
added ignore to some tests
Stryker101 Jun 17, 2024
5df9412
added ignore to some tests
Stryker101 Jun 17, 2024
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
Prev Previous commit
Next Next commit
rebase with clean history
Stryker101 committed Jun 8, 2024
commit b1917fddf25bc101c809dfa4423a91329673c59e
114 changes: 1 addition & 113 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -19,27 +19,7 @@ jobs:

- android/create-avd:
avd-name: Pixel_7_Pro
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
system-image: system-images;android-29;google_apis_playstore;x86_64
=======
system-image: system-images;android-33;google_apis_playstore;x86_64
>>>>>>> 9f1ae595 ( Fix for UI Tests)
=======
system-image: system-images;android-29;google_apis_playstore;x86_64
>>>>>>> 3a2a597e ( Fix for UI Tests)
=======
system-image: system-images;android-33;google_apis_playstore;x86_64
>>>>>>> 45a6791e ( Fix for UI Tests)
=======
system-image: system-images;android-30;google_apis_playstore;x86_64
>>>>>>> 51a777b9 (attempt to stabilize 5)
=======
system-image: system-images;android-30;google_apis;x86
>>>>>>> 318f2cff (new system image)
install: true

- run:
@@ -52,36 +32,6 @@ jobs:
restore-gradle-cache-prefix: v1
memory: 4096
post-emulator-launch-assemble-command: ./gradlew installSnapshotDebug
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
=======
environment:
TERM: dumb
>>>>>>> 5bcc7fe2 ( Fix for UI Tests)
=======
>>>>>>> 76b97389 ( Fix for UI Tests)
=======
- run:
name: Wait for Emulator
command: |
# Wait for the emulator to fully boot up
adb wait-for-device
sleep 30
adb shell input keyevent 82
- run:
name: Restart ADB Server
command: |
adb kill-server
adb start-server
adb devices
>>>>>>> c69c8a83 ( Fix for UI Tests)
- android/disable-animations
<<<<<<< HEAD
<<<<<<< HEAD
=======

- android/disable-animations

@@ -93,74 +43,12 @@ jobs:
name: Restart ADB server
command: adb kill-server && adb start-server # Restart ADB server to avoid version mismatch issues

>>>>>>> 85dc4a48 (attempt to stabilize 3)
- android/run-tests:
test-command: ./gradlew testSnapshotDebugUnitTest

- android/run-tests:
<<<<<<< HEAD
<<<<<<< HEAD
test-command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest --info
<<<<<<< HEAD
=======
test-command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest
<<<<<<< HEAD
environment:
TERM: dumb
>>>>>>> 5bcc7fe2 ( Fix for UI Tests)
=======
no-output-timeout: 1h
>>>>>>> e9ef26b7 ( Fix for UI Tests)
=======
command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest --info
no-output-timeout: 30min
>>>>>>> c69c8a83 ( Fix for UI Tests)
=======
- run:
name: Run Unit Tests
command: ./gradlew testSnapshotDebugUnitTest --info
- run:
name: Run Instrumented Tests
command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest --info
<<<<<<< HEAD
=======
- android/disable-animations
<<<<<<< HEAD
- android/run-tests:
test-command: ./gradlew testSnapshotDebugUnitTest --info
- android/run-tests:
<<<<<<< HEAD
test-command:./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest --info
>>>>>>> b9c61bc2 ( Fix for UI Tests)
=======
test-command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest --info
>>>>>>> 418f0144 ( Fix for UI Tests)
=======
- run:
name: Run Unit Tests
command: ./gradlew testSnapshotDebugUnitTest --info
- run:
name: Run Instrumented Tests
command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest --info
>>>>>>> 83c7d35b ( Fix for UI Tests)
no-output-timeout: 30m
>>>>>>> 3fa89f75 ( Fix for UI Tests)
=======
timeout: 30m
>>>>>>> 63c2d1c0 ( Fix for UI Tests)
=======
- android/run-tests:
test-command: ./gradlew testSnapshotDebugUnitTest
- android/run-tests:
<<<<<<< HEAD
test-command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest --info
>>>>>>> 3a2a597e ( Fix for UI Tests)
=======
test-command: ./gradlew grantPermissionForODKXApp connectedSnapshotDebugAndroidTest
>>>>>>> 5df9181a ( Fix for UI Tests)
=======

>>>>>>> 85dc4a48 (attempt to stabilize 3)
- android/save-gradle-cache:
cache-prefix: v1

@@ -212,4 +100,4 @@ workflows:
- build
- test:
requires:
- build
- build
Original file line number Diff line number Diff line change
@@ -75,29 +75,9 @@ public void verifyValuesTest() {
@Ignore
@Test
public void verifyVisibilityTest() {
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
onView(isRoot()).perform(waitFor(2000));
=======
onView(isRoot()).perform(waitFor(TestConsts.WAIT_TIME));
>>>>>>> 924db666 (wait time constant added)
onView(allOf(withId(R.id.btnDrawerOpen), isDisplayed())).check(matches(isDisplayed()));
onView(allOf(withId(R.id.btnDrawerOpen), isDisplayed())).perform(click());
=======
onView(isRoot()).perform(BaseUITest.waitFor(2000));
onView(allOf(withId(R.id.btnDrawerOpen), isDisplayed())).perform(click());
onView(isRoot()).perform(BaseUITest.waitFor(2000));
>>>>>>> 22e6c7c0 ( Fix for UI Tests)
=======
onView(isRoot()).perform(BaseUITest.waitForView(withId(R.id.btnDrawerOpen), 3000));
=======
onView(isRoot()).perform(waitFor(2000));
>>>>>>> a118d2ac ( Fix for UI Tests)
onView(allOf(withId(R.id.btnDrawerOpen), isDisplayed())).check(matches(isDisplayed()));
onView(allOf(withId(R.id.btnDrawerOpen), isDisplayed())).perform(click());
>>>>>>> 45a6791e ( Fix for UI Tests)
onView(withId(R.id.drawer_update_credentials)).check(doesNotExist());
onView(withId(R.id.drawer_switch_sign_in_type)).check(doesNotExist());
}
@@ -133,4 +113,4 @@ protected Intent getLaunchIntent() {
intent.putExtra(IntentConsts.INTENT_KEY_APP_NAME, APP_NAME);
return intent;
}
}
}
Original file line number Diff line number Diff line change
@@ -3,14 +3,7 @@
import static androidx.test.espresso.Espresso.closeSoftKeyboard;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
<<<<<<< HEAD
<<<<<<< HEAD
import static androidx.test.espresso.action.ViewActions.scrollTo;
=======
>>>>>>> 40da2db5 ( Fix for UI Tests)
=======
import static androidx.test.espresso.action.ViewActions.scrollTo;
>>>>>>> 94872db3 ( Fix for UI Tests)
import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA;
@@ -23,18 +16,6 @@
import static com.google.common.truth.Truth.assertThat;

import static org.hamcrest.Matchers.allOf;
<<<<<<< HEAD
=======

import android.content.Context;
import android.content.Intent;
<<<<<<< HEAD
>>>>>>> 45a6791e ( Fix for UI Tests)
=======
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
>>>>>>> d64f219e ( Fix for UI Tests)

import android.content.Context;
import android.content.Intent;
@@ -179,74 +160,14 @@ public void verifyDrawerSwitchSignInTypeClick() {
@Ignore
@Test
public void verifyDrawerSignOutButtonClick() {
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
onView(withId(R.id.btnDrawerOpen)).perform(ViewActions.click());
<<<<<<< HEAD
Espresso.onIdle();
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed()));
=======

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
onView(isRoot()).perform(BaseUITest.waitFor(2000));
>>>>>>> 5bcc7fe2 ( Fix for UI Tests)
=======
onView(isRoot()).perform(BaseUITest.waitForView(withId(R.id.btnDrawerLogin), 2000));
onView(allOf(withId(R.id.btnDrawerLogin), isDisplayed())).check(matches(isDisplayed()));
>>>>>>> 45a6791e ( Fix for UI Tests)
onView(withId(R.id.btnDrawerLogin)).perform(ViewActions.click());
=======
onView(allOf(withId(R.id.btnDrawerLogin), isDisplayed())).check(matches(isDisplayed())).perform(ViewActions.click());
>>>>>>> a118d2ac ( Fix for UI Tests)
=======
onView(allOf(withId(R.id.btnDrawerLogin))).check(matches(isDisplayed())).perform(ViewActions.click());
>>>>>>> d64f219e ( Fix for UI Tests)
=======
onView(withId(R.id.btnDrawerOpen)).perform(click());
<<<<<<< HEAD
<<<<<<< HEAD

<<<<<<< HEAD
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(click());
>>>>>>> 40da2db5 ( Fix for UI Tests)
=======
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(ViewActions.click());
>>>>>>> b1589db3 ( Fix for UI Tests)
=======
closeSoftKeyboard();
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(scrollTo()).perform(ViewActions.click());
>>>>>>> 94872db3 ( Fix for UI Tests)
=======
onView(withId(R.id.toolbarDrawerHeader)).perform(scrollTo());
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(ViewActions.click());
>>>>>>> b0874724 ( Fix for UI Tests)

onView(withId(R.id.tvUserStateMain)).check(matches(withText(getContext().getString(R.string.logged_out))));
onView(withId(R.id.btnDrawerLogin)).check(matches(withText(getContext().getString(R.string.drawer_sign_in_button_text))));

=======
Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();

=======
>>>>>>> 5aac9490 ( Fix for UI Tests)
onView(withId(R.id.btnDrawerOpen)).perform(click());
Espresso.onIdle();
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed()));
onView(withContentDescription("SIGN IN OR OUT")).perform(click());

<<<<<<< HEAD
onView(withContentDescription(context.getString(R.string.drawer_sign_out_button_text))).perform(click());

onView(withId(R.id.tvUserStateMain)).check(matches(withText(context.getString(R.string.logged_out))));
onView(withId(R.id.btnDrawerLogin)).check(matches(withText(context.getString(R.string.drawer_sign_in_button_text))));
>>>>>>> 3ca3e72c ( Fix for UI Tests)
=======
onView(withId(R.id.tvUserStateMain)).check(matches(withText(getContext().getString(R.string.logged_out))));
onView(withId(R.id.btnDrawerLogin)).check(matches(withText(getContext().getString(R.string.drawer_sign_in_button_text))));
>>>>>>> 5aac9490 ( Fix for UI Tests)
onView(withId(R.id.btnSignInMain)).check(matches(isDisplayed()));
}

@@ -258,8 +179,5 @@ protected Intent getLaunchIntent() {
intent.putExtra(IntentConsts.INTENT_KEY_APP_NAME, APP_NAME);
return intent;
}
<<<<<<< HEAD

=======
>>>>>>> d64f219e ( Fix for UI Tests)
}
Original file line number Diff line number Diff line change
@@ -3,14 +3,7 @@
import static androidx.test.espresso.Espresso.closeSoftKeyboard;
import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.action.ViewActions.click;
<<<<<<< HEAD
<<<<<<< HEAD
import static androidx.test.espresso.action.ViewActions.scrollTo;
=======
>>>>>>> 40da2db5 ( Fix for UI Tests)
=======
import static androidx.test.espresso.action.ViewActions.scrollTo;
>>>>>>> 94872db3 ( Fix for UI Tests)
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
@@ -208,67 +201,16 @@ public void verifyDrawerUpdateCredentialsClick() {
@Ignore
@Test
public void verifyDrawerSignOutButtonClick() {
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
onView(withId(R.id.btnDrawerOpen)).perform(ViewActions.click());
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
Espresso.onIdle();
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed()));
=======

<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
onView(isRoot()).perform(BaseUITest.waitFor(2000));
>>>>>>> 5bcc7fe2 ( Fix for UI Tests)
=======
onView(isRoot()).perform(BaseUITest.waitForView(withId(R.id.btnDrawerLogin), 2000));
onView(allOf(withId(R.id.btnDrawerLogin), isDisplayed())).check(matches(isDisplayed()));
>>>>>>> 45a6791e ( Fix for UI Tests)
onView(withId(R.id.btnDrawerLogin)).perform(ViewActions.click());
=======
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(click());

>>>>>>> 40da2db5 ( Fix for UI Tests)
=======
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(ViewActions.click());
>>>>>>> b1589db3 ( Fix for UI Tests)
=======
closeSoftKeyboard();
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(scrollTo()).perform(ViewActions.click());
>>>>>>> 94872db3 ( Fix for UI Tests)
=======
onView(withId(R.id.toolbarDrawerHeader)).perform(scrollTo());
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed())).perform(ViewActions.click());
>>>>>>> b0874724 ( Fix for UI Tests)
=======
Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
onView(withId(R.id.btnDrawerOpen)).perform(click());
Espresso.onIdle();

onView(withContentDescription(context.getString(R.string.drawer_sign_out_button_text))).perform(click());
>>>>>>> 3ca3e72c ( Fix for UI Tests)
=======
onView(withId(R.id.btnDrawerOpen)).perform(ViewActions.click());
Espresso.onIdle();
onView(allOf(withId(R.id.btnDrawerLogin), isDescendantOfA(withId(R.id.toolbarDrawerHeader)))).check(matches(isDisplayed()));
onView(withContentDescription("SIGN IN OR OUT")).perform(click());
>>>>>>> 5aac9490 ( Fix for UI Tests)
=======
onView(withId(R.id.btnDrawerOpen)).perform(click());

onView(isRoot()).perform(BaseUITest.waitForView(withId(R.id.btnDrawerLogin), TestConsts.WAIT_TIME));
onView(withId(R.id.btnDrawerLogin)).perform(click());
onView(isRoot()).perform(BaseUITest.waitFor(TestConsts.WAIT_TIME));
>>>>>>> 924db666 (wait time constant added)

onView(withId(R.id.tvUserStateMain)).check(matches(withText(getContext().getString(R.string.logged_out))));
onView(withId(R.id.btnDrawerLogin)).check(matches(withText(getContext().getString(R.string.drawer_sign_in_button_text))));

onView(withId(R.id.btnSignInMain)).check(matches(isDisplayed()));
}

}
}