Skip to content

Commit

Permalink
Merge branch 'trunk' into PRESS4-545-Lint-Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyakrishnai authored Jul 10, 2024
2 parents 5f7781f + 35acde7 commit 23f8082
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 69 deletions.
2 changes: 1 addition & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use function NewfoldLabs\WP\ModuleLoader\register;

define( 'NFD_ECOMMERCE_MODULE_VERSION', '1.3.35' );
define( 'NFD_ECOMMERCE_MODULE_VERSION', '1.3.36' );

if ( function_exists( 'is_admin' ) && is_admin() ) {
$old_woocommerce_module_version = get_option( 'nfd_ecommerce_module_version' );
Expand Down
86 changes: 43 additions & 43 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@newfold-labs/wp-module-ecommerce",
"description": "Brand Agnostic eCommerce Experience",
"license": "GPL-2.0-or-later",
"version": "1.3.35",
"version": "1.3.36",
"main": "build/index.js",
"files": [
"build/",
Expand Down
3 changes: 0 additions & 3 deletions tests/cypress/integration/Home/ecommerce-coming-soon.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ import {
comingSoon,
uninstallPlugins,
} from '../wp-module-support/utils.cy';
import { EventsAPI, APIList } from '../wp-module-support/eventsAPIs.cy';

const customCommandTimeout = 20000;
const pluginId = GetPluginId();
const hg_region = 'br';

describe(
'e-commerce Home Page- Coming soon mode',
{ testIsolation: true },
() => {
beforeEach( () => {
wpLogin();
uninstallPlugins();
comingSoon( true );
cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' );
} );
Expand Down
2 changes: 0 additions & 2 deletions tests/cypress/integration/Home/ecommerce-live.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { GetPluginId } from '../wp-module-support/pluginID.cy';
import {
wpLogin,
comingSoon,
uninstallPlugins,
} from '../wp-module-support/utils.cy';

const customCommandTimeout = 20000;
Expand All @@ -11,7 +10,6 @@ const pluginId = GetPluginId();
describe( 'e-commerce Home Page- Live Mode', { testIsolation: true }, () => {
beforeEach( () => {
wpLogin();
uninstallPlugins();
comingSoon( false );
cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' );
} );
Expand Down
15 changes: 4 additions & 11 deletions tests/cypress/integration/Home/ecommerce-next-steps.cy.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { GetPluginId } from '../wp-module-support/pluginID.cy';
import {
wpLogin,
comingSoon,
viewCompletedTasks,
viewRemainingTasks,
} from '../wp-module-support/utils.cy';
Expand Down Expand Up @@ -155,17 +154,11 @@ describe( 'e-commerce Home Page- Next Steps', () => {
.scrollIntoView()
.invoke( 'removeAttr', 'target' )
.click();
if ( pluginId == 'crazy-domains' ) {
cy.url().should(
'equal',
`https://my.yoast.com/signup?redirect_to=https://academy.yoast.com/courses/?utm_medium=crazydomains_plugin&utm_source=wp-home`
);
} else {
cy.url().should(
'equal',
`https://my.yoast.com/signup?redirect_to=https://academy.yoast.com/courses/?utm_medium=${ pluginId }_plugin&utm_source=wp-home`
cy.url()
.should(
'contain',
'https://my.yoast.com/signup?redirect_to=https://academy.yoast.com/courses/'
);
}
cy.go( 'back' );
EventsAPI( APIList.yoast_seo_academy, pluginId );

Expand Down
13 changes: 10 additions & 3 deletions tests/cypress/integration/Home/homePageWithWoo.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ describe(
'e-commerce Home Page - When WooCommerce is installed',
{ testIsolation: true },
() => {
before(() => {
installWoo();
});

beforeEach( () => {
wpLogin();
uninstallPlugins();
installWoo();
cy.visit( '/wp-admin/admin.php?page=' + pluginId + '#/home' );
} );

Expand All @@ -28,6 +30,7 @@ describe(
} );

it( 'Verify next steps "Add your store info"', () => {
cy.reload();
waitForNextSteps();
cy.get( '#add-your-store-info a', {
timeout: customCommandTimeout,
Expand Down Expand Up @@ -86,7 +89,11 @@ describe(
viewRemainingTasks();
} );

it( 'Verify next step "Connect a payment processor"', () => {
it( 'Verify next step "Connect a payment processor"', function () {
// Razorpay is not enabled for crazy-domains, hense skipping
if (pluginId == 'crazy-domains') {
this.skip();
}
cy.reload();
waitForNextSteps();
cy.get( '#connect-a-payment-processor a', {
Expand Down
Loading

0 comments on commit 23f8082

Please sign in to comment.