From 95a13263299c27402bdb05b540fa7dd49ddc5303 Mon Sep 17 00:00:00 2001 From: Rachael Bontrager Date: Wed, 4 Dec 2024 14:39:11 -0600 Subject: [PATCH 1/2] CU/10195-rachael-detox-update-android-version (#10197) --- .github/workflows/e2e_android.yml | 31 +++++++++++++++++++------- VAMobile/.detoxrc.json | 2 +- VAMobile/e2e/tests/Appointments.e2e.ts | 11 +++------ VAMobile/e2e/tests/Claims.e2e.ts | 9 +++++++- VAMobile/e2e/tests/HomeScreen.e2e.ts | 3 ++- 5 files changed, 37 insertions(+), 19 deletions(-) diff --git a/.github/workflows/e2e_android.yml b/.github/workflows/e2e_android.yml index e97c3c8f9dc..1f98ad699f7 100644 --- a/.github/workflows/e2e_android.yml +++ b/.github/workflows/e2e_android.yml @@ -204,12 +204,27 @@ jobs: uses: reactivecircus/android-emulator-runner@v2 with: working-directory: VAMobile - api-level: 28 + api-level: 33 profile: pixel_6_pro force-avd-creation: false disable-animations: true arch: x86_64 - avd-name: Pixel_4_XL_API_28 + avd-name: Pixel_6_Pro_API_33 + script: yarn e2e:android-test /e2e/tests/${{matrix.testsuite}} --updateSnapshot + continue-on-error: true + + - name: Run e2e tests for Android - Full Test - Retry + id: run_e2e_tests_full_retry + if: steps.run_e2e_tests.outcome == 'failure' + uses: reactivecircus/android-emulator-runner@v2 + with: + working-directory: VAMobile + api-level: 33 + profile: pixel_6_pro + force-avd-creation: false + disable-animations: true + arch: x86_64 + avd-name: Pixel_6_Pro_API_33 script: yarn e2e:android-test /e2e/tests/${{matrix.testsuite}} --updateSnapshot continue-on-error: true @@ -219,12 +234,12 @@ jobs: uses: reactivecircus/android-emulator-runner@v2 with: working-directory: VAMobile - api-level: 28 + api-level: 33 profile: pixel_6_pro force-avd-creation: false disable-animations: true arch: x86_64 - avd-name: Pixel_4_XL_API_28 + avd-name: Pixel_6_Pro_API_33 script: yarn e2e:android-test /e2e/tests/Navigation.e2e AvailabilityFramework.e2e ${{matrix.testsuite}}.e2e --updateSnapshot continue-on-error: true @@ -234,12 +249,12 @@ jobs: uses: reactivecircus/android-emulator-runner@v2 with: working-directory: VAMobile - api-level: 28 + api-level: 33 profile: pixel_6_pro force-avd-creation: false disable-animations: true arch: x86_64 - avd-name: Pixel_4_XL_API_28 + avd-name: Pixel_6_Pro_API_33 script: yarn e2e:android-test /e2e/tests/Navigation.e2e AvailabilityFramework.e2e ${{matrix.testsuite}}.e2e --updateSnapshot - name: Upload e2e-junit @@ -250,7 +265,7 @@ jobs: path: VAMobile/e2e/test_reports/e2e-junit.xml - name: Upload artifacts on failure - if: failure() || steps.run_e2e_tests.outcome == 'failure' + if: failure() || steps.run_e2e_tests_full_retry.outcome == 'failure' uses: actions/upload-artifact@v4 with: name: detox-artifacts-${{ runner.os }}-${{ github.run_id }}-${{matrix.testsuite}} @@ -258,7 +273,7 @@ jobs: retention-days: 1 - name: Fail workflow if needed(View e2e step for details) - if: steps.run_e2e_tests.outcome == 'failure' + if: steps.run_e2e_tests_full_retry.outcome == 'failure' run: exit 1 output-slack-results-and-update-detox-failure-ticket: diff --git a/VAMobile/.detoxrc.json b/VAMobile/.detoxrc.json index fd6d707132b..45067b8a2a8 100644 --- a/VAMobile/.detoxrc.json +++ b/VAMobile/.detoxrc.json @@ -34,7 +34,7 @@ "emulator": { "type": "android.emulator", "device": { - "avdName": "Pixel_4_XL_API_28" + "avdName": "Pixel_6_Pro_API_33" } } }, diff --git a/VAMobile/e2e/tests/Appointments.e2e.ts b/VAMobile/e2e/tests/Appointments.e2e.ts index ba247203cfd..daa99b1819b 100644 --- a/VAMobile/e2e/tests/Appointments.e2e.ts +++ b/VAMobile/e2e/tests/Appointments.e2e.ts @@ -41,6 +41,7 @@ describe('Appointments Screen', () => { .scroll(200, 'down') await element(by.text('Vilanisi Reddy')).tap() if (device.getPlatform() === 'android') { + await device.disableSynchronization() await element(by.id(CommonE2eIdConstants.ADD_TO_CALENDAR_ID)).atIndex(0).tap() await device.takeScreenshot('appointmentCalendar') await device.launchApp({ newInstance: false }) @@ -50,14 +51,8 @@ describe('Appointments Screen', () => { await device.takeScreenshot('appointmentGetDirections') await device.launchApp({ newInstance: false }) - await device.disableSynchronization() - await element(by.id(CommonE2eIdConstants.CALL_VA_TTY_PHONE_NUMBER_ID)).atIndex(0).tap() - await device.takeScreenshot('appointmentVALocationPhoneNumber') - await device.launchApp({ newInstance: false }) - - await element(by.id(CommonE2eIdConstants.CALL_VA_PHONE_NUMBER_ID)).atIndex(0).tap() - await device.takeScreenshot('apointmentVALocationTTY') - await device.launchApp({ newInstance: false }) + await expect(element(by.id(CommonE2eIdConstants.CALL_VA_TTY_PHONE_NUMBER_ID)).atIndex(0)).toExist() + await expect(element(by.id(CommonE2eIdConstants.CALL_VA_PHONE_NUMBER_ID)).atIndex(0)).toExist() await element(by.id('UpcomingApptDetailsTestID')).scrollTo('bottom') diff --git a/VAMobile/e2e/tests/Claims.e2e.ts b/VAMobile/e2e/tests/Claims.e2e.ts index 4309db11d83..6ebde3a95b0 100644 --- a/VAMobile/e2e/tests/Claims.e2e.ts +++ b/VAMobile/e2e/tests/Claims.e2e.ts @@ -220,6 +220,10 @@ describe('Claims Screen', () => { }) it('should verify details of claim on step 2', async () => { + await waitFor(element(by.id(ClaimsE2eIdConstants.CLAIM_3_ID))) + .toBeVisible() + .whileElement(by.id(CommonE2eIdConstants.CLAIMS_HISTORY_SCROLL_ID)) + .scroll(100, 'down') await element(by.id(ClaimsE2eIdConstants.CLAIM_3_ID)).tap() await expect(element(by.id('Step 2 of 5. Initial review. Current step. Step 1 complete.'))).toExist() await expect( @@ -351,7 +355,10 @@ describe('Claims Screen', () => { it('should verify details of claim on step 5', async () => { await element(by.id(CommonE2eIdConstants.CLAIMS_HISTORY_SCROLL_ID)).scrollTo('top') await element(by.id(ClaimsE2eIdConstants.CLAIM_2_ID)).tap() - await element(by.id(CommonE2eIdConstants.CLAIMS_DETAILS_SCREEN_ID)).scrollTo('bottom') + await waitFor(element(by.id('Step 5 of 5. Complete. Complete.'))) + .toBeVisible() + .whileElement(by.id(CommonE2eIdConstants.CLAIMS_DETAILS_SCREEN_ID)) + .scroll(100, 'down') await element(by.id('Step 5 of 5. Complete. Complete.')).tap() await expect(element(by.text('Complete')).atIndex(1)).toExist() await element(by.id(CommonE2eIdConstants.CLAIMS_DETAILS_BACK_ID)).tap() diff --git a/VAMobile/e2e/tests/HomeScreen.e2e.ts b/VAMobile/e2e/tests/HomeScreen.e2e.ts index 06f5abbbc6e..62790a7b9ff 100644 --- a/VAMobile/e2e/tests/HomeScreen.e2e.ts +++ b/VAMobile/e2e/tests/HomeScreen.e2e.ts @@ -33,7 +33,8 @@ describe('Home Screen', () => { }) it(':android: should disable AF use case 3', async () => { - await disableAF(undefined, 'WG_Home', undefined, 'AllowFunction') + await device.uninstallApp() + await device.installApp() await device.launchApp({ newInstance: true, permissions: { notifications: 'YES' } }) await loginToDemoMode() }) From 966bb3a1bc604187a9c7cd73a43ec9a9451e5292 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 12:57:10 -0800 Subject: [PATCH 2/2] Bump react-native-webview from 13.12.3 to 13.12.4 in /VAMobile (#10257) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tim Wright <459581+timwright12@users.noreply.github.com> Co-authored-by: Theo Bentum --- VAMobile/package.json | 2 +- VAMobile/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/VAMobile/package.json b/VAMobile/package.json index 0dff0f1082d..96029b501eb 100644 --- a/VAMobile/package.json +++ b/VAMobile/package.json @@ -83,7 +83,7 @@ "react-native-svg-transformer": "^1.5.0", "react-native-toast-notifications": "^3.4.0", "react-native-webp-format": "^1.2.0", - "react-native-webview": "^13.12.3", + "react-native-webview": "^13.12.4", "react-redux": "^9.1.2", "styled-components": "^5.3.10", "underscore": "^1.13.7" diff --git a/VAMobile/yarn.lock b/VAMobile/yarn.lock index 52e0216a20d..b574f0c11e1 100644 --- a/VAMobile/yarn.lock +++ b/VAMobile/yarn.lock @@ -9388,10 +9388,10 @@ react-native-webp-format@^1.2.0: resolved "https://registry.yarnpkg.com/react-native-webp-format/-/react-native-webp-format-1.2.0.tgz#6c7cbed4cdc8247711c7d7f656d0d4f739836c82" integrity sha512-tUL/AbM6QwUsxsGutJ1bN4RW8JdD2w5Mpj+An4DvYKkm0bKHbODj7U7gI1+8X68GqJWOy+Ps2cbVmgNpSDfRPQ== -react-native-webview@^13.12.3: - version "13.12.3" - resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.12.3.tgz#3aa9d2fc982ba2681e56d3e96e22b63a0d929270" - integrity sha512-Y1I5YyDYyE7NC96RHLhd2nxh7ymLYOYLTefgx5ixxw2OToQK0ow3OJ+o77QcI1Tuevj5PCxwqC/14ceS/7yPJQ== +react-native-webview@^13.12.4: + version "13.12.4" + resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.12.4.tgz#1a563a7fbd6bf53d688388d46708f273ed0ebb94" + integrity sha512-8lWeYPVWeOj0ya9ZpDesOQPRgczuN3ogQHlhS21sNXndd4kvfPG+WjlRdrvxYgj//udpwmzcWzagwLnEp60Aqg== dependencies: escape-string-regexp "^4.0.0" invariant "2.2.4"