Closed b-f-chan closed 3 years ago
Did joint testing with @anncatton on Staging. Scenarios #2, 3, 4 were producible, error message showed up correctly. Scenario #1 is more difficult to produce and also not highly likely, for now we will skip testing on this particular one and consider this complete.
One enhancement in future shall be handled in dms-ui#71, but not critical for March 31 sign-off.
Add error handling to the DMS-UI in case the configured Project ID in the config file doesn't actually exist or match any projects configured in Arranger itself.
The User will create a Project in Arranger, but then must supply the Project ID, Arranger ES Alias Name, and ES Index Name to the Installer script so the DMS-UI can use the correct values to start up.
Since this config is currently a manual process, it is possible that someone might create the Project ID as "Test1234" but accidentally enter "Test123" in the Installer prompt. DMS-UI should detect the mismatch and display a graceful error message/page indicating so.
Overall, there are 4 checks done, in order below, which may yield different messages:
(1) There are some configured values missing for Project ID, Index, Alias (graphQL field)
Note this message will only display the exact fields missing, list will display below error text
The project ID, Elasticsearch index, index alias ("graphQL field") values required by the DMS portal do not exist. Make sure the values are specified in the config.yaml file during DMS installation and have been used to create your project in the Arranger Admin UI.
(2) There are NO active projects in Arranger
No active projects for the DMS portal exist. Make sure the project specified in the config.yam file during DMS installation has been created in the Arranger Admin UI.
(3) Configured Project ID does not exist in Arranger)
The project ID {yourProject} configured for the DMS portal does not match any existing project. Make sure the project ID specified in the config.yaml file during DMS installation has been created in the Arranger Admin UI.
(4) Index and/or graphQL field do not match expected config:
The Elasticsearch index name {myIndex} and/or the alias name ("graphqlField") {graphqlField} required by the DMS portal does not match your configured project ID {myProject}. Make sure the values specified in the config.yaml file during DMS installation have been used to create your project in the Arranger Admin UI.
Zeplin links Error1: https://zpl.io/amjYKJ9 Error2: https://zpl.io/aM6Q7zm Error3: https://zpl.io/aR6DDrg Error4: https://zpl.io/bzP99kl