Skip to content

Commit

Permalink
FORMS-14275 Embed config override tests apply (#1294)
Browse files Browse the repository at this point in the history
* FORMS-14275 test cases applied

* FORMS-14275 test cases wait removed

* FORMS-14275 test cases fixed

---------

Co-authored-by: Rajat Khurana <[email protected]>
  • Loading branch information
rajatofficial and rajatkhurana-adobe authored Jun 28, 2024
1 parent debfe3b commit 1da1a32
Showing 1 changed file with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,34 @@ describe("Form in site using embed container", () => {
beforeEach(function () {
cy.previewForm(pagePath, {multipleEmbedContainers: true}).then(p => {
formContainer = p;
})
});
})

it("should render two form", () => {
expect(formContainer.length).to.equal(2);
});

it.skip("should submit on button click and thank you message of embed container must be overridden", () => {
if(cy.af.isLatestAddon) {
it("should submit on button click and thank you message of embed container must be overridden", () => {
cy.intercept({
method: 'POST',
url: '**/adobe/forms/af/submit/*',
}).as('afSubmission');
cy.get(`.cmp-adaptiveform-button__widget`).eq(0).should('be.visible').click().then(() => {
cy.get('body').should('contain', "Thank You message from sites.\n")
method: 'POST',
url: '**/adobe/forms/af/submit/*',
}).as('afSubmission');
cy.get(`.cmp-adaptiveform-button__widget`).eq(0).click().then(() => {
cy.get('body').should('contain', "Thank You message from sites.")
});
});
});

it.skip("should submit on button click and thank you message of embed container must be overridden", () => {
cy.intercept({
method: 'POST',
url: '**/adobe/forms/af/submit/*',
}).as('afSubmission');
cy.get(`.cmp-adaptiveform-button__widget`).eq(1).should('be.visible').click().then(() => {
cy.get('body').should('contain', "Thank You message from new form in sites.\n")
it("should submit on button click and thank you message of embed container must be overridden", () => {
cy.intercept({
method: 'POST',
url: '**/adobe/forms/af/submit/*',
}).as('afSubmission');
cy.get(`.cmp-adaptiveform-button__widget`).eq(1).click().then(() => {
cy.get('body').should('contain', "Thank You message from new form in sites.")
});
});
});
}
})
});

0 comments on commit 1da1a32

Please sign in to comment.