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

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.