We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99ae628 commit cd87648Copy full SHA for cd87648
packages/kit-headless/src/components/modal/modal.spec.tsx
@@ -111,16 +111,19 @@ describe('Modal', () => {
111
});
112
113
it(`GIVEN a Modal
114
- WHEN opening it
+ WHEN opening it with a button
115
AND clicking the backdrop
116
- THEN it is not visible any more`, () => {
+ THEN it is not visible any more
117
+ THEN it focuses the opening button`, () => {
118
cy.mount(<Sut />);
119
120
cy.get('[data-test=modal-trigger]').click();
121
122
cy.get('body').click('top');
123
124
cy.get('dialog').should('not.be.visible');
125
+
126
+ cy.get('[data-test=modal-trigger]').should('be.focused');
127
128
129
it(`Given a Modal
0 commit comments