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

O3-4396: Synced E2E tests with RefApp config #881

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 3 additions & 0 deletions .github/workflows/e2e-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Sync configuration
run: ./sync.sh

- name: Checkout to the release commit
run: git checkout 'HEAD^{/\(release\)}'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/e2e-tests-on-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Sync configuration
run: ./sync_config.sh

- name: Build and Run Containers
run: docker compose -f e2e_test_support_files/docker-compose-build.yml up -d
Expand Down
52 changes: 52 additions & 0 deletions e2e_test_support_files/config-core_demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"@openmrs/esm-patient-chart-app": {
"restrictByVisitLocationTag": true,
"showUpcomingAppointments": true,
"extensionSlots": {
"action-menu-patient-chart-items-slot": {
"order": ["order-basket-action-menu"]
}
}
},
"@openmrs/esm-ward-app": {
"extensionSlots": {
"action-menu-ward-patient-items-slot": {
"add": ["order-basket-action-menu"]
}
}
},
"@openmrs/esm-service-queues-app": {
"priorityConfigs": [
{
"conceptUuid": "04f6f7e0-e3cb-4e13-a133-4479f759574e",
"tagClassName": "tag",
"tagType": "red"
}
],
"statusConfigs": [
{
"conceptUuid": "51ae5e4d-b72b-4912-bf31-a17efb690aeb",
"iconComponent": "InProgress"
},
{
"conceptUuid": "ca7494ae-437f-4fd0-8aae-b88b9a2ba47d",
"iconComponent": "Group"
},
{
"conceptUuid": "b559fb77-4e1e-4285-b9b7-1d03e0ba983f",
"iconComponent": "Group"
}
],
"concepts": {
"defaultPriorityConceptUuid": "f4620bfa-3625-4883-bd3f-84c2cce14470",
"emergencyPriorityConceptUuid": "04f6f7e0-e3cb-4e13-a133-4479f759574e",
"defaultStatusConceptUuid": "51ae5e4d-b72b-4912-bf31-a17efb690aeb",
"defaultTransitionStatus": "ca7494ae-437f-4fd0-8aae-b88b9a2ba47d"
},
"visitQueueNumberAttributeUuid": "",
"defaultFacilityUrl": ""
},
"@openmrs/esm-styleguide": {
"Brand color #1": "#005d5d"
}
}
2 changes: 1 addition & 1 deletion e2e_test_support_files/docker-compose-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
environment:
SPA_PATH: /openmrs/spa
API_URL: /openmrs
SPA_CONFIG_URLS:
SPA_CONFIG_URLS:/frontend/config-core_demo.json
SPA_DEFAULT_LOCALE:
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost/" ]
Expand Down
18 changes: 18 additions & 0 deletions sync_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Define paths
DEFAULT_REFAPP_CONFIG_PATH="./frontend/config-core_demo.json"
E2E_CONFIG_PATH="./e2e_test_support_files/config-core_demo.json"

# Check if the RefApp configuration file exists
if [ -f "$DEFAULT_REFAPP_CONFIG_PATH" ]; then
# Sync the configuration file
cp "$DEFAULT_REFAPP_CONFIG_PATH" "$E2E_CONFIG_PATH"
echo "Configuration synced successfully to $E2E_CONFIG_PATH!"
else
echo "Error: RefApp configuration file not found at '$DEFAULT_REFAPP_CONFIG_PATH'."
echo "Please check the file path or verify if the file exists."
echo "You can use the following command to locate it:"
echo " find . -name 'config-core_demo.json'"
exit 1
fi