Skip to content

Commit

Permalink
Corrige l'affichage du bandeau "Audit en cours" (#659)
Browse files Browse the repository at this point in the history
* add results length condition to get audit status

* update changelog
  • Loading branch information
bellangerq authored Feb 16, 2024
1 parent 293d29b commit 609211d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Tous les changements notables de Ara sont documentés ici avec leur date, leur catégorie (nouvelle fonctionnalité, correction de bug ou autre changement) et leur pull request (PR) associée.

## 16/02/2024

### Corrections 🐛

- Corrige l’affichage du bandeau "Audit en cours" qui parfois n’était pas visible ([#659](https://github.com/DISIC/Ara/pull/659))

## 31/01/2024

### Corrections 🐛
Expand Down
8 changes: 6 additions & 2 deletions confiture-web-app/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ export function getCriteriaCount(auditType: AuditType): number {
}

/**
* Return the audit status based on the completion of criteria and a11y statement.
* Return the audit status based on:
* - the number of results (criteria count * number of pages)
* - the status of each criteria
* - the completion of a11y statement
*/
export function getAuditStatus(report: AuditReport): string {
if (
!report?.results.length ||
report.results.length !==
getCriteriaCount(report.auditType) * report.pageDistributions.length ||
report?.results.some((r) => r.status === CriteriumResultStatus.NOT_TESTED)
) {
return AuditStatus.IN_PROGRESS;
Expand Down

0 comments on commit 609211d

Please sign in to comment.