Giter VIP home page Giter VIP logo

gutenberg-wpcom-e2e-tests's Introduction

Gutenberg on WPCOM e2e Tests

Manual e2e suite for Gutenberg v4.5.1 running in a WPCOM Sandbox.

Instructions

Note: These tests will wipe out all posts and comments from the site!

  1. Install the dependencies:
npm install
  1. Copy the config-example.json file as config.json and fill the sandbox object with the URL of a WPCOM Sandbox site and the credentials of an editor (or higher role) user.
    To observe the tests visually, set puppeteer.headless = false in config.json, and increase puppeteer.slowMo until the tests are slow enough (I've found 50 to be my sweet spot).

  2. Obtain the e2e tests from a Gutenberg release (e.g. v4.5.1):

npm run update-e2e v4.5.1
  1. Update /e2e-overrides if needed.

  2. Turn on the Sandbox.

  3. Finally start testing! (This will also automatically merge /e2e-overrides into /e2e).

npm run test

Note: to test a single spec, please update the Jest config (/e2e-overrides/jest.config.json) before running npm run test:

	"testMatch": [
-		"<rootDir>/e2e/specs/**/(*.)test.js"
+		"<rootDir>/e2e/specs/foo-bar.test.js"
	],

Sync with Gutenberg

As of 2018-11-23, this uses Gutenberg 4.5.1 as it's the version used by the WPCOM Sandbox.

To update it as needed:

  1. Run npm run update-e2e with the tag of a new Gutenberg release (e.g. npm run update-e2e v5.0.0).

  2. Check if there are big changes between /e2e-overrides and the new /e2e folder, and update the overrides as needed. (IMPORTANT: keep the same folder structure!)
    E.g. currently, most overrides are in /support/utils.js, but in future versions, all the utils functions will be moved into their own files.

  3. Run npm run overwrite-e2e to copy the overrides in the /e2e folder.

gutenberg-wpcom-e2e-tests's People

Contributors

copons avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

isabella232

gutenberg-wpcom-e2e-tests's Issues

Specs Audit v4.2.0

As of Gutenberg 4.2.0

Spec Time Results
blocks/list 52s
blocks/quote 54s
a11y 20s
adding-blocks 19s
adding-inline-tokens 12s
align-hook 46s ❌ 13/13
block-deletion 30s
block-hierarchy-navigation 25s
block-icons 46s ❌ 13/13
block-mover 19s
change-detection 89s ⚠️ 5/19
classic-editor 17s ❌ 1/1
compatibility-classic-editor 21s ❌ 1/1
container-blocks 21s ❌ 3/3
convert-block-type 13s
datepicker 18s
demo 12s
deprecated-node-matcher 17s ❌ 2/2
editor-modes 24s
embedding 47s ❌ 1/1
font-size-picker 30s
fullscreen-mode 13s
hooks-api 17s ❌ 2/2
links 90s
manage-reusable-blocks 15s
mentions 42s ❌ 1/1
meta-boxes 34s ❌ 2/2
multi-block-selection 20s
navigable-toolbar 21s
new-post-default-content 14s ❌ 1/1
new-post 14s ⚠️ 2/4
nux 25s ⚠️ 4/7
plugins-api 30s ❌ 5/5
preferences 16s ❌ 1/1
preview 30s ❌ 1/1
publishing 50s
reusable-blocks 63s ⚠️ 3/7
rich-text 21s
shortcut-help 13s
sidebar 24s
splitting-merging 37s
style-variation 13s
templates 25s ❌ 6/6
undo 13s
writing-flow 39s

Specs Audit v4.4.0

Bold: substantially changed results compared to v4.2.0

Spec Time Results Updated in
blocks/list 58s
blocks/quote 56s
a11y 22s
adding-blocks 20s
adding-inline-tokens 15s
align-hook 45s ❌ 13/13
block-deletion 29s
block-hierarchy-navigation 26s
block-icons 49s ❌ 13/13
block-mover 18s
change-detection 64s ⚠️ 7/15
classic-editor 15s ❌ 1/1
compatibility-classic-editor 21s ❌ 1/1
container-blocks 21s ❌ 3/3
convert-block-type 13s
datepicker 19s
demo 13s #5
deprecated-node-matcher 18s ❌ 2/2
editor-modes 24s
embedding 48s ❌ 1/1
font-size-picker 32s
fullscreen-mode 14s
hooks-api 18s ❌ 2/2
invalid-block 14s ❌ 1/1
links 103s ⚠️ 1/16
manage-reusable-blocks 18s
mentions 45s ❌ 1/1
meta-boxes 31s ❌ 2/2
multi-block-selection 25s
navigable-toolbar 23s
new-post-default-content 16s ❌ 1/1
new-post 23s #4
nux 25s ⚠️ 4/7
plugins-api 32s ❌ 6/6
popover 15s
preferences 15s ❌ 1/1
preview 31s ❌ 1/1
publish-button 20s
publish-panel 25s
publishing 51s
reusable-blocks 67s ⚠️ 3/7
rich-text 24s
shortcut-help 16s
sidebar 28s ⚠️ 1/6
splitting-merging 41s
style-variation 15s
templates 25s ❌ 6/6
undo 22s
writing-flow 50s

Specs Audit v4.5.1

See: p94tqY-fs-p2
Worked in #7

Spec Results Notes
blocks/code New
blocks/heading New
blocks/list
blocks/quote
blocks/separator
a11y
adding-blocks
adding-inline-tokens
align-hook ⚠️ Skipped because requires to install the gutenberg-test-align-hook plugin
annotations ⚠️ New; skipped because requires to install the gutenberg-test-plugin-plugins-api plugin
block-deletion
block-hierarchy-navigation Needed delay
block-icons ⚠️ Skipped because requires to install the gutenberg-test-block-icons plugin
block-mover
change-detection ⚠️ Skipped because not sure
classic-editor ⚠️ Skipped because not sure
compatibility-classic-editor ⚠️ Skipped because it fails a toMatchSnapshot on the entry content because my Sandbox uses sharing buttons. A solution would be to ask for test sandboxes to disable all things outputting in the content.
container-blocks ⚠️ Skipped because requires to install the gutenberg-test-innerblocks-templates and gutenberg-test-container-block-without-paragraph plugins
convert-block-type
datepicker
demo
deprecated-node-matcher ⚠️ Skipped because requires to install the gutenberg-test-deprecated-node-matcher plugin
editor-modes
embedding ⚠️ Skipped because not sure
font-size-picker
fullscreen-mode
hooks-api ⚠️ Skipped because requires to install the gutenberg-test-hooks-api plugin
invalid-block Needed to remove jest-console expects
links Used to fail
manage-reusable-blocks
mentions Needed to replace snapshot with actual string because Core tests assume the existence of a user starting with "a" (admin), but the sandboxes users don't necessarily start with "a".
meta-boxes ⚠️ Skipped because requires to install the gutenberg-test-plugin-meta-box plugin
multi-block-selection
navigable-toolbar
new-post-default-content ⚠️ Skipped because requires to install the gutenberg-test-plugin-default-post-content plugin
new-post
nux Needed delays
plugins-api ⚠️ Skipped because requires to install the gutenberg-test-plugin-plugins-api plugin
popover
post-visibility New
preferences Needed delay
preview Needed delay and a whitespace fix (need to fix it on Core Guten as well)
publish-button
publish-panel
publishing
reusable-blocks Needed delay
rich-text
shortcut-help
sidebar Used to fail
splitting-merging
style-variation
templates ⚠️ Skipped because requires to install the gutenberg-test-plugin-templates plugin
undo
writing-flow

Notes

Installing plugins on WPCOM passes through Calypso, so it has a different flow than Core.
I've temporarily disabled all specs that require a plugin to avoid spending time on this flow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.