diff --git a/src/components/Summary/Summary.stories.js b/src/components/Summary/Summary.stories.js index c918d273c..fd4e1e8d8 100644 --- a/src/components/Summary/Summary.stories.js +++ b/src/components/Summary/Summary.stories.js @@ -209,9 +209,14 @@ export const MultipleRequiredStatements = { const submitButton = canvas.getByRole('button', {name: 'Confirm'}); expect(submitButton).toHaveAttribute('aria-disabled', 'true'); + const submitButtonWrapper = submitButton.parentElement; + expect(submitButtonWrapper.classList).toContain( + 'openforms-disabled-clickable-button__clickable-wrap' + ); + // Clicking 'submit' without checking the statements results in all the warnings being // displayed - await userEvent.click(submitButton); + await userEvent.click(submitButtonWrapper); expect( await canvas.findByText('U moet akkoord gaan met het privacybeleid om door te gaan') ).toBeVisible(); @@ -243,7 +248,9 @@ export const MultipleRequiredStatements = { expect( canvas.queryByText('U moet akkoord gaan met het privacybeleid om door te gaan') ).toBeNull(); - expect(submitButton).not.toHaveAttribute('aria-disabled', 'true'); + + const updatedSubmitButton = canvas.getByRole('button', {name: 'Confirm'}); + expect(updatedSubmitButton).toHaveAttribute('aria-disabled', 'false'); } ); },