Conversation
| return; | ||
| } | ||
|
|
||
| return window._getContent(); |
There was a problem hiding this comment.
Not sure how this should best be done. Alternatively we expose everything though window.wp as well, or we create a text field with the value.
There was a problem hiding this comment.
I feel we shouldn't try to touch the e2e-test-utils or at least we should have specific WordPress utils, Playground utils and potentially Common utils too. These can still live in this utils package but it definitely need more organization. Right now it's just something where we put everything without thinking of organizing it properly especially because most of these utils have "context" in which they can be used in or not.
There was a problem hiding this comment.
I agree. This was a temporary thing. I'm not sure what's the best way to check content for the playground right now as well.
| } ); | ||
| } ); | ||
|
|
||
| bundler.serve(); |
There was a problem hiding this comment.
Is this separate script needed? I wonder if we could be able to do something like npm run playground:start && npm run test:e2e-playground or something like that.
The reason being to decouple the environment from running the tests.
There was a problem hiding this comment.
I tried and failed. See parcel-bundler/parcel#1131 (comment). This seems to be the only way to run something after parcel is done building and is serving.
|
|
||
| afterAll( () => { | ||
| removePageEvents(); | ||
| } ); |
There was a problem hiding this comment.
There are probably things we can factorize between our two bootstraps. Maybe the console logging catch could be a utility in the utils package for instance...
There was a problem hiding this comment.
Maybe :) I was even thinking about removing it...
|
|
||
| // Viewing posts on the front end can result in this error, which | ||
| // has nothing to do with Gutenberg. | ||
| if ( text.includes( 'net::ERR_UNKNOWN_URL_SCHEME' ) ) { |
There was a problem hiding this comment.
We should remove all the irrelevant stuff here.
|
|
||
| <!-- wp:paragraph --> | ||
| <p></p> | ||
| <p>Foo</p> |
There was a problem hiding this comment.
Needs to be investigated. Accidentally overwrote this file.
|
Moving the tests revealed some errors with reusable blocks fetching. Also history doesn't work there yet. Perhaps the latter can be fixed as part of this PR. |
|
This PR might help with the reusable blocks #14367 |
|
I'm late to the party but I think that using the playground for testing the block editor is a brilliant idea 🚀 I didn't think enough about it but I anticipate that it should fall under both the component and integration testing layers which is awesome if you think about it. We still have to keep e2e tests which have to work with WordPress instance so there should be some overlap which can help to catch some issues related to WordPress core. We can always move some tests back to e2e tests group if we figure out it's not enough to use playground only. The question is whether all those tests which use the playground, shouldn't be moved to |
|
Closing this for now as it's outdated and I'm not planning to work on it for now |
Description
WIP
How has this been tested?
Screenshots
Types of changes
Checklist: