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
cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message")
.contains("Successfully submitted form data")
.should("exist");
cy.get(
".ant-alert-message :contains('Successfully submitted form data')"
).should("exist");
// 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
cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message")
.contains("Congratulations!")
.should("exist");
cy.get(".ant-alert-message :contains('Congratulations!')").should(
"exist"
);
// 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
cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message")
.contains("Congratulations")
.should("exist");
cy.get(".ant-alert-message :contains('Congratulations!')").should(
"exist"
);
cy.get("button")
.contains("Submit Another Form")
.should("exist")
@ -288,8 +288,7 @@ export const genTest = (apiType, dbType) => {
// submit button & validate
cy.get(".nc-form").find("button").contains("Submit").click();
cy.get(".ant-alert-message")
.contains("Congratulations")
cy.get(".ant-alert-message :contains('Congratulations!')")
.should("exist")
.then(() => {
// validate if form has appeared again

Loading…
Cancel
Save