Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cover block: Add integration tests #45409

Merged
merged 39 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
042428d
Add more block toolbar tests, and initial toolspanel test
glendaviesnz Oct 27, 2022
fa0a316
Add more tests and switch to userEvent instead of fireEvent
glendaviesnz Oct 28, 2022
2e41650
remove inadvertent change
glendaviesnz Oct 28, 2022
4fdb78b
Change the way the controls are mocked
glendaviesnz Oct 28, 2022
214c315
Finish off the inspector control tests
glendaviesnz Oct 30, 2022
5654827
Update comment
glendaviesnz Oct 30, 2022
019d5a3
Add some tests for edit cmponent
glendaviesnz Oct 31, 2022
80316b6
remove inadvertent commit
glendaviesnz Oct 31, 2022
6360966
Remove jest advance timers
glendaviesnz Jan 17, 2023
69b066e
Fix broken test
glendaviesnz Jan 17, 2023
249f9b1
Wrap the Cover Edit component in a SlotProvider for testing
glendaviesnz Mar 13, 2023
2aa6d55
Woop Woop - fire up an editor instance to integration test a block Ed…
glendaviesnz Mar 14, 2023
fd77c1f
set up function to prevent duplication of user events
glendaviesnz Mar 15, 2023
0117b24
Replace Cover e2e tests than can be replaced as integration tests
glendaviesnz Mar 16, 2023
3043e47
Tidy up integration test editor
glendaviesnz Mar 16, 2023
65bfc75
move to integration tests folder and add wrapper to fix issue with as…
glendaviesnz Mar 16, 2023
43d855d
Tidy up test editor setup
glendaviesnz Mar 16, 2023
15ac92a
Move inspector control tests to use new integration editor
glendaviesnz Mar 16, 2023
8af2060
Move block toolbar tests to new integration test editor
glendaviesnz Mar 16, 2023
d56dc26
Remove unnecessary useEffect
glendaviesnz Mar 16, 2023
fbc56c4
Attempt to fix CI error
glendaviesnz Mar 16, 2023
408e22e
Add some debugging for CI issue
glendaviesnz Mar 16, 2023
21f97c7
Revert "Add some debugging for CI issue"
glendaviesnz Mar 16, 2023
4697a69
Comment out media related tests to see if that fixes test failures
glendaviesnz Mar 17, 2023
6f19aef
Put url related tests back in
glendaviesnz Mar 17, 2023
29bf6ba
Add await to the block creation
glendaviesnz Mar 17, 2023
19552d1
try different way of wrapping async call to see if that fixes CI issue
glendaviesnz Mar 17, 2023
7bf0bce
Revert "try different way of wrapping async call to see if that fixes…
glendaviesnz Mar 17, 2023
a2f16fa
Add polyfill for missing string method on CI
glendaviesnz Mar 17, 2023
431b2ba
remove optional chain that wasn't actually needed
glendaviesnz Mar 17, 2023
a293716
changes from code review
glendaviesnz Mar 19, 2023
f201a3b
Add some doc comments to the integration test editor methods
glendaviesnz Mar 22, 2023
50a264a
changes from code review
glendaviesnz Mar 22, 2023
a58601f
Move some of the block initialisation into the editor component to av…
glendaviesnz Mar 26, 2023
7a2b353
Fix type in comment
glendaviesnz Mar 26, 2023
b0f0746
Move the setup to initialise method rather than an effect
glendaviesnz Mar 26, 2023
8948961
Add doc block comment
glendaviesnz Mar 26, 2023
c5fccc6
Fixes from review
glendaviesnz Mar 28, 2023
93148ca
Remove the class selectors that can use `img` instead
glendaviesnz Mar 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/block-library/src/cover/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function getInnerBlocksTemplate( attributes ) {
*/
const isTemporaryMedia = ( id, url ) => ! id && isBlobURL( url );

function CoverEdit( {
export function CoverEdit( {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why we can't use the default export?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually don't need that export anymore - that was from some of my earlier experimentation - the default export was already used on the export with the withColors wrapper. Have reverted this now.

attributes,
clientId,
isSelected,
Expand Down
62 changes: 0 additions & 62 deletions packages/block-library/src/cover/test/block-controls.js

This file was deleted.

Loading