impactx
impactx copied to clipboard
[Draft] Unit Test for dashboard
This PR introduces the first unit test for the ImpactX dashboard, leveraging the SeleniumBase library to simulate a simulation run by a user with the GUI.
Key Features
- The unit test runs a simulation using the parameters from the FODO cell example on the GUI. (takes ~1 minute)
- The test is considered successful if the simulation is completed without errors.
Issues
- ~~Dependency on Running Dashboard:~~
- ~~The current implementation requires the ImpactX dashboard to run in a separate terminal before executing the test via
pytest.~~ - ~~Can investigate to potentially have dashboard be launched within the test itself.~~
- ~~Unit test is flaky with passing/failing, unsure if this is due to code error or error in pytest implementation. Need to investigate. Started occurring after the implementation of subprocess.~~
- ~~The current implementation requires the ImpactX dashboard to run in a separate terminal before executing the test via
- Adding seleniumbase as a dependency
- Unsure where to add. (implemented incorrectly)
Checklist
- [X] Implement unit test for impactx-dashboard (testing with FODO cell simulation parameters.
- [X] Automate the dashboard launch within the test.
- [X] Fix flaky unit test
- [x] Include seleniumbase dependency in CI test files
- [x] Include trame dependencies in CI test files
- [ ] Fix headless state for ctest
Resolves #667