Skip to content

Commit

Permalink
bug/10301-rachael-detox-fix-error-in-e2e-mapping (#10302)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbontrager authored Dec 4, 2024
1 parent f4de77a commit b4f65c3
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 21 deletions.
43 changes: 27 additions & 16 deletions .github/workflows/e2e_detox_mapping.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ jobs:
- name: Check if directory/file is in detox mapping
id: detox_mapping_check
run: |
directoryFound="false"
noFileFound="false"
fileNames=$(jq -r '.files' ${{ github.workspace }}/VAMobile/e2e/detoxMapping.json)
directoryNames=$(jq -r '.directory' ${{ github.workspace }}/VAMobile/e2e/detoxMapping.json)
for file in ${{steps.changed_files_file_name.outputs.all_changed_and_modified_files}}; do
Expand All @@ -68,15 +70,21 @@ jobs:
fileFound=$(echo $fileNames | jq --arg fileName "$baseFile" '.[$fileName]')
if [[ "$fileFound" == "null" ]]; then
fileDirectory=$(dirname $file)
baseDirectory=$(echo $fileDirectory | sed 's#.*/##')
baseDirectory=$(echo $baseDirectory | sed 's/ //g')
directoryFound=$(echo $directoryNames | jq --arg fileName "$baseDirectory" '.[$fileName]')
if [[ "$directoryFound" == "null" ]]; then
for directory in $(echo $directoryNames | jq -r 'keys | .[]'); do
if [[ $fileDirectory =~ $directory ]]; then
directoryFound="true"
break
fi
done
if [[ "$directoryFound" == "false" ]]; then
echo "Missing File: $file or missing directory: $fileDirectory"
exit 1
noFileFound="true"
fi
fi
done
if [[ "$noFileFound" == "true" ]]; then
exit 1
fi
- name: Check if directory/file is spelled correctly
id: detox_mapping_spell_check
run: |
Expand Down Expand Up @@ -131,17 +139,20 @@ jobs:
fileFound=$(echo $fileNames | jq --arg fileName "$baseFile" '.[$fileName]')
if [[ "$fileFound" == "null" ]]; then
fileDirectory=$(dirname $file)
baseDirectory=$(echo $fileDirectory | sed 's#.*/##')
baseDirectory=$(echo $baseDirectory | sed 's/ //g')
directoryFound=$(echo $directoryNames | jq --arg fileName "$baseDirectory" '.[$fileName]')
if [[ "$firstInstanceFile" == "true" ]]; then
test_matrix=$directoryFound
test_matrix=$(echo $test_matrix | jq -c '.')
firstInstanceFile="false"
else
test_matrix=$(echo $test_matrix | jq -c '.')
test_matrix=$(echo $test_matrix | jq --argjson matrix "$directoryFound" '. += $matrix')
fi
for directory in $(echo $directoryNames | jq -r 'keys | .[]'); do
if [[ "$fileDirectory" =~ "$directory" ]]; then
directoryFound=$(echo $directoryNames | jq --arg fileName "$directory" -r '.[$fileName]')
if [[ "$firstInstanceFile" == "true" ]]; then
test_matrix=$directoryFound
test_matrix=$(echo $test_matrix | jq -c '.')
firstInstanceFile="false"
else
test_matrix=$(echo $test_matrix | jq -c '.')
test_matrix=$(echo $test_matrix | jq --argjson matrix "$directoryFound" '. += $matrix')
fi
break
fi
done
else
if [[ "$firstInstanceFile" == "true" ]]; then
test_matrix=$fileFound
Expand Down
38 changes: 33 additions & 5 deletions VAMobile/e2e/detoxMapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,12 @@
"ClaimsScreen": ["Appeals", "AppealsExpanded", "Claims"],
"DisabilityRatingsScreen": ["DisabilityRatings", "VeteranStatusCard"],
"Letters": ["VALetters"],
"BenefitsScreen": ["DisabilityRatings", "Claims", "Appeals", "VALetters"],
"HealthScreen": ["Appointments", "AppointmentsExpanded", "Cerner", "Prescriptions", "Messages", "VaccineRecords"],
"Appointments": ["Appointments", "AppointmentsExpanded"],
"CernerAlert": ["Cerner"],
"HealthHelp": ["Cerner"],
"Pharmacy": ["Prescriptions"],
"SecureMessaging": ["Messages"],
"Vaccines": ["VaccineRecords"],
"HomeScreen": ["HomeScreen", "ProfileScreen", "VeteranStatusCard"],
"ContactVAScreen": ["HomeScreen"],
"ProfileScreen": [
"ProfileScreen",
Expand All @@ -122,14 +119,17 @@
"ContactInformationScreen": ["ContactInformation", "VALetters"],
"MilitaryInformationScreen": ["MilitaryInformation", "VeteranStatusCard"],
"PersonalInformationScreen": ["PersonalInformationScreen", "VeteranStatusCard", "HomeScreen", "ProfileScreen"],
"SettingsScreen": ["SettingsScreen"],
"VeteransCrisisLineScreen": ["VeteransCrisisLine", "SignIn"],
"VeteranStatusScreen": ["VeteranStatusCard"],
"OnboardingCarousel": ["Onboarding"],
"PaymentsScreen": ["Payments", "DirectDeposit"],
"DirectDepositScreen": ["DirectDeposit"],
"PaymentHistory": ["Payments"],
"SplashScreen": ["Onboarding", "LoginScreen"],
"BenefitsScreen": ["DisabilityRatings", "Claims", "Appeals", "VALetters"],
"HealthScreen": ["Appointments", "AppointmentsExpanded", "Cerner", "Prescriptions", "Messages", "VaccineRecords"],
"HomeScreen": ["HomeScreen", "ProfileScreen", "VeteranStatusCard"],
"SettingsScreen": ["SettingsScreen"],
"PaymentsScreen": ["Payments", "DirectDeposit"],
"slices": [
"Appeals",
"AppealsExpanded",
Expand Down Expand Up @@ -368,6 +368,34 @@
"VeteransCrisisLine",
"VeteranStatusCard"
],
"App.tsx": [
"Appeals",
"AppealsExpanded",
"Appointments",
"AppointmentsExpanded",
"AvailabilityFramework",
"Cerner",
"Claims",
"ContactInformation",
"DecisionLetters",
"DirectDeposit",
"DisabilityRatings",
"HomeScreen",
"LoginScreen",
"Messages",
"MilitaryInformation",
"Navigation",
"Onboarding",
"Payments",
"PersonalInformationScreen",
"Prescriptions",
"ProfileScreen",
"SettingsScreen",
"VaccineRecords",
"VALetters",
"VeteransCrisisLine",
"VeteranStatusCard"
],
"analytics.ts": [],
"backButtonLabels.ts": [],
"documentTypes.ts": [],
Expand Down

0 comments on commit b4f65c3

Please sign in to comment.