mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #29273 from overleaf/ii-domain-capture-saml-provider-error-on-join
[web] SAML error messages on domain capture page GitOrigin-RevId: 81f1fe6aafad45e95380cfa4e387d5b9bd04b49d
This commit is contained in:
@@ -5,6 +5,7 @@ describe('<DomainCapture />', 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('<DomainCapture />', 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(<DomainCapture />)
|
||||
@@ -77,4 +82,25 @@ describe('<DomainCapture />', 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(<DomainCapture />)
|
||||
|
||||
cy.findByRole('alert').should('contain.text', errorMsg)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user