PluginProbe
Extendify / 3.1.0
Extendify v3.1.0
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / tests / playwright / QuickEdit / setup.php

setup.php in Extendify 3.1.0, at tests/playwright/QuickEdit/setup.php

34 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 require '/wordpress/wp-load.php';
3
4 // Heading-heavy homepage so the spec has stable text targets that
5 // resolveTarget actually accepts. Paragraphs also resolve (detectBlockType
6 // derives core/<X> from any wp-block-X class), but the existing
7 // inline-text journey lives on headings; the trailing paragraph is kept
8 // so paragraph-specific specs have a stable target.
9 $content = "<!-- wp:heading -->\n"
10 . "<h2 class=\"wp-block-heading\">First heading for inline-text testing.</h2>\n"
11 . "<!-- /wp:heading -->\n\n"
12 . "<!-- wp:heading -->\n"
13 . "<h2 class=\"wp-block-heading\">Second heading for cancel testing.</h2>\n"
14 . "<!-- /wp:heading -->\n\n"
15 . "<!-- wp:heading -->\n"
16 . "<h2 class=\"wp-block-heading\">Third heading for cmd-enter testing.</h2>\n"
17 . "<!-- /wp:heading -->\n\n"
18 . "<!-- wp:heading -->\n"
19 . "<h2 class=\"wp-block-heading\">Fourth heading for undo testing.</h2>\n"
20 . "<!-- /wp:heading -->\n\n"
21 . "<!-- wp:paragraph -->\n"
22 . "<p>Paragraphs only get Ask AI today, not Quick Edit.</p>\n"
23 . "<!-- /wp:paragraph -->\n";
24
25 $pageId = wp_insert_post([
26 'post_type' => 'page',
27 'post_status' => 'publish',
28 'post_title' => 'QE Test Home',
29 'post_content' => $content,
30 ]);
31
32 update_option('show_on_front', 'page');
33 update_option('page_on_front', $pageId);
34