diff --git a/front/tests/pages/op-input-table-page-model.ts b/front/tests/pages/op-input-table-page-model.ts index 8a922b257b..02cbfe8732 100644 --- a/front/tests/pages/op-input-table-page-model.ts +++ b/front/tests/pages/op-input-table-page-model.ts @@ -40,15 +40,15 @@ class OperationalStudiesInputTablePage { ) { const translations = selectedLanguage === 'English' ? enTranslations : frTranslations; - const normalizedHeaderName = cleanWhitespace(header); + const expectedHeaderName = cleanWhitespace(header); const headersCount = await this.columnHeaders.count(); let columnIndex = -1; for (let headerIndex = 0; headerIndex < headersCount; headerIndex += 1) { - const headerText = await this.columnHeaders.nth(headerIndex).innerText(); - const normalizedHeaderText = cleanWhitespace(headerText); - if (normalizedHeaderText === normalizedHeaderName) { + const currentColumnHeader = await this.columnHeaders.nth(headerIndex).innerText(); + const currentHeaderName = cleanWhitespace(currentColumnHeader); + if (currentHeaderName === expectedHeaderName) { columnIndex = headerIndex + 1; break; }