Resolve errors reported by new linter rules and rename data-test to data-testid
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Complexity: Low
Target branch: testing-library-lint
Context
(1) https://github.com/learningequality/kolibri/pull/14579 (testing-library-lint branch) introduces two new linter rules for frontend tests.
tests-no-hardcoded-stringstests-no-stubs
and related developer documentation.
(2) Data test IDs are inconsistend. Testing Library tests use data-testid and Vue Test Utils test use data-test. We'd like to use only data-testid.
The Change
A pull request to testing-library-lint branch that
(1) Fixes errors reported by running the two new lint rules as per developer guidance.
(2) Renames all occurences of data-test in the codebase to data-testid. Cleans up configure({ testIdAttribute: 'data-test' }) and alike.
After all changes are done, linter and frontend tests must pass.
AI usage
None
Plan: Fix lint violations from two new ESLint rules (tests-no-hardcoded-strings, tests-no-stubs) and standardize all test ID attributes from data-test to data-testid.
- [ ] Verify branch and baseline
- [ ] Bulk rename
data-testattribute in all Vue and JS files - [ ] Remove
configure({ testIdAttribute: ... })overrides - [ ] Get the exact list of violations
- [ ] Fix each stubs violation
- [ ] Get the exact list of violations
- [ ] Fix each hardcoded-string violation
- [ ] Concrete fixes for known tricky violations
- [ ] Commit Phase 3 fixes
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
@rtibblesbot sounds good, feel free to begin. Refer to the developer documentation updates in the aforementioned PR for guidance on how to fix lint errors.
Closing in favor of https://github.com/learningequality/kolibri/issues/14599 (data-test part resolved by https://github.com/learningequality/kolibri/pull/14594)