diff --git a/services/web/test/frontend/features/group-management/components/domain-capture.spec.tsx b/services/web/test/frontend/features/group-management/components/domain-capture.spec.tsx index e38134c712..47abc81cd8 100644 --- a/services/web/test/frontend/features/group-management/components/domain-capture.spec.tsx +++ b/services/web/test/frontend/features/group-management/components/domain-capture.spec.tsx @@ -5,6 +5,7 @@ describe('', function () { this.email = 'user@example.com' this.groupName = 'test-group' this.ssoInitPath = '/sso/init/path' + this.notificationsInstitution = [] cy.window().then(win => { win.metaAttributesCache.set('ol-user', { @@ -15,6 +16,10 @@ describe('', function () { win.metaAttributesCache.set('ol-email', this.email) win.metaAttributesCache.set('ol-groupName', this.groupName) win.metaAttributesCache.set('ol-ssoInitPath', this.ssoInitPath) + win.metaAttributesCache.set( + 'ol-notificationsInstitution', + this.notificationsInstitution + ) }) cy.mount() @@ -77,4 +82,25 @@ describe('', function () { ) }) }) + + it('renders institution error message', function () { + const errorMsg = 'Error message' + const notificationsInstitution = [ + { + templateKey: 'notification_institution_sso_error', + error: { + message: errorMsg, + }, + }, + ] + cy.window().then(win => { + win.metaAttributesCache.set( + 'ol-notificationsInstitution', + notificationsInstitution + ) + }) + cy.mount() + + cy.findByRole('alert').should('contain.text', errorMsg) + }) })