@wordpress/e2e-tests 7.19.0 → 7.19.1-next.79a6196f.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/LICENSE.md +1 -1
  2. package/jest.config.js +0 -1
  3. package/package.json +8 -9
  4. package/plugins/iframed-block/block.json +1 -0
  5. package/plugins/iframed-inline-styles/block.json +1 -0
  6. package/plugins/iframed-masonry-block/block.json +1 -0
  7. package/plugins/iframed-multiple-stylesheets/block.json +1 -0
  8. package/plugins/interactive-blocks/directive-bind/block.json +1 -0
  9. package/plugins/interactive-blocks/directive-body/block.json +1 -0
  10. package/plugins/interactive-blocks/directive-class/block.json +1 -0
  11. package/plugins/interactive-blocks/directive-context/block.json +1 -0
  12. package/plugins/interactive-blocks/directive-init/block.json +1 -0
  13. package/plugins/interactive-blocks/directive-key/block.json +1 -0
  14. package/plugins/interactive-blocks/directive-on/block.json +1 -0
  15. package/plugins/interactive-blocks/directive-priorities/block.json +1 -0
  16. package/plugins/interactive-blocks/directive-slots/block.json +1 -0
  17. package/plugins/interactive-blocks/directive-style/block.json +1 -0
  18. package/plugins/interactive-blocks/directive-text/block.json +1 -0
  19. package/plugins/interactive-blocks/directive-watch/block.json +1 -0
  20. package/plugins/interactive-blocks/negation-operator/block.json +1 -0
  21. package/plugins/interactive-blocks/router-navigate/block.json +1 -0
  22. package/plugins/interactive-blocks/router-regions/block.json +1 -0
  23. package/plugins/interactive-blocks/store-tag/block.json +1 -0
  24. package/plugins/interactive-blocks/tovdom/block.json +1 -0
  25. package/plugins/interactive-blocks/tovdom-islands/block.json +1 -0
  26. package/plugins/interactive-blocks/tovdom-islands/render.php +12 -0
  27. package/plugins/pattern-recursion.php +22 -0
  28. package/specs/editor/various/inserting-blocks.test.js +3 -5
  29. package/specs/editor/various/__snapshots__/block-editor-keyboard-shortcuts.test.js.snap +0 -153
  30. package/specs/editor/various/allowed-patterns.test.js +0 -74
  31. package/specs/editor/various/block-editor-keyboard-shortcuts.test.js +0 -110
  32. package/specs/editor/various/block-switcher.test.js +0 -130
  33. package/specs/editor/various/core-settings.test.js +0 -42
  34. package/specs/editor/various/datepicker.test.js +0 -148
  35. package/specs/editor/various/dropdown-menu.test.js +0 -143
  36. package/specs/editor/various/editor-modes.test.js +0 -163
  37. package/specs/editor/various/invalid-block.test.js +0 -100
  38. package/specs/editor/various/nux.test.js +0 -158
  39. package/specs/editor/various/preferences.test.js +0 -62
  40. package/specs/editor/various/publish-panel.test.js +0 -82
  41. package/specs/editor/various/publishing.test.js +0 -176
  42. package/specs/editor/various/scheduling.test.js +0 -65
  43. package/specs/editor/various/sidebar.test.js +0 -171
  44. package/specs/editor/various/taxonomies.test.js +0 -251
  45. package/specs/experiments/blocks/post-comments-form.test.js +0 -53
  46. package/specs/experiments/experimental-features.js +0 -39
  47. package/specs/experiments/fixtures/menu-items-request-fixture.json +0 -84
  48. package/specs/site-editor/settings-sidebar.test.js +0 -122
  49. package/specs/widgets/editing-widgets.test.js +0 -962
@@ -1,122 +0,0 @@
1
- /**
2
- * WordPress dependencies
3
- */
4
- import {
5
- deleteAllTemplates,
6
- activateTheme,
7
- getAllBlocks,
8
- selectBlockByClientId,
9
- insertBlock,
10
- visitSiteEditor,
11
- enterEditMode,
12
- } from '@wordpress/e2e-test-utils';
13
-
14
- async function toggleSidebar() {
15
- await page.click(
16
- '.edit-site-header-edit-mode__actions button[aria-label="Settings"]'
17
- );
18
- }
19
-
20
- async function getActiveTabLabel() {
21
- return await page.$eval(
22
- '.edit-site-sidebar-edit-mode__panel-tab.is-active',
23
- ( element ) => element.getAttribute( 'aria-label' )
24
- );
25
- }
26
-
27
- async function getTemplateCard() {
28
- return {
29
- title: await page.$eval(
30
- '.edit-site-sidebar-card__title',
31
- ( element ) => element.innerText
32
- ),
33
- description: await page.$eval(
34
- '.edit-site-sidebar-card__description',
35
- ( element ) => element.innerText
36
- ),
37
- };
38
- }
39
-
40
- describe( 'Settings sidebar', () => {
41
- beforeAll( async () => {
42
- await activateTheme( 'emptytheme' );
43
- await deleteAllTemplates( 'wp_template' );
44
- await deleteAllTemplates( 'wp_template_part' );
45
- } );
46
- afterAll( async () => {
47
- await deleteAllTemplates( 'wp_template' );
48
- await deleteAllTemplates( 'wp_template_part' );
49
- await activateTheme( 'twentytwentyone' );
50
- } );
51
- beforeEach( async () => {
52
- await visitSiteEditor();
53
- await enterEditMode();
54
- } );
55
-
56
- describe( 'Template tab', () => {
57
- it( 'should open template tab by default if no block is selected', async () => {
58
- await toggleSidebar();
59
-
60
- expect( await getActiveTabLabel() ).toEqual(
61
- 'Template (selected)'
62
- );
63
- } );
64
-
65
- it( "should show the currently selected template's title and description", async () => {
66
- await toggleSidebar();
67
-
68
- const templateCardBeforeNavigation = await getTemplateCard();
69
- await visitSiteEditor( {
70
- postId: 'emptytheme//singular',
71
- postType: 'wp_template',
72
- } );
73
- await enterEditMode();
74
- const templateCardAfterNavigation = await getTemplateCard();
75
-
76
- expect( templateCardBeforeNavigation ).toMatchObject( {
77
- title: 'Index',
78
- description:
79
- 'Used as a fallback template for all pages when a more specific template is not defined.',
80
- } );
81
- expect( templateCardAfterNavigation ).toMatchObject( {
82
- title: 'Single Entries',
83
- description:
84
- 'Displays any single entry, such as a post or a page. This template will serve as a fallback when a more specific template (e.g. Single Post, Page, or Attachment) cannot be found.',
85
- } );
86
- } );
87
- } );
88
-
89
- describe( 'Block tab', () => {
90
- it( 'should open block tab by default if a block is selected', async () => {
91
- const allBlocks = await getAllBlocks();
92
- await selectBlockByClientId( allBlocks[ 0 ].clientId );
93
-
94
- await toggleSidebar();
95
-
96
- expect( await getActiveTabLabel() ).toEqual( 'Block (selected)' );
97
- } );
98
- } );
99
-
100
- describe( 'Tab switch based on selection', () => {
101
- it( 'should switch to block tab if we select a block, when Template is selected', async () => {
102
- await toggleSidebar();
103
- expect( await getActiveTabLabel() ).toEqual(
104
- 'Template (selected)'
105
- );
106
- // By inserting the block is also selected.
107
- await insertBlock( 'Heading' );
108
- expect( await getActiveTabLabel() ).toEqual( 'Block (selected)' );
109
- } );
110
- it( 'should switch to Template tab when a block was selected and we select the Template', async () => {
111
- await insertBlock( 'Heading' );
112
- await toggleSidebar();
113
- expect( await getActiveTabLabel() ).toEqual( 'Block (selected)' );
114
- await page.evaluate( () => {
115
- wp.data.dispatch( 'core/block-editor' ).clearSelectedBlock();
116
- } );
117
- expect( await getActiveTabLabel() ).toEqual(
118
- 'Template (selected)'
119
- );
120
- } );
121
- } );
122
- } );