Merge branch 'trunk' into fix/37502-typos-in-woo-blocks-tests

This commit is contained in:
Tung Du 2024-08-22 12:28:25 +07:00 committed by GitHub
commit 6f3e3a4411
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
92 changed files with 452 additions and 67 deletions

View File

@ -12,7 +12,7 @@
"dependencies": [
"pnpm"
],
"pinVersion": "^9.1.0",
"pinVersion": "9.1.3",
"packages": [
"**"
]

View File

@ -6,7 +6,7 @@
"packageManager": "pnpm@9.1.3",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"private": true,
"repository": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-e2e-tests/README.md",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"repository": {
"type": "git",

View File

@ -5,7 +5,7 @@
"main": "index.js",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"scripts": {
"e2e": "jest",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"repository": {
"type": "git",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Mark props with defaults as not required 

View File

@ -6,7 +6,7 @@
"license": "GPL-3.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -192,8 +192,7 @@ SummaryNumber.propTypes = {
/**
* The type of the link
*/
hrefType: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] )
.isRequired,
hrefType: PropTypes.oneOf( [ 'wp-admin', 'wc-admin', 'external' ] ),
/**
* Boolean describing whether the menu list is open. Only applies in mobile view,
* and only applies to the toggle-able item (first in the list).

View File

@ -99,7 +99,7 @@ Timeline.propTypes = {
*/
hideTimestamp: PropTypes.bool,
} )
).isRequired,
),
/**
* Defines how items should be grouped together.
*/

View File

@ -94,8 +94,8 @@ TimelineGroup.propTypes = {
*/
hideTimestamp: PropTypes.bool,
} )
).isRequired,
} ).isRequired,
),
} ),
/**
* Defines how items should be ordered.
*/

View File

@ -69,7 +69,7 @@ TimelineItem.propTypes = {
* The PHP clock format string used to format times, see php.net/date.
*/
clockFormat: PropTypes.string,
} ).isRequired,
} ),
};
export default TimelineItem;

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -7,7 +7,7 @@
"main": "index.js",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"scripts": {
"changelog": "composer install && composer exec -- changelogger"

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -5,7 +5,7 @@
"main": "index.js",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"repository": {
"type": "git",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-3.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -11,7 +11,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/currency/README.md",
"repository": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -10,7 +10,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/customer-effort-score/README.md",
"repository": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -11,7 +11,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/data/README.md",
"repository": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -11,7 +11,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/date/README.md",
"repository": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -10,7 +10,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/dependency-extraction-webpack-plugin/README.md",
"repository": {

View File

@ -10,7 +10,7 @@
"license": "GPL-3.0+",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"main": "build/index.js",
"module": "build-module/index.js",

View File

@ -12,7 +12,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment/README.md",
"bugs": {

View File

@ -10,7 +10,7 @@
"license": "GPL-3.0+",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"main": "build/index.js",
"module": "build-module/index.js",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-3.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -12,7 +12,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/expression-evaluation/README.md",
"repository": {

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -5,7 +5,7 @@
"main": "index.js",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"repository": {
"type": "git",

View File

@ -10,7 +10,7 @@
],
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"bin": {
"e2e-builds": "./build.js"

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-js-tests/README.md",
"repository": {

View File

@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-3.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-3.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-3.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-2.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -6,7 +6,7 @@
"license": "GPL-3.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"keywords": [
"wordpress",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -94,7 +94,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"lint-staged": {
"*.php": [

View File

@ -552,7 +552,7 @@ ReportTable.propTypes = {
* Table data of that report. If it's not provided, it will be automatically
* loaded via the provided `endpoint`.
*/
tableData: PropTypes.object.isRequired,
tableData: PropTypes.object,
/**
* Properties to be added to the query sent to the report table endpoint.
*/

View File

@ -242,7 +242,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"config": {
"ci": {

View File

@ -55,6 +55,7 @@ require 'tools/trigger-update-callbacks.php';
require 'tools/reset-cys.php';
require 'tools/set-block-template-logging-threshold.php';
require 'tools/set-coming-soon-mode.php';
require 'tools/fake-woo-payments-gateway.php';
require 'tracks/class-tracks-debug-log.php';
require 'features/features.php';
require 'rest-api-filters/class-wca-test-helper-rest-api-filters.php';

View File

@ -0,0 +1,62 @@
<?php
/**
* Fake WooPayments class.
*
* @package WC_Beta_Tester
*/
class Fake_WCPayments extends WC_Payment_Gateway_WCPay {
/**
* Constructor.
*/
public function __construct() {
$this->id = 'woocommerce_payments';
$this->has_fields = true;
$this->method_title = 'WooPayments';
$this->method_description = $this->get_method_description();
$this->description = '';
$this->supports = array(
'products',
'refunds',
);
}
/**
* Returns true if the gateway needs additional configuration, false if it's ready to use.
*
* @see WC_Payment_Gateway::needs_setup
* @return bool
*/
public function needs_setup() {
return false;
}
/**
* Check if the payment gateway is connected. This method is also used by
* external plugins to check if a connection has been established.
*/
public function is_connected() {
return true;
}
/**
* Get the connection URL.
* Called directly by WooCommerce Core.
*
* @return string Connection URL.
*/
public function get_connection_url() {
return '';
}
/**
* Checks if the gateway is enabled, and also if it's configured enough to accept payments from customers.
*
* Use parent method value alongside other business rules to make the decision.
*
* @return bool Whether the gateway is enabled and ready to accept payments.
*/
public function is_available() {
return true;
}
}

View File

@ -0,0 +1,73 @@
<?php
/**
* Fake WooCommercePayments account data for testing purposes.
*
* @package WC_Beta_Tester
* */
defined( 'ABSPATH' ) || exit();
register_woocommerce_admin_test_helper_rest_route(
'/tools/fake-wcpay-completion/v1',
'tools_get_fake_wcpay_completion_status',
array(
'methods' => 'GET',
)
);
register_woocommerce_admin_test_helper_rest_route(
'/tools/fake-wcpay-completion/v1',
'tools_set_fake_wcpay_completion',
array(
'methods' => 'POST',
'args' => array(
'enabled' => array(
'type' => 'enum',
'enum' => array( 'yes', 'no' ),
'required' => true,
'description' => 'Whether to enable or disable fake WooPayments completion',
),
),
)
);
/**
* Get the current status of fake WooPayments completion.
*/
function tools_get_fake_wcpay_completion_status() {
return new WP_REST_Response( array( 'enabled' => get_option( 'wc_beta_tester_fake_wcpay_completion', 'no' ) ), 200 );
}
/**
* A tool to enable/disable fake WooPayments completion.
*
* @param WP_REST_Request $request Request object.
*/
function tools_set_fake_wcpay_completion( $request ) {
$enabled = $request->get_param( 'enabled' );
update_option( 'wc_beta_tester_fake_wcpay_completion', $enabled );
return new WP_REST_Response( array( 'enabled' => $enabled ), 200 );
}
if (
'yes' === get_option( 'wc_beta_tester_fake_wcpay_completion', 'no' ) &&
class_exists( 'WC_Payment_Gateway_WCPay' )
) {
add_filter( 'woocommerce_payment_gateways', 'tools_fake_wcpay' );
add_filter( 'woocommerce_available_payment_gateways', 'tools_fake_wcpay' );
require_once dirname( __FILE__ ) . '/class-fake-wcpayments.php';
/**
* Fake WooPayments completion.
*
* @param array $gateways List of available payment gateways.
*/
function tools_fake_wcpay( $gateways ) {
$gateways['woocommerce_payments'] = new Fake_WCPayments();
return $gateways;
}
}

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Add fake WooPayments completion tool

View File

@ -91,7 +91,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"lint-staged": {
"*.php": [

View File

@ -0,0 +1,31 @@
/**
* External dependencies
*/
import { useSelect } from '@wordpress/data';
/**
* Internal dependencies
*/
import { STORE_KEY } from '../data/constants';
export const FAKE_WOO_PAYMENTS_ACTION_NAME = 'fakeWooPayments';
export const FakeWooPayments = () => {
const isEnabled = useSelect( ( select ) =>
select( STORE_KEY ).getIsFakeWooPaymentsEnabled()
);
const getDescription = () => {
switch ( isEnabled ) {
case 'yes':
return 'Enabled 🟢';
case 'no':
return 'Disabled 🔴';
case 'error':
return 'Error 🙁';
default:
return 'Loading ...';
}
};
return <div>{ getDescription() }</div>;
};

View File

@ -15,6 +15,10 @@ import {
SetComingSoonMode,
UPDATE_COMING_SOON_MODE_ACTION_NAME,
} from './set-coming-soon-mode';
import {
FakeWooPayments,
FAKE_WOO_PAYMENTS_ACTION_NAME,
} from './fake-woo-payments';
import {
UPDATE_WCCOM_REQUEST_ERRORS_MODE,
@ -97,4 +101,9 @@ export default [
description: <SetWccomRequestErrros />,
action: UPDATE_WCCOM_REQUEST_ERRORS_MODE,
},
{
command: 'Toggle Fake WooPayments Completion Status',
description: <FakeWooPayments />,
action: FAKE_WOO_PAYMENTS_ACTION_NAME,
},
];

View File

@ -282,3 +282,28 @@ export function* updateWccomRequestErrorsMode( params ) {
} );
} );
}
export function* fakeWooPayments( params ) {
yield runCommand( 'Toggle Fake WooPayments Completion', function* () {
const newStatus = params.enabled === 'yes' ? 'no' : 'yes';
yield apiFetch( {
path: API_NAMESPACE + '/tools/fake-wcpay-completion/v1',
method: 'POST',
data: {
enabled: newStatus,
},
} );
yield updateCommandParams( 'fakeWooPayments', {
enabled: newStatus,
} );
yield updateMessage(
'Toggle Fake WooPayments Completion',
`Fake WooPayments completion ${
newStatus === 'yes' ? 'disabled' : 'enabled'
}`
);
} );
}

View File

@ -14,6 +14,7 @@ const DEFAULT_STATE = {
updateBlockTemplateLoggingThreshold: {},
runSelectedUpdateCallbacks: {},
updateWccomRequestErrorsMode: {},
fakeWooPayments: {},
},
status: '',
dbUpdateVersions: [],

View File

@ -18,6 +18,7 @@ import { UPDATE_BLOCK_TEMPLATE_LOGGING_THRESHOLD_ACTION_NAME } from '../commands
import { UPDATE_COMING_SOON_MODE_ACTION_NAME } from '../commands/set-coming-soon-mode';
import { TRIGGER_UPDATE_CALLBACKS_ACTION_NAME } from '../commands/trigger-update-callbacks';
import { UPDATE_WCCOM_REQUEST_ERRORS_MODE } from '../commands/set-wccom-request-errors';
import { FAKE_WOO_PAYMENTS_ACTION_NAME } from '../commands/fake-woo-payments';
export function* getCronJobs() {
const path = `${ API_NAMESPACE }/tools/get-cron-list/v1`;
@ -135,3 +136,17 @@ export function* getWccomRequestErrorsMode() {
throw new Error( error );
}
}
export function* getIsFakeWooPaymentsEnabled() {
try {
const response = yield apiFetch( {
path: API_NAMESPACE + '/tools/fake-wcpay-completion/v1',
method: 'GET',
} );
yield updateCommandParams( FAKE_WOO_PAYMENTS_ACTION_NAME, {
enabled: response.enabled || 'no',
} );
} catch ( error ) {
throw new Error( error );
}
}

View File

@ -41,3 +41,7 @@ export function getComingSoonMode( state ) {
export function getWccomRequestErrorsMode( state ) {
return state.params.updateWccomRequestErrorsMode.mode;
}
export function getIsFakeWooPaymentsEnabled( state ) {
return state.params.fakeWooPayments.enabled;
}

View File

@ -253,7 +253,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"dependencies": {
"@ariakit/react": "^0.4.4",

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Add e2e tests to confirm that the store is in coming soon mode after completing the core profiler

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Fix pnpm version to 9.1.3 to avoid dependency installation issues.

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Use stricter text selector on test

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
Mark ReportTable tableData prop as not required

View File

@ -0,0 +1,4 @@
Significance: patch
Type: tweak
Update reset password e2e to use or locator to check reset status

View File

@ -639,7 +639,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"browserslist": [
"> 0.1%",

View File

@ -1,8 +1,22 @@
const { test, expect } = require( '@playwright/test' );
const { test, expect, request } = require( '@playwright/test' );
const { setOption } = require( '../../utils/options' );
test.describe( 'Store owner can complete the core profiler', () => {
test.use( { storageState: process.env.ADMINSTATE } );
test.beforeAll( async ( { baseURL } ) => {
try {
await setOption(
request,
baseURL,
'woocommerce_coming_soon',
'no'
);
} catch ( error ) {
console.log( error );
}
} );
test( 'Can complete the core profiler skipping extension install', async ( {
page,
} ) => {
@ -393,12 +407,32 @@ test.describe( 'Store owner can complete the core profiler', () => {
page.getByLabel( 'Delete Pinterest for' )
).toBeHidden();
} );
await test.step( 'Confirm that the store is in coming soon mode after completing the core profiler', async () => {
await page.goto( 'wp-admin/admin.php?page=wc-admin' );
await expect(
page.getByRole( 'menuitem', { name: 'Store coming soon' } )
).toBeVisible();
} );
} );
} );
test.describe( 'Store owner can skip the core profiler', () => {
test.use( { storageState: process.env.ADMINSTATE } );
test.beforeAll( async ( { baseURL } ) => {
try {
await setOption(
request,
baseURL,
'woocommerce_coming_soon',
'no'
);
} catch ( error ) {
console.log( error );
}
} );
test( 'Can click skip guided setup', async ( { page } ) => {
await page.goto(
'wp-admin/admin.php?page=wc-admin&path=%2Fsetup-wizard'
@ -426,6 +460,13 @@ test.describe( 'Store owner can skip the core profiler', () => {
name: 'Welcome to WooCommerce Core E2E Test Suite',
} )
).toBeVisible();
await test.step( 'Confirm that the store is in coming soon mode after skipping the core profiler', async () => {
await page.goto( 'wp-admin/admin.php?page=wc-admin' );
await expect(
page.getByRole( 'menuitem', { name: 'Store coming soon' } )
).toBeVisible();
} );
} );
test( 'Can connect to WooCommerce.com', async ( { page } ) => {

View File

@ -19,20 +19,16 @@ test.describe( 'Can go to lost password page and submit the form', () => {
.fill( admin.username );
await page.getByRole( 'button', { name: 'Get New Password' } ).click();
try {
// For local testing, the email might not be sent, so we can ignore this error.
const emailSentMessage = page.getByText(
'check your email for the confirmation link'
);
const emailNotSentMessage = page.getByText(
'the email could not be sent'
);
// We don't have to care if the email was sent, we just want to know the button click attempts a reset.
await expect(
page.getByText(
/The email could not be sent. Your site may not be correctly configured to send emails/i
)
emailSentMessage.or( emailNotSentMessage )
).toBeVisible();
} catch ( e ) {
// eslint-disable-next-line jest/no-try-expect
await page.waitForURL( '**/wp-login.php?checkemail=confirm' );
// eslint-disable-next-line jest/no-try-expect
await expect(
page.getByText( /Check your email for the confirmation link/i )
).toBeVisible();
}
} );
} );

View File

@ -206,7 +206,7 @@ for ( const currentPage of wcPages ) {
} ) => {
await page
.locator(
`li.wp-menu-open > ul.wp-submenu > li:has-text("${ currentPage.subpages[ i ].name }")`
`li.wp-menu-open > ul.wp-submenu > li a:text-is("${ currentPage.subpages[ i ].name }")`
)
.click();

View File

@ -40,7 +40,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"config": {
"ci": {

View File

@ -19,6 +19,6 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
}
}

View File

@ -63,7 +63,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"types": "dist/index.d.ts",
"config": {

View File

@ -67,7 +67,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"config": {
"ci": {

View File

@ -58,7 +58,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"types": "dist/index.d.ts",
"config": {

View File

@ -11,7 +11,7 @@
"license": "GPL-2.0-or-later",
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"devDependencies": {
"@tsconfig/node16": "^1.0.4",

View File

@ -19,7 +19,7 @@
},
"engines": {
"node": "^20.11.1",
"pnpm": "^9.1.0"
"pnpm": "9.1.3"
},
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"