Add Lighthouse accessibility tests for Calc, Draw, Impress, and Writer
- Created new Cypress test files for Lighthouse accessibility audits in the Calc, Draw, Impress, and Writer
- Each test file sets up the respective document and performs a Lighthouse audit with an accessibility score target of 100
- "@cypress-audit/lighthouse" is being used to write this accessibility tests
To run individually:
~~1. Writer: make -C cypress_test/ check-desktop spec=writer/lighthouse_accessibility_spec.js CYPRESS_BROWSER="chrome"
2. Calc: make -C cypress_test/ check-desktop spec=calc/lighthouse_accessibility_spec.js CYPRESS_BROWSER="chrome"
3. Impress: make -C cypress_test/ check-desktop spec=impress/lighthouse_accessibility_spec.js CYPRESS_BROWSER="chrome"
4. Draw: make -C cypress_test/ check-desktop spec=draw/lighthouse_accessibility_spec.js CYPRESS_BROWSER="chrome"~~
Now, we can run all by just executing make check-lighthouse
Change-Id: I83cba659056cc43f804cf512c0f93abf923fa5c3
Checklist
- [ ] I have run
make prettier-writeand formatted the code. - [ ] All commits have Change-Id
- [ ] I have run tests with
make check - [ ] I have issued
make runand manually verified that everything looks okay - [ ] Documentation (manuals or wiki) has been updated or is not required
Love this; OTOH - do you know that we will create empty files from zero length files based on the extension - always nice to keep the repository as empty as possible; could you zero those out ?
Is there some way we can share even more code from those duplicated tests ?
But overall - this is a really great win - good stuff :-)
cc: @mohit-marathe , so you are aware there is new kind of tests :)
For me it doesn't do any check as "custom chromium is not supported", tests pass... So not sure if it works here on CI as we don't see any logs. Let's verify.
Can we trigger some fail in one of these tests? so it will print logs :)
lighthouse_accessibility_spec.js.mp4
Thanks @eszkadev for pointing out this :)
It seems cypress-audit/lighthouse has very limited browser support. currently, it is working expected for chrome and since we also want that we can add checks to only run for chrome browser and directly fail early otherwise.
I pushed the latest changes. Let's wait for CI 🙏🏻
@rparth07 writer/sidebar_spec.js and calc/cell_cursor_spec.js have been fixed now. can you please rebase?