-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install plugins via .wp-env.json for e2e testing. (#709)
* Added .wp-env.json * Updated WP_BASE_URL. * Small improvement. * Added event-espresso via wp-env json. * Added gutenberg-test-plugin-nonce. * Small improvement. * Small improvement. * Added check out event-espresso-core. * Added token to checkout step in PR check workflow. * Added persist-credentials * Small improvement. * Cloned folder renaming. * Small improvement.
- Loading branch information
Vadim Nicolai
committed
Feb 9, 2021
1 parent
488e72d
commit eea25bd
Showing
16 changed files
with
23,196 additions
and
23,139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"core": "WordPress/WordPress", | ||
"env": { | ||
"tests": { | ||
"mappings": { | ||
"wp-content/plugins/event-espresso-core": "./event-espresso-core", | ||
"wp-content/plugins/gutenberg-test-plugins": "./packages/e2e-tests/plugins" | ||
} | ||
} | ||
}, | ||
"plugins": ["."] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
module.exports = { | ||
preset: 'jest-playwright-preset', | ||
globalSetup: 'jest-playwright-preset/setup.js', | ||
reporters: undefined, | ||
setupFilesAfterEnv: ['<rootDir>/config/setup-playwright.js'], | ||
testMatch: ['**/specs/**/*.[jt]s', '**/?(*.)spec.[jt]s'], | ||
testEnvironmentOptions: { | ||
'jest-playwright': { | ||
launchOptions: { | ||
headless: process.env.CI === 'true' ? true : process.env.HEADLESS === 'true', | ||
// slowMo: +process.env.SLOW_MO, | ||
}, | ||
}, | ||
}, | ||
testPathIgnorePatterns: ['/node_modules/'], | ||
reporters: undefined, | ||
setupFilesAfterEnv: ['<rootDir>/config/setup-playwright.js', '@wordpress/jest-console'], | ||
verbose: process.env.CI === 'true', | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
|
||
<?php | ||
/** | ||
* Plugin Name: Gutenberg Test Plugin, Disables the CSS animations | ||
* Plugin URI: https://github.com/WordPress/gutenberg | ||
* Author: Gutenberg Team | ||
* | ||
* @package gutenberg-test-disable-animations | ||
*/ | ||
|
||
/** | ||
* Enqueue CSS stylesheet disabling animations. | ||
*/ | ||
function enqueue_disable_animations_stylesheet() { | ||
$custom_css = '* { animation-duration: 0ms !important; transition-duration: 0s !important; }'; | ||
wp_add_inline_style( 'wp-components', $custom_css ); | ||
} | ||
|
||
add_action( 'admin_enqueue_scripts', 'enqueue_disable_animations_stylesheet' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* Plugin Name: Gutenberg Test Plugin, Nonce | ||
* Plugin URI: https://github.com/WordPress/gutenberg | ||
* Author: Gutenberg Team | ||
* | ||
* @package gutenberg-test-plugin-nonce | ||
*/ | ||
|
||
/** | ||
* Returns the nonce life time. | ||
*/ | ||
function gutenberg_test_plugin_nonce_life() { | ||
return 5; | ||
} | ||
add_filter( 'nonce_life', 'gutenberg_test_plugin_nonce_life' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// <reference types="jest-playwright-preset" /> | ||
/// <reference types="expect-playwright" /> | ||
import { activatePlugin, loginUser } from '../utils'; | ||
|
||
describe('hello playwright', () => { | ||
it('should work', async () => { | ||
await loginUser(); | ||
|
||
await activatePlugin('event-espresso'); | ||
|
||
await page.click(`.toplevel_page_espresso_events > a`); | ||
|
||
const espressoAdmin = await page.$eval('.espresso-admin', (el) => el.innerHTML); | ||
|
||
expect(espressoAdmin).toContain('Event Espresso - Events'); | ||
|
||
await browser.close(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"files": ["node_modules/jest-playwright-preset/types/global.d.ts", "node_modules/expect-playwright/global.d.ts"], | ||
"compilerOptions": { | ||
"isolatedModules": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.