Add test coverage for remaining controllers, fix label accessibility, refactor duplicated code

New tests (47 added, 622 total):
- MonitorMessengerCommand: no failures, failures with email, null error, multiple (4)
- UnsubscribeController: unsubscribe with invitations refused + admin notified (1)
- AdminController: suspend/reactivate orga, orders page with filters, logs, invite orga submit/empty, delete/resend invitation, export CSV/PDF (13)
- AccountController: export CSV/PDF, getAllowedBilletTypes (free/basic/sur-mesure/null), billet type restriction, finance stats all statuses, soldCounts (9)
- HomeController: city filter, date filter, all filters combined, stock route (4)
- OrderController: event ended, invalid cart JSON, invalid email, stock zero (4)
- MailerService: getAdminEmail, getAdminFrom (2)
- JS: comment node, tabs missing panel/id/parent, cart stock polling edge cases (10)

Accessibility fixes:
- events.html.twig: add for/id on search, city, date labels
- admin/orders.html.twig: add for/id on search, status labels

Code quality:
- cart.js: remove dead ternaire branch (max > 10 always plural)
- tabs.js: use optional chaining for tablist?.setAttribute
- MeilisearchConsistencyCommand: extract diffAndReport() (was duplicated 3x)
- Email templates: extract _order_items_table.html.twig partial
- SonarQube: exclude src/Entity/** from CPD

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Serreau Jovann
2026-03-23 12:11:07 +01:00
parent 42d06dd49f
commit c2ebd291b8
10 changed files with 518 additions and 14 deletions

View File

@@ -140,7 +140,7 @@ export function initCart() {
} else if (max <= 10) {
label.innerHTML = '<span class="text-orange-500">Plus que ' + max + ' place' + (max > 1 ? 's' : '') + ' !</span>'
} else {
label.innerHTML = '<span class="text-gray-400">' + max + ' place' + (max > 1 ? 's' : '') + ' disponible' + (max > 1 ? 's' : '') + '</span>'
label.innerHTML = '<span class="text-gray-400">' + max + ' places disponibles</span>'
}
}
}

View File

@@ -3,9 +3,7 @@ export function initTabs() {
if (buttons.length === 0) return
const tablist = buttons[0].parentElement
if (tablist) {
tablist.setAttribute('role', 'tablist')
}
tablist?.setAttribute('role', 'tablist')
buttons.forEach(button => {
const targetId = button.dataset.tab