Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/tests for onboarding #413

Merged
merged 5 commits into from
Feb 2, 2024
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.2.0",
"newfold-labs/wp-module-notifications": "^1.2.2",
"newfold-labs/wp-module-onboarding": "^1.12.0",
"newfold-labs/wp-module-onboarding": "^1.12.1",
"newfold-labs/wp-module-patterns": "^0.1.13",
"newfold-labs/wp-module-performance": "^1.3.0",
"newfold-labs/wp-module-runtime": "^1.0.7",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

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

72 changes: 51 additions & 21 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,56 @@ module.exports = defineConfig({
'*jnn-pa.googleapis.com',
'*youtube.com',
],
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {
return require('./tests/cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:8880',
specPattern: [
'tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
'vendor/newfold-labs/**/tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
],
supportFile: 'tests/cypress/support/index.js',
testIsolation: false,
e2e: {
// We've imported your old cypress plugins here.
// You may want to clean this up later by importing these.
setupNodeEvents(on, config) {

const semver = require( 'semver' );

// Ensure that the base URL is always properly set.
if ( config.env && config.env.baseUrl ) {
config.baseUrl = config.env.baseUrl;
}

// Ensure that we have a semantically correct WordPress version number for comparisons.
if ( config.env.wpVersion ) {
if ( config.env.wpVersion.split( '.' ).length !== 3 ) {
config.env.wpSemverVersion = `${ config.env.wpVersion }.0`;
} else {
config.env.wpSemverVersion = config.env.wpVersion;
}
}

// Ensure that we have a semantically correct PHP version number for comparisons.
if ( config.env.phpVersion ) {
if ( config.env.phpVersion.split( '.' ).length !== 3 ) {
config.env.phpSemverVersion = `${ config.env.phpVersion }.0`;
} else {
config.env.phpSemverVersion = config.env.phpVersion;
}
}
// Exclude onboarding/ecommerce tests for PHP lower than 7.3 (7.1 and 7.2)
if ( semver.satisfies( config.env.phpSemverVersion, '<7.3.0' ) ) {
config.excludeSpecPattern = config.excludeSpecPattern.concat( [
'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/**',
'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/2-general-onboarding-flow/top-priority.cy.js',
] );
}

return config;
},
baseUrl: 'http://localhost:8880',
specPattern: [
'tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
'vendor/newfold-labs/**/tests/cypress/integration/**/*.cy.{js,jsx,ts,tsx}',
],
supportFile: 'tests/cypress/support/index.js',
testIsolation: false,
excludeSpecPattern: [
'vendor/newfold-labs/**/tests/cypress/integration/wp-module-support/*.cy.js', // skip any module's wp-module-support files
'vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/', // skipping onboarding tests until they add multi-lingual support or onboarding is activated for all lanugages
'vendor/newfold-labs/wp-module-patterns/tests/cypress/integration/', // skip pattern tests for now
'vendor/newfold-labs/**/tests/cypress/integration/wp-module-support/*.cy.js', // skip any module's wp-module-support files
],
},
retries: 1,
experimentalMemoryManagement: true,
'vendor/newfold-labs/**/tests/cypress/integration/wp-module-support/*.cy.js', // skip any module's wp-module-support files
],
},
retries: 1,
experimentalMemoryManagement: true,
})
6 changes: 3 additions & 3 deletions languages/wp-plugin-hostgator-es_MX-hostgator-script.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@
"HostGator Account": [
""
],
"Products": [
""
],
"Sales & Discounts": [
""
],
Expand Down Expand Up @@ -548,6 +545,9 @@
],
"Coming Soon page": [
""
],
"Products & Services": [
""
]
}
}
Expand Down
5 changes: 4 additions & 1 deletion languages/wp-plugin-hostgator-es_MX.po
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,6 @@ msgid "HostGator Account"
msgstr ""

#: build/2.6.0/index.js:1
#: build/2.6.2/index.js:1
msgid "Products"
msgstr ""

Expand Down Expand Up @@ -1057,3 +1056,7 @@ msgstr ""
#: build/2.6.2/index.js:1
msgid "Coming Soon page"
msgstr ""

#: build/2.6.2/index.js:1
msgid "Products & Services"
msgstr ""
6 changes: 3 additions & 3 deletions languages/wp-plugin-hostgator-pt_BR-hostgator-script.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@
"There's nothing here!": [
"N\u00e3o h\u00e1 nada aqui!"
],
"Products": [
"Produtos"
],
"Sales & Discounts": [
"Vendas & Descontos"
],
Expand Down Expand Up @@ -548,6 +545,9 @@
],
"Coming Soon page": [
""
],
"Products & Services": [
"Produtos & Servi\u00e7os"
]
}
}
Expand Down
Binary file modified languages/wp-plugin-hostgator-pt_BR.mo
Binary file not shown.
5 changes: 4 additions & 1 deletion languages/wp-plugin-hostgator-pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ msgid "There's nothing here!"
msgstr "Não há nada aqui!"

#: build/2.6.0/index.js:1
#: build/2.6.2/index.js:1
msgid "Products"
msgstr "Produtos"

Expand Down Expand Up @@ -1057,3 +1056,7 @@ msgstr ""
#: build/2.6.2/index.js:1
msgid "Coming Soon page"
msgstr ""

#: build/2.6.2/index.js:1
msgid "Products & Services"
msgstr "Produtos & Serviços"
5 changes: 4 additions & 1 deletion languages/wp-plugin-hostgator.pot
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,6 @@ msgid "There's nothing here!"
msgstr ""

#: build/2.6.0/index.js:1
#: build/2.6.2/index.js:1
msgid "Products"
msgstr ""

Expand Down Expand Up @@ -1045,6 +1044,10 @@ msgstr ""
msgid "Working..."
msgstr ""

#: build/2.6.2/index.js:1
msgid "Products & Services"
msgstr ""

#: build/2.6.2/index.js:1
msgid "Not Live"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion src/app/data/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export const routes = [
subRoutes: [
{
name: '/store/products',
title: __( 'Products', 'wp-plugin-hostgator' ),
title: __( 'Products & Services', 'wp-plugin-hostgator' ),
},
NewfoldRuntime.hasCapability( 'hasYithExtended' )
? {
Expand Down
Loading