SonarQube CRITICAL CODE_SMELL: Define a constant instead of duplicating this literal "data-test="forgot-passwor #706

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

SonarQube issue detected.

SonarQube key: 07095658-3320-472d-8064-ff179420cd87
Severity: CRITICAL
Type: CODE_SMELL
Location: myvideogamelist:tests/Feature/Auth/PasswordResetTest.php:85
Message: Define a constant instead of duplicating this literal "data-test="forgot-password-username-error"" 3 times.

https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=07095658-3320-472d-8064-ff179420cd87&open=07095658-3320-472d-8064-ff179420cd87

SonarQube issue detected. **SonarQube key:** `07095658-3320-472d-8064-ff179420cd87` **Severity:** `CRITICAL` **Type:** `CODE_SMELL` **Location:** `myvideogamelist:tests/Feature/Auth/PasswordResetTest.php:85` **Message:** Define a constant instead of duplicating this literal "data-test="forgot-password-username-error"" 3 times. https://sonarqube.linuxbox.ninja/project/issues?id=myvideogamelist&issues=07095658-3320-472d-8064-ff179420cd87&open=07095658-3320-472d-8064-ff179420cd87 <!-- sonarqube:issue:07095658-3320-472d-8064-ff179420cd87 -->
Codex self-assigned this 2026-06-10 20:11:46 -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:27 -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#706
No description provided.