Merge pull request #31741 from woocommerce/fix/failing-daily-smoke-tests
Fix failing plugin tests in Smoke Test Daily workflow
This commit is contained in:
commit
89a44ab8c1
|
@ -88,7 +88,7 @@ jobs:
|
|||
- plugin: 'WooCommerce PayPal Payments'
|
||||
repo: 'woocommerce/woocommerce-paypal-payments'
|
||||
- plugin: 'WooCommerce Shipping & Tax'
|
||||
repo: 'woocommerce/woocommerce-services'
|
||||
repo: 'automattic/woocommerce-services'
|
||||
- plugin: 'WooCommerce Subscriptions'
|
||||
repo: WC_SUBSCRIPTIONS_REPO
|
||||
private: true
|
||||
|
|
|
@ -118,7 +118,7 @@ jobs:
|
|||
- plugin: 'WooCommerce PayPal Payments'
|
||||
repo: 'woocommerce/woocommerce-paypal-payments'
|
||||
- plugin: 'WooCommerce Shipping & Tax'
|
||||
repo: 'woocommerce/woocommerce-services'
|
||||
repo: 'automattic/woocommerce-services'
|
||||
- plugin: 'WooCommerce Subscriptions'
|
||||
repo: WC_SUBSCRIPTIONS_REPO
|
||||
private: true
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Unreleased
|
||||
|
||||
## Changed
|
||||
|
||||
- Updated top level menu css selectors
|
||||
|
||||
## Fixed
|
||||
- Moved `merchant.login()` out of `beforeAll()` block and into test body for retried runs.
|
||||
|
||||
|
|
|
@ -5,13 +5,9 @@
|
|||
export const MENUS = [
|
||||
[
|
||||
'WooCommerce',
|
||||
'#adminmenu > li:nth-child(8) > a',
|
||||
'.menu-top > a[href*=wc-admin].menu-top-first',
|
||||
[
|
||||
[
|
||||
'Home',
|
||||
'',
|
||||
'Home',
|
||||
],
|
||||
[ 'Home', '', 'Home' ],
|
||||
[
|
||||
'Orders',
|
||||
'#toplevel_page_woocommerce > ul > li:nth-child(3) > a',
|
||||
|
@ -37,7 +33,7 @@ export const MENUS = [
|
|||
],
|
||||
[
|
||||
'Products',
|
||||
'#adminmenu > li:nth-child(9) > a',
|
||||
'.menu-top > a[href*=product].menu-top',
|
||||
[
|
||||
[
|
||||
'All Products',
|
||||
|
@ -68,7 +64,7 @@ export const MENUS = [
|
|||
],
|
||||
[
|
||||
'Marketing',
|
||||
'#adminmenu > li:nth-child(11) > a',
|
||||
'.menu-top > a[href*=marketing].menu-top',
|
||||
[
|
||||
[
|
||||
'Overview',
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# Unreleased
|
||||
|
||||
## Changes
|
||||
- Updated `deleteDownloadedPluginFiles()` to also be able to delete directories.
|
||||
|
||||
## Added
|
||||
|
||||
- Added `post-results-to-github-pr.js` to post smoke test results to a GitHub PR.
|
||||
|
|
|
@ -152,13 +152,20 @@ const downloadZip = async ( fileUrl, downloadPath, authorizationToken ) => {
|
|||
const deleteDownloadedPluginFiles = async () => {
|
||||
const pluginSavePath = resolveLocalE2ePath( 'plugins' );
|
||||
|
||||
fs.readdir( pluginSavePath, ( err, files ) => {
|
||||
fs.readdir( pluginSavePath, ( err, contents ) => {
|
||||
if ( err ) throw err;
|
||||
|
||||
for ( const file of files ) {
|
||||
fs.unlink( path.join( pluginSavePath, file ), ( error ) => {
|
||||
if ( error ) throw error;
|
||||
} );
|
||||
for ( const content of contents ) {
|
||||
const contentPath = path.join( pluginSavePath, content );
|
||||
const stats = fs.lstatSync( contentPath );
|
||||
|
||||
if ( stats.isDirectory() ) {
|
||||
fs.rmSync( contentPath, { recursive: true, force: true } );
|
||||
} else {
|
||||
fs.unlink( contentPath, ( error ) => {
|
||||
if ( error ) throw error;
|
||||
} );
|
||||
}
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue