diff --git a/cypress/integration/realm_settings_test.spec.ts b/cypress/integration/realm_settings_test.spec.ts index 815076cebb..94c72c63fd 100644 --- a/cypress/integration/realm_settings_test.spec.ts +++ b/cypress/integration/realm_settings_test.spec.ts @@ -70,7 +70,13 @@ describe("Realm settings", () => { realmSettingsPage.save(realmSettingsPage.emailSaveBtn); cy.getId(realmSettingsPage.testConnectionButton).click(); - cy.wait(5000); + + realmSettingsPage.fillEmailField( + "example" + (Math.random() + 1).toString(36).substring(7) + "@example.com" + ); + + cy.getId(realmSettingsPage.modalTestConnectionButton).click(); + masthead.checkNotificationMessage("Error! Failed to send email."); }); diff --git a/cypress/support/pages/admin_console/manage/realm_settings/RealmSettingsPage.ts b/cypress/support/pages/admin_console/manage/realm_settings/RealmSettingsPage.ts index 7d6a86f8a0..b1af8195d9 100644 --- a/cypress/support/pages/admin_console/manage/realm_settings/RealmSettingsPage.ts +++ b/cypress/support/pages/admin_console/manage/realm_settings/RealmSettingsPage.ts @@ -67,6 +67,11 @@ export default class RealmSettingsPage { return this; } + fillEmailField(email: string) { + cy.getId(this.emailAddressInput).type(email); + return this; + } + setDefaultLocale(locale: string) { cy.get(this.selectDefaultLocale).click(); cy.get(this.defaultLocaleList).contains(locale).click();