Browse Source

test: inclusive form submit message validation selector

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/3830/head
Raju Udava 2 years ago
parent
commit
512cb3fed4
  1. 21
      scripts/cypress/integration/common/4c_form_view_detailed.js

21
scripts/cypress/integration/common/4c_form_view_detailed.js

@ -214,9 +214,9 @@ export const genTest = (apiType, dbType) => {
// submit button & validate // submit button & validate
cy.get(".nc-form").find("button").contains("Submit").click(); cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message") cy.get(
.contains("Successfully submitted form data") ".ant-alert-message :contains('Successfully submitted form data')"
.should("exist"); ).should("exist");
// end of test removes newly added rows from table. that step validates if row was successfully added. // end of test removes newly added rows from table. that step validates if row was successfully added.
}); });
@ -238,9 +238,9 @@ export const genTest = (apiType, dbType) => {
// submit button & validate // submit button & validate
cy.get(".nc-form").find("button").contains("Submit").click(); cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message") cy.get(".ant-alert-message :contains('Congratulations!')").should(
.contains("Congratulations!") "exist"
.should("exist"); );
// end of test removes newly added rows from table. that step validates if row was successfully added. // end of test removes newly added rows from table. that step validates if row was successfully added.
}); });
@ -262,9 +262,9 @@ export const genTest = (apiType, dbType) => {
// submit button & validate // submit button & validate
cy.get(".nc-form").find("button").contains("Submit").click(); cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message") cy.get(".ant-alert-message :contains('Congratulations!')").should(
.contains("Congratulations") "exist"
.should("exist"); );
cy.get("button") cy.get("button")
.contains("Submit Another Form") .contains("Submit Another Form")
.should("exist") .should("exist")
@ -288,8 +288,7 @@ export const genTest = (apiType, dbType) => {
// submit button & validate // submit button & validate
cy.get(".nc-form").find("button").contains("Submit").click(); cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message") cy.get(".ant-alert-message :contains('Congratulations!')")
.contains("Congratulations")
.should("exist") .should("exist")
.then(() => { .then(() => {
// validate if form has appeared again // validate if form has appeared again

Loading…
Cancel
Save