Add UI tests
Noorts opened this issue · comments
Introduction
To be able to test functionality which can't be tested through direct integration tests, we'll have to set up UI tests.
- The intellij-ui-test-robot can be used for this purpose.
- Examples
- An example plugin using the robot can be found in the same repo.
- The intellij-common-ui-test-library also serves an an example.
Approach
Test setup
- Set up
-
build.gradle.kts
to support the robot - A simple UI test to verify that it works
-
CI/CD
We should also integrate the UI tests into the GitHub workflow.
- Add UI tests job. See the example.
- Set up separate "Tests" (the current integration ones), "UI Tests" and "Verify IDE compatibility" jobs in the test.yml to run the jobs in parallel.
Test cases
We should add tests to verify the following scenarios.
- Basic toggle action test
- Verify whether notification shows up
- on toggle action in empty file
- on toggle action with no match
- Configuration menu
- Verify impact of config adjustment on subsequent toggle
- Verify disabling of partial matching and subsequent toggle
- (Opt) Verify Import, Export and Reset to Default functionality
- (Opt) Verify config validation (disallow duplicate toggles, etc.)