cht-core
cht-core copied to clipboard
Standardise on a single configuration for e2e tests
Significant delays and flakiness in our e2e tests is caused by changing the configuration between tests. When the configuration is changed api copies it to medic-client, which causes a change notification, which shows a update modal, which has to be clicked to refresh the page, and then the test has to wait for page loading to complete. Finally in teardown the configuration has to be reset for the next test.
Instead we should set one configuration at the start which is used for all tests. Most tests don't require special configuration so this will work well. For those that do it's acceptable to have a specific form (for example) that's only used for one test.
There may be cases where we want to test if a setting is on and test if it's off which is impossible with the proposed solution. It's probably ok to drop the less common test in this case so long as it's covered by integration or unit tests.
Ideally we'd use the standard configuration for tests but I think that would require significant changes to our tests and isn't necessary to close out this issue.
Deprioritised out of this release.
Update on this - instead of a single config, we should have a single config per suite.
@garethbowen . I think this has been sorted @garethbowen . We have separated standard tests from default
├── default
├── default-mobile
├── protractor
├── standard
└── upgrade
I think we can do more. There are still tests which change config in setup for example.