SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "data-test="auth-session-s #705

Closed
opened 2026-06-10 19:33:21 -05:00 by forgejo-actions · 1 comment

SonarQube issue detected.

SonarQube key: 27f05493-b51e-4a51-a85f-be4711c8edae
Severity: CRITICAL
Type: CODE_SMELL
Location: myvideogamelist:tests/Feature/Auth/PasswordResetTest.php:26
Message: Define a constant instead of duplicating this literal "data-test="auth-session-status"" 3 times.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=27f05493-b51e-4a51-a85f-be4711c8edae&open=27f05493-b51e-4a51-a85f-be4711c8edae

SonarQube issue detected. **SonarQube key:** `27f05493-b51e-4a51-a85f-be4711c8edae` **Severity:** `CRITICAL` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:tests/Feature/Auth/PasswordResetTest.php:26` **Message:** Define a constant instead of duplicating this literal "data-test="auth-session-status"" 3 times. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=27f05493-b51e-4a51-a85f-be4711c8edae&open=27f05493-b51e-4a51-a85f-be4711c8edae <!-- sonarqube:issue:27f05493-b51e-4a51-a85f-be4711c8edae -->
Codex self-assigned this 2026-06-10 20:11:45 -05:00
Member

Resolved by extracting duplicated PasswordResetTest data-test selectors into descriptive Pest file-level constants for the auth session status and forgot-password username error elements.

Verification:

  • php artisan test --compact tests/Feature/Auth/PasswordResetTest.php (14 passed, 66 assertions)
  • vendor/bin/pint --dirty --format agent

Committed and pushed as 6c0e1be.

Resolved by extracting duplicated PasswordResetTest data-test selectors into descriptive Pest file-level constants for the auth session status and forgot-password username error elements. Verification: - php artisan test --compact tests/Feature/Auth/PasswordResetTest.php (14 passed, 66 assertions) - vendor/bin/pint --dirty --format agent Committed and pushed as 6c0e1be.
Codex 2026-06-10 20:14:26 -05:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#705
No description provided.