From 33844624a9823e4a1ffed439ac9a9c3d15e8595f Mon Sep 17 00:00:00 2001 From: BacLuc Date: Sun, 29 Sep 2024 02:52:21 +0200 Subject: [PATCH] e2e: print first camp with motto in nuxtPrint.cy.js The new J+S course will be the first entry of the camps endpoint. Cypress cannot check null with the contains function, thus we need to test the print preview with a camp with motto. --- e2e/specs/nuxtPrint.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/specs/nuxtPrint.cy.js b/e2e/specs/nuxtPrint.cy.js index 2b45952d08..c49aec3853 100644 --- a/e2e/specs/nuxtPrint.cy.js +++ b/e2e/specs/nuxtPrint.cy.js @@ -8,8 +8,8 @@ describe('Nuxt print test', () => { cy.request(Cypress.env('API_ROOT_URL') + '/camps.jsonhal').then((response) => { const body = response.body - const campUri = body._links.items[1].href - const camp = body._embedded.items[1] + const camp = body._embedded.items.filter((c) => c.motto)[0] + const campUri = camp._links.self.href const printConfig = { language: 'en',