From 4a7efa27c8df73ef9b7960afed29f216b066cba2 Mon Sep 17 00:00:00 2001 From: undergroundwires Date: Wed, 15 May 2024 09:03:18 +0200 Subject: [PATCH] Fix e2e test failing on Windows The recent addition of revert logic in first visible card on Windows (Privacy Cleanup) in cec0b4b, introduced an issue where end-to-end (e2e) started failing due to the handling of hidden elements. This commit improves the test to correctly handle the hidden card scenario, explicitly filtering visible elements to ensure that only visible elements are handled. --- tests/e2e/revert-toggle.cy.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/e2e/revert-toggle.cy.ts b/tests/e2e/revert-toggle.cy.ts index 3dce30a3..6f2b50df 100644 --- a/tests/e2e/revert-toggle.cy.ts +++ b/tests/e2e/revert-toggle.cy.ts @@ -10,6 +10,7 @@ describe('revert toggle', () => { cardIndex: 1, // first is often cleanup that may lack revert button }); cy.get('.toggle-switch') + .filter(':visible') // Avoid side-effects from hidden cards .first() .as('toggleSwitch'); });