From cabbdd8d4811ba4e0fc26932930b51d44778b0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Viricel?= Date: Tue, 30 Jan 2024 17:17:21 +0100 Subject: [PATCH] chore: fix test typing --- cypress/e2e/category/pois-list.cy.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/category/pois-list.cy.ts b/cypress/e2e/category/pois-list.cy.ts index 23a55bf5e..e67a3f9a4 100644 --- a/cypress/e2e/category/pois-list.cy.ts +++ b/cypress/e2e/category/pois-list.cy.ts @@ -1,5 +1,6 @@ import poisCategory22 from '../../fixtures/teritorio/references/pois/category/22.json' import { mockSSRAPI } from '../../support/mock' +import type { ApiPois } from '~/lib/apiPois' import teritorioReferenceAPIFixture from '~/cypress/fixtures/teritorio/references/teritorioReferenceAPIFixture' @@ -20,9 +21,10 @@ describe('pois table', () => { }) it('contain basic table', () => { - if (teritorioReferenceAPIFixture.pois.features[0].properties.editorial?.list_fields?.length) { + const pois = teritorioReferenceAPIFixture.pois as ApiPois + if (pois.features[0].properties.editorial && pois.features[0].properties.editorial.list_fields) { cy.get('th') - .contains(teritorioReferenceAPIFixture.pois.features[0].properties.editorial.list_fields[0].field as string) + .contains(pois.features[0].properties.editorial.list_fields[0].field as string) } cy.get('td')