Skip to content

Begin with some E2E Tests#2708

Merged
swissspidy merged 32 commits intodevelopfrom
2696-e2e-tests
Jul 2, 2019
Merged

Begin with some E2E Tests#2708
swissspidy merged 32 commits intodevelopfrom
2696-e2e-tests

Conversation

@swissspidy
Copy link
Copy Markdown
Collaborator

@swissspidy swissspidy commented Jun 28, 2019

Introduces a new local environment based on Docker that can be used for developing the plugin, but most importantly for running e2e tests using Puppeteer.

This has been made possible by the fine folks working on Gutenberg and WordPress core who spearheaded work on a common infrastructure.

Some nice side effects of this new setup is the addition of scripts like ./bin/local-env/install-composer.sh and ./bin/local-env/install-node-nvm.sh to verify the base requirements for developing this plugin are installed.

Documentation about this new setup and local development in general can be found in contributing.md.

Tests for the following areas are included so far:

  • AMP Options screen and how the UI changes depending on the state
  • Displaying the AMP Stories admin pointer
  • A simple "Hello World" test as an example

No tests have been written yet for the editor parts of the plugin. However, especially for AMP Stories the latest version of Gutenberg is always installed so that this is easily possible in the future.

Fixes #2696.
Fixes #1823.

Adds subfolders to `tests/` and updates the e2e config with to bring it in line with what has been added to core.
@googlebot googlebot added the cla: yes Signed the Google CLA label Jun 28, 2019
@swissspidy swissspidy changed the title [WIP] Begin with some E2E Tests Begin with some E2E Tests Jul 1, 2019
@swissspidy swissspidy added this to the v1.2.1 milestone Jul 1, 2019
@swissspidy
Copy link
Copy Markdown
Collaborator Author

@westonruter @kienstra Let me know if anything about this proposed test setup is unclear or not working as intended. It should be a simple to run npm run env:start to set everything up, and then npm run test:e2e to run the tests.

@kienstra
Copy link
Copy Markdown
Contributor

kienstra commented Jul 2, 2019

Approved

Hi @swissspidy,
This looks good, the e2e tests passed after running ./bin/local-env/start.sh and npm run test:e2e:

e2e-tests-passed

There are just some minor comments below.

@swissspidy swissspidy merged commit bdab263 into develop Jul 2, 2019
@swissspidy swissspidy deleted the 2696-e2e-tests branch July 2, 2019 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Signed the Google CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

End to End (E2E) Testing Infrastructure Introduce a development environment

3 participants