From 1101564290f467b001bb611b9dd527615b9e6e55 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 4 May 2026 15:00:21 +0200 Subject: [PATCH] Bug 42066: Add a Cypress test Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Lucas Gass --- t/cypress/integration/Auth/csrf.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/t/cypress/integration/Auth/csrf.ts b/t/cypress/integration/Auth/csrf.ts index de649d22f8..c2b40395a1 100644 --- a/t/cypress/integration/Auth/csrf.ts +++ b/t/cypress/integration/Auth/csrf.ts @@ -173,3 +173,19 @@ describe("CSRF", () => { }); }); }); + +describe("Regressions", () => { + it("should allow login after sco", () => { + cy.visitOpac("/cgi-bin/koha/sco/sco-main.pl"); + cy.get("input[name='csrf_token']").then($input => { + const csrf_sco = $input.val(); + cy.visitOpac("/cgi-bin/koha/opac-main.pl"); + cy.get("input[name='csrf_token']").then($input => { + const csrf_main = $input.val(); + expect(csrf_main).to.exist; + expect(csrf_main).to.not.be.empty; + expect(csrf_sco).to.not.equal(csrf_main); + }); + }); + }); +});