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.
This commit is contained in:
undergroundwires
2024-05-15 09:03:18 +02:00
parent cec0b4b4f6
commit 4a7efa27c8

View File

@@ -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');
});