-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gulshan Mishra
committed
Oct 9, 2023
1 parent
333d222
commit 0c63b77
Showing
2 changed files
with
12 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,9 +84,17 @@ describe("Form Runtime with Email Input", () => { | |
|
||
it(" Invalid email ID generates error message ", () => { | ||
const [id, fieldView] = Object.entries(formContainer._fields)[0] | ||
const input = "invalidEmail" | ||
cy.get(`#${id}`).find("input").clear().type(input).blur().then(x => { | ||
cy.get('.cmp-adaptiveform-emailinput__errormessage').should('exist'); | ||
const notAllowed = "invalidEmail" | ||
cy.get(`#${id}`).find("input").clear().type(notAllowed).blur().then(x => { | ||
cy.get('.cmp-adaptiveform-emailinput__errormessage').should('be.visible'); | ||
}) | ||
const invalidEmailPattern = "invalidEmail@domain" | ||
cy.get(`#${id}`).find("input").clear().type(invalidEmailPattern).blur().then(x => { | ||
cy.get('.cmp-adaptiveform-emailinput__errormessage').should('be.visible'); | ||
}) | ||
const validEmailPattern = "[email protected]" | ||
cy.get(`#${id}`).find("input").clear().type(validEmailPattern).blur().then(x => { | ||
cy.get('.cmp-adaptiveform-emailinput__errormessage').should('not.be.visible'); | ||
}) | ||
}); | ||
|
||
|