coblocks icon indicating copy to clipboard operation
coblocks copied to clipboard

Add e2e test utils for Cypress

Open jrtashjian opened this issue 3 years ago • 1 comments

Description

Adding a library to standardize and organize our repeatable actions interacting with the Block Editor within our Cypress E2E tests. This library will mostly duplicate the API of the @wordpress/e2e-test-utils package which was built specifically for Puppeteer. The plan would be to get near 100% parity with the existing API and to extract this into it's own package for public use (once ready).

The only utilities I've added so far are those that interact with the global block inserter to search for and insert a block. I've tested this specifically with the existing Alert block tests and all are passing as if nothing changed. Here is the current API docs (auto generated using @wordpress/docgen).

Why am I doing this? Cypress has been frustratingly inconsistent and we need to do a better job of not writing duplicate code or targeting selectors specific to the block editor in multiple places. These can and have changed in other releases of the block editor and has been time consuming to update. Basically, I want to stop testing Gutenberg and focus our tests on CoBlocks.

Types of changes

New testing tools for Cypress

jrtashjian avatar Oct 05 '20 20:10 jrtashjian



Test summary

158 44 0 26


Run details

Project CoBlocks
Status Failed
Commit 6bfcf13062
Started Oct 5, 2020 8:28 PM
Ended Oct 5, 2020 8:38 PM
Duration 10:25 💡
OS Linux Debian - 10.5
Browser Multiple

View run in Cypress Dashboard ➡️


Failures

Run group: e2e-chrome (Linux, Chrome )
src/blocks/share/test/share.cypress.js Failed
1 Test CoBlocks Share Block > Test the share block colors.
src/blocks/gallery-masonry/test/gallery-masonry.cypress.js Failed
1 Test CoBlocks Gallery Masonry Block > Test masonry block saves with empty values.
2 Test CoBlocks Gallery Masonry Block > Test masonry block saves with image upload.
3 Test CoBlocks Gallery Masonry Block > Test masonry block saves with images from media library.
4 Test CoBlocks Gallery Masonry Block > Test masonry block saves with images captions.
src/extensions/layout-selector/test/layout-selector.cypress.js Failed
1 Extension: Layout Selector > inserts layout into page
src/blocks/gallery-stacked/test/gallery-stacked.cypress.js Failed
1 Test CoBlocks Gallery Stacked Block > Test stacked block saves with empty values.
2 Test CoBlocks Gallery Stacked Block > Test stacked block saves with image upload.
3 Test CoBlocks Gallery Stacked Block > Test stacked block saves with images from media library.
4 Test CoBlocks Gallery Stacked Block > Test stacked block saves with images captions.
This comment includes only the first 10 test failures. See all 44 failures in the Cypress Dashboard.
Run group: e2e-firefox (Linux, Firefox )
src/blocks/share/test/share.cypress.js Failed
1 Test CoBlocks Share Block > Test the share block colors.
src/blocks/gallery-stacked/test/gallery-stacked.cypress.js Failed
1 Test CoBlocks Gallery Stacked Block > Test stacked block saves with empty values.
2 Test CoBlocks Gallery Stacked Block > Test stacked block saves with image upload.
3 Test CoBlocks Gallery Stacked Block > Test stacked block saves with images from media library.
4 Test CoBlocks Gallery Stacked Block > Test stacked block saves with images captions.
src/blocks/gallery-masonry/test/gallery-masonry.cypress.js Failed
1 Test CoBlocks Gallery Masonry Block > Test masonry block saves with empty values.
2 Test CoBlocks Gallery Masonry Block > Test masonry block saves with image upload.
3 Test CoBlocks Gallery Masonry Block > Test masonry block saves with images from media library.
4 Test CoBlocks Gallery Masonry Block > Test masonry block saves with images captions.
src/extensions/media-text-styles/test/media-text-styles.cypress.js Failed
1 Test CoBlocks Media Text styles extension > Test core/media-text block extends with Media-Text styles extension.
This comment includes only the first 10 test failures. See all 44 failures in the Cypress Dashboard.

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

cypress[bot] avatar Oct 05 '20 20:10 cypress[bot]

Closing this as we may be moving away from Cypress.

jrtashjian avatar Sep 24 '22 00:09 jrtashjian