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:
@@ -10,6 +10,7 @@ describe('revert toggle', () => {
|
|||||||
cardIndex: 1, // first is often cleanup that may lack revert button
|
cardIndex: 1, // first is often cleanup that may lack revert button
|
||||||
});
|
});
|
||||||
cy.get('.toggle-switch')
|
cy.get('.toggle-switch')
|
||||||
|
.filter(':visible') // Avoid side-effects from hidden cards
|
||||||
.first()
|
.first()
|
||||||
.as('toggleSwitch');
|
.as('toggleSwitch');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user