From 8f4f7ba4299ce267f2ddbb09a8bfdc354b192900 Mon Sep 17 00:00:00 2001 From: lauramekaj1 <165822427+lauramekaj1@users.noreply.github.com> Date: Tue, 12 Aug 2025 13:01:05 +0200 Subject: [PATCH 1/6] check failing tests --- tests/cypress/e2e/Form Templates/FormTemplates.cy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cypress/e2e/Form Templates/FormTemplates.cy.js b/tests/cypress/e2e/Form Templates/FormTemplates.cy.js index 980b53d4ef..0ccbe6105c 100644 --- a/tests/cypress/e2e/Form Templates/FormTemplates.cy.js +++ b/tests/cypress/e2e/Form Templates/FormTemplates.cy.js @@ -3,6 +3,7 @@ describe("Form Templates page", () => { cy.login(); cy.visit('/wp-admin/admin.php?page=formidable-form-templates'); cy.viewport(1280, 720); + }); it("should validate page content", () => { From 93e3986a1960d29e9b53e3976fcbe13b69b485da Mon Sep 17 00:00:00 2001 From: lauramekaj1 <165822427+lauramekaj1@users.noreply.github.com> Date: Tue, 12 Aug 2025 15:19:01 +0200 Subject: [PATCH 2/6] update failing tests --- .../e2e/Entries/EntriesPageDataValidations.cy.js | 3 ++- tests/cypress/e2e/Forms/formPageDataValidation.cy.js | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js b/tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js index a7b682ff66..056de65414 100644 --- a/tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js +++ b/tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js @@ -52,7 +52,8 @@ describe("Entries submitted from a form", () => { cy.get('.frm-tip-cta').then(($el) => { const text = $el.text().trim(); expect(text).to.be.oneOf([ - "Upgrade to Pro." + "Upgrade to Pro.", + "Get 60% Off Pro!" ]); }) diff --git a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js index fc530e65e5..bbe27a2e2c 100644 --- a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js +++ b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js @@ -18,19 +18,20 @@ describe("Forms page", () => { const text = $el.text().trim(); const href = $el.attr('href'); - if (href && (text.includes('upgrading to PRO') || text.match(/GET \d+% OFF|SAVE \d+%/))) { + if (href && (text.includes('upgrading to PRO') || text.match('Get 60% Off Pro!') || text.match(/GET \d+% OFF|SAVE \d+%/))) { cy.origin('https://formidableforms.com', { args: { href } }, ({ href }) => { cy.visit(href); cy.get('h1').should(($h1) => { const headingText = $h1.text(); expect([ 'The Only WordPress Form Maker & Application Builder Plugin', - 'Upgrade Today to Unlock the Full Power of Formidable Forms' + 'Upgrade Today to Unlock the Full Power of Formidable Forms', + 'The Most Advanced WordPress Form builder' ]).to.include(headingText); }); }); } else { - expect.fail(`Unexpected banner text or missing href: "${text}"`); + throw new Error(`Unexpected banner text or missing href: "${text}"`); } }); @@ -39,11 +40,11 @@ describe("Forms page", () => { cy.log("Validate the header logo link"); cy.get('a.frm-header-logo') - .should('have.attr', 'href', origin + "/wp-admin/admin.php?page=formidable") + .should('have.attr', 'href', origin + "wp-admin/admin.php?page=formidable") .click(); cy.log("Validate the URL after clicking the header logo"); - cy.url().should('eq', origin + "/wp-admin/admin.php?page=formidable"); + cy.url().should('eq', origin + "wp-admin/admin.php?page=formidable"); cy.log("Validate other header elements"); cy.get('h1').should("contain", "Forms"); From f610ac4180f548b4cad96070c96012f6dd8a419e Mon Sep 17 00:00:00 2001 From: lauramekaj1 <165822427+lauramekaj1@users.noreply.github.com> Date: Wed, 13 Aug 2025 14:40:29 +0200 Subject: [PATCH 3/6] fix test --- tests/cypress/e2e/Forms/formPageDataValidation.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js index bbe27a2e2c..eab896f410 100644 --- a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js +++ b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js @@ -40,11 +40,11 @@ describe("Forms page", () => { cy.log("Validate the header logo link"); cy.get('a.frm-header-logo') - .should('have.attr', 'href', origin + "wp-admin/admin.php?page=formidable") + .should('have.attr', 'href', origin + "/wp-admin/admin.php?page=formidable") .click(); cy.log("Validate the URL after clicking the header logo"); - cy.url().should('eq', origin + "wp-admin/admin.php?page=formidable"); + cy.url().should('eq', origin + "/wp-admin/admin.php?page=formidable"); cy.log("Validate other header elements"); cy.get('h1').should("contain", "Forms"); From 00723c488840c5563c966ad02882858989b00305 Mon Sep 17 00:00:00 2001 From: lauramekaj1 <165822427+lauramekaj1@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:57:28 +0200 Subject: [PATCH 4/6] check tests --- tests/cypress/e2e/Forms/formPageDataValidation.cy.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js index e4d29f461d..8d86a57ced 100644 --- a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js +++ b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js @@ -7,6 +7,7 @@ describe("Forms page", () => { cy.visit('/wp-admin/admin.php?page=formidable'); cy.createNewForm(formTitle); cy.viewport(1280, 720); + }); it("should validate all data in list view", () => { From fb7088c0a699bec1e085e1bb21b2106f6e53bbe8 Mon Sep 17 00:00:00 2001 From: lauramekaj1 <165822427+lauramekaj1@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:44:49 +0200 Subject: [PATCH 5/6] further updates --- .../e2e/Form Templates/FormTemplates.cy.js | 15 ++++++++++----- .../e2e/Forms/formPageDataValidation.cy.js | 5 ++++- tests/cypress/e2e/Forms/formsSettings.cy.js | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/tests/cypress/e2e/Form Templates/FormTemplates.cy.js b/tests/cypress/e2e/Form Templates/FormTemplates.cy.js index 0ccbe6105c..a3412ad08b 100644 --- a/tests/cypress/e2e/Form Templates/FormTemplates.cy.js +++ b/tests/cypress/e2e/Form Templates/FormTemplates.cy.js @@ -267,7 +267,8 @@ describe("Form Templates page", () => { it("add templates as favorites, view demo and use templates", () => { cy.log("Add contact us template as favorite"); - cy.get('li[frm-search-text="contact us"]').first() + cy.contains('li', 'Contact Us', { timeout: 10000 }) + .first() .trigger('mouseover', { force: true }) .find('.frm-form-templates-item-favorite-button') .click({ force: true }); @@ -283,7 +284,8 @@ describe("Form Templates page", () => { cy.get('[data-category="all-items"]').should("contain", "All Templates").click(); cy.log("View demo of the contact us template"); - cy.get('li[frm-search-text="contact us"]').first() + cy.contains('li', 'Contact Us', { timeout: 10000 }) + .first() .trigger('mouseover', { force: true }) .find('.frm-button-secondary') .invoke('removeAttr', 'target') @@ -297,7 +299,8 @@ describe("Form Templates page", () => { cy.visit('/wp-admin/admin.php?page=formidable-form-templates'); - cy.get('li[frm-search-text="contact us"]').first() + cy.contains('li', 'Contact Us', { timeout: 10000 }) + .first() .trigger('mouseover', { force: true }) .find('.frm-form-templates-use-template-button') .should("contain", "Use Template"); @@ -305,13 +308,15 @@ describe("Form Templates page", () => { cy.log("Try to use available templates"); cy.get('[data-category="available-templates"]').should("contain", "Available Templates").click(); cy.get('#frm-form-templates-page-title-text').should("contain", "Available Templates"); - cy.get('li[frm-search-text="contact us"]').first() + cy.contains('li', 'Contact Us', { timeout: 10000 }) + .first() .trigger('mouseover', { force: true }) .find('.frm-form-templates-use-template-button') .should('contain', 'Use Template') .click({ force: true }); - cy.get('li[frm-search-text="contact us"]').first() + cy.contains('li', 'Contact Us', { timeout: 10000 }) + .first() .trigger('mouseover', { force: true }) .find('.frm-form-templates-use-template-button') .should('contain', 'Use Template') diff --git a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js index 8d86a57ced..88ddb3ace2 100644 --- a/tests/cypress/e2e/Forms/formPageDataValidation.cy.js +++ b/tests/cypress/e2e/Forms/formPageDataValidation.cy.js @@ -27,7 +27,9 @@ describe("Forms page", () => { expect([ 'The Only WordPress Form Maker & Application Builder Plugin', 'Upgrade Today to Unlock the Full Power of Formidable Forms', - 'The Most Advanced WordPress Form builder' + 'The Most Advanced WordPress Form builder', + 'More Than Just a WordPress Form builder' + ]).to.include(headingText); }); }); @@ -168,6 +170,7 @@ describe("Forms page", () => { }); afterEach(() => { + cy.visit('/wp-admin/admin.php?page=formidable'); cy.deleteForm(); }); }); diff --git a/tests/cypress/e2e/Forms/formsSettings.cy.js b/tests/cypress/e2e/Forms/formsSettings.cy.js index 7300ebd38f..80e1240249 100644 --- a/tests/cypress/e2e/Forms/formsSettings.cy.js +++ b/tests/cypress/e2e/Forms/formsSettings.cy.js @@ -111,7 +111,8 @@ describe("Updating form settings", () => { cy.get("#frm-previewDrop", { timeout: 5000 }).should("contain", "Preview").click(); cy.get('.preview > .frm-dropdown-menu > :nth-child(1) > a').should("contain", "On Blank Page").invoke('removeAttr', 'target').click(); - cy.get("button[type='submit']").should("contain", "Submit").click(); + cy.get('.frm_forms', { timeout: 10000 }).should('exist'); + cy.get("button[type='submit'], input[type='submit']").should("be.visible").click(); cy.log("Verify URL redirect after submitting form"); cy.origin('https://formidableforms.com', ()=> { @@ -138,5 +139,4 @@ describe("Updating form settings", () => { cy.log("Teardown - Delete form"); cy.deleteForm(); }); - }); From 876d7d6cf3e3b37e78e48a3005f26f7bab92ca6d Mon Sep 17 00:00:00 2001 From: lauramekaj1 <165822427+lauramekaj1@users.noreply.github.com> Date: Thu, 14 Aug 2025 14:41:13 +0200 Subject: [PATCH 6/6] stabilize test --- tests/cypress/e2e/Forms/formsSettings.cy.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/cypress/e2e/Forms/formsSettings.cy.js b/tests/cypress/e2e/Forms/formsSettings.cy.js index 80e1240249..84daf762c8 100644 --- a/tests/cypress/e2e/Forms/formsSettings.cy.js +++ b/tests/cypress/e2e/Forms/formsSettings.cy.js @@ -111,8 +111,14 @@ describe("Updating form settings", () => { cy.get("#frm-previewDrop", { timeout: 5000 }).should("contain", "Preview").click(); cy.get('.preview > .frm-dropdown-menu > :nth-child(1) > a').should("contain", "On Blank Page").invoke('removeAttr', 'target').click(); - cy.get('.frm_forms', { timeout: 10000 }).should('exist'); - cy.get("button[type='submit'], input[type='submit']").should("be.visible").click(); + cy.get('.frm_forms', { timeout: 10000 }) + .should('be.visible') + .within(() => { + cy.get("button[type='submit'], input[type='submit']") + .filter(':visible') + .first() + .click(); + }); cy.log("Verify URL redirect after submitting form"); cy.origin('https://formidableforms.com', ()=> { @@ -126,7 +132,14 @@ describe("Updating form settings", () => { cy.log("Click on Preview - In Theme"); cy.get("#frm-previewDrop", { timeout: 5000 }).should("contain", "Preview").click(); cy.get('.preview > .frm-dropdown-menu > :nth-child(2) > a').should("contain", "In Theme").invoke('removeAttr', 'target').click(); - cy.get("button[type='submit']").should("contain", "Submit").click(); + cy.get('.frm_forms', { timeout: 10000 }) + .should('be.visible') + .within(() => { + cy.get("button[type='submit'], input[type='submit']") + .filter(':visible') + .first() + .click(); + }); cy.log("Verify URL redirect after submitting form"); cy.origin('https://formidableforms.com', ()=> {