Remove checks for WP 5.4 from e2e tests (https://github.com/woocommerce/woocommerce-blocks/pull/3993)
* Remove checks for WP 5.4 from e2e tests * Update e2e local environment set up docs
This commit is contained in:
parent
ef03089245
commit
c7bec5bcd2
|
@ -59,7 +59,8 @@ To modify the environment used by tests locally, you will need to modify `.wp-en
|
|||
|
||||
```diff
|
||||
{
|
||||
+ "core": "WordPress/WordPress#5.6",
|
||||
- "core": "WordPress/WordPress#5.7-branch",
|
||||
+ "core": "WordPress/WordPress#5.6-branch",
|
||||
"plugins": [
|
||||
"https://downloads.wordpress.org/plugin/woocommerce.latest-stable.zip",
|
||||
"https://github.com/WP-API/Basic-Auth/archive/master.zip",
|
||||
|
|
|
@ -15,7 +15,6 @@ import {
|
|||
import {
|
||||
insertBlockDontWaitForInsertClose,
|
||||
closeInserter,
|
||||
conditionalDescribe,
|
||||
} from '../../utils.js';
|
||||
|
||||
const block = {
|
||||
|
@ -41,9 +40,7 @@ describe( `${ block.name } Block`, () => {
|
|||
} );
|
||||
} );
|
||||
|
||||
conditionalDescribe( process.env.WP_VERSION > 5.4 )(
|
||||
'before compatibility notice is dismissed',
|
||||
() => {
|
||||
describe( 'before compatibility notice is dismissed', () => {
|
||||
beforeEach( async () => {
|
||||
await page.evaluate( () => {
|
||||
localStorage.setItem(
|
||||
|
@ -60,8 +57,7 @@ describe( `${ block.name } Block`, () => {
|
|||
);
|
||||
expect( compatibilityNoticeTitle.length ).toBe( 1 );
|
||||
} );
|
||||
}
|
||||
);
|
||||
} );
|
||||
|
||||
describe( 'once compatibility notice is dismissed', () => {
|
||||
beforeEach( async () => {
|
||||
|
|
|
@ -14,7 +14,6 @@ import {
|
|||
import {
|
||||
insertBlockDontWaitForInsertClose,
|
||||
closeInserter,
|
||||
conditionalDescribe,
|
||||
} from '../../utils.js';
|
||||
|
||||
const block = {
|
||||
|
@ -40,9 +39,7 @@ describe( `${ block.name } Block`, () => {
|
|||
} );
|
||||
} );
|
||||
|
||||
conditionalDescribe( process.env.WP_VERSION > 5.4 )(
|
||||
'before compatibility notice is dismissed',
|
||||
() => {
|
||||
describe( 'before compatibility notice is dismissed', () => {
|
||||
beforeEach( async () => {
|
||||
await page.evaluate( () => {
|
||||
localStorage.setItem(
|
||||
|
@ -59,8 +56,7 @@ describe( `${ block.name } Block`, () => {
|
|||
);
|
||||
expect( compatibilityNoticeTitle.length ).toBe( 1 );
|
||||
} );
|
||||
}
|
||||
);
|
||||
} );
|
||||
|
||||
describe( 'once compatibility notice is dismissed', () => {
|
||||
beforeEach( async () => {
|
||||
|
|
|
@ -20,7 +20,3 @@ export async function insertBlockDontWaitForInsertClose( searchTerm ) {
|
|||
export const closeInserter = async () => {
|
||||
await page.click( '.edit-post-header [aria-label="Add block"]' );
|
||||
};
|
||||
|
||||
export const conditionalDescribe = ( condition ) => {
|
||||
return condition ? describe : describe.skip;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue