Skip to content

Commit

Permalink
Merge branch 'develop' into chore/9998-Usei18nInUnitTests-Home-6
Browse files Browse the repository at this point in the history
  • Loading branch information
kimmccaskill-oddball authored Dec 9, 2024
2 parents 1cc6df4 + 1be9464 commit acb6df6
Show file tree
Hide file tree
Showing 7 changed files with 75 additions and 32 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/e2e_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -250,15 +265,15 @@ 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}}
path: VAMobile/artifacts
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:
Expand Down
2 changes: 1 addition & 1 deletion VAMobile/.detoxrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"emulator": {
"type": "android.emulator",
"device": {
"avdName": "Pixel_4_XL_API_28"
"avdName": "Pixel_6_Pro_API_33"
}
}
},
Expand Down
11 changes: 3 additions & 8 deletions VAMobile/e2e/tests/Appointments.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand All @@ -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')

Expand Down
9 changes: 8 additions & 1 deletion VAMobile/e2e/tests/Claims.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion VAMobile/e2e/tests/HomeScreen.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
})
Expand Down
4 changes: 2 additions & 2 deletions VAMobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/native": "^6.1.18",
"@react-navigation/stack": "^6.4.1",
"@reduxjs/toolkit": "^2.3.0",
"@reduxjs/toolkit": "^2.4.0",
"@tanstack/react-query": "^5.59.15",
"eslint-plugin-tsdoc": "^0.4.0",
"i18next": "^23.7.18",
Expand Down Expand Up @@ -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"
Expand Down
47 changes: 36 additions & 11 deletions VAMobile/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2389,10 +2389,10 @@
color "^4.2.3"
warn-once "^0.1.0"

"@reduxjs/toolkit@^2.3.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-2.3.0.tgz#d00134634d6c1678e8563ac50026e429e3b64420"
integrity sha512-WC7Yd6cNGfHx8zf+iu+Q1UPTfEcXhQ+ATi7CV1hlrSAaQBdlPzg7Ww/wJHNQem7qG9rxmWoFCDCPubSvFObGzA==
"@reduxjs/toolkit@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-2.4.0.tgz#29fd3a19530fc50d648a9b1e0132da0cd5618f19"
integrity sha512-wJZEuSKj14tvNfxiIiJws0tQN77/rDqucBq528ApebMIRHyWpCanJVQRxQ8WWZC19iCDKxDsGlbAir3F1layxA==
dependencies:
immer "^10.0.3"
redux "^5.0.1"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -10357,7 +10357,7 @@ string-natural-compare@^3.0.1:
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -10374,6 +10374,15 @@ string-width@^2.0.0, string-width@^2.1.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^5.0.1, string-width@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794"
Expand Down Expand Up @@ -10503,7 +10512,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -10524,6 +10533,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1, strip-ansi@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -11384,7 +11400,7 @@ word-wrap@~1.2.3:
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f"
integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -11402,6 +11418,15 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit acb6df6

Please sign in to comment.