Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/cypress/e2e/Entries/EntriesPageDataValidations.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ describe( 'Entries submitted from a form', () => {
const text = $el.text().trim();
expect( text ).to.be.oneOf( [
'Upgrade to Pro.',
'Get 60% Off Pro!'
'Get 60% Off Pro!',
'Black Friday Deals',
] );
} );

Expand Down
10 changes: 9 additions & 1 deletion tests/cypress/e2e/Forms/formPageDataValidation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ describe( 'Forms page', () => {
const text = $el.text().trim();
const href = $el.attr( 'href' );

if ( href && ( text.includes( 'upgrading to PRO' ) || text.includes( 'Get 60% Off Pro!' ) || text.includes( 'Get the Deal' ) || text.match( /GET \d+% OFF|SAVE \d+%/ ) || text.includes( 'upgrading for 60% off during our No Brainer Sale!' ) ) ) {
const substrings = [
'upgrading to PRO',
'Get 60% Off Pro!',
'Get the Deal',
'upgrading for 60% off during our No Brainer Sale!',
'Black Friday Deals',
];

if ( href && substrings.some( substring => text.includes( substring ) ) ) {
cy.origin( 'https://formidableforms.com', { args: { href } }, ( { href } ) => {
cy.visit( href );
cy.get( 'h1' ).should( $h1 => {
Expand Down
Loading