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

Patterns: Change deprecated social icons for standard in e2e #65312

Merged
merged 6 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
<p>Dummy text</p>
<!-- /wp:paragraph -->

<!-- wp:social-links {"customIconColor":"#ffffff","iconColorValue":"#ffffff","customIconBackgroundColor":"#3962e3","iconBackgroundColorValue":"#3962e3","metadata":{"categories":["call-to-action"],"patternName":"core/social-links-shared-background-color","name":"Social links with a shared background color"},"className":"has-icon-color"} -->
<ul class="wp-block-social-links has-icon-color has-icon-background-color"><!-- wp:social-link {"url":"https://wordpress.org","service":"wordpress"} /-->
<!-- wp:query {"queryId":1,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"metadata":{"categories":["posts"],"patternName":"core/query-standard-posts","name":"Standard"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:post-title {"isLink":true} /-->

<!-- wp:social-link {"url":"#","service":"chain"} /-->
<!-- wp:post-featured-image {"isLink":true,"align":"wide"} /-->

<!-- wp:social-link {"url":"#","service":"mail"} /--></ul>
<!-- /wp:social-links -->
<!-- wp:post-excerpt /-->

<!-- wp:separator {"opacity":"css"} -->
<hr class="wp-block-separator has-css-opacity"/>
<!-- /wp:separator -->

<!-- wp:post-date /-->
<!-- /wp:post-template --></div>
<!-- /wp:query -->
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
<p>Dummy text</p>
<!-- /wp:paragraph -->

<!-- wp:social-links {"customIconColor":"#ffffff","iconColorValue":"#ffffff","customIconBackgroundColor":"#3962e3","iconBackgroundColorValue":"#3962e3","metadata":{"categories":["call-to-action"],"patternName":"core/social-links-shared-background-color","name":"Social links with a shared background color"},"className":"has-icon-color"} -->
<ul class="wp-block-social-links has-icon-color has-icon-background-color"><!-- wp:social-link {"url":"https://wordpress.org","service":"wordpress"} /-->
<!-- wp:query {"queryId":1,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false},"metadata":{"categories":["posts"],"patternName":"core/query-standard-posts","name":"Standard"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:post-title {"isLink":true} /-->

<!-- wp:social-link {"url":"#","service":"chain"} /-->
<!-- wp:post-featured-image {"isLink":true,"align":"wide"} /-->

<!-- wp:social-link {"url":"#","service":"mail"} /--></ul>
<!-- /wp:social-links -->
<!-- wp:post-excerpt /-->

<!-- wp:separator {"opacity":"css"} -->
<hr class="wp-block-separator has-css-opacity"/>
<!-- /wp:separator -->

<!-- wp:post-date /-->
<!-- /wp:post-template --></div>
<!-- /wp:query -->
8 changes: 3 additions & 5 deletions test/e2e/specs/editor/various/adding-patterns.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,13 @@ test.describe( 'adding patterns', () => {
await page.getByRole( 'tab', { name: 'Patterns' } ).click();
await page.fill(
'role=region[name="Block Library"i] >> role=searchbox[name="Search for blocks and patterns"i]',
'Social links with a shared background color'
'Standard'
);

await page.click(
'role=option[name="Social links with a shared background color"i]'
);
await page.getByRole( 'option', { name: 'Standard' } ).click();
await expect.poll( editor.getBlocks ).toMatchObject( [
{
name: 'core/social-links',
name: 'core/query',
},
] );
} );
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/editor/various/inserting-blocks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ test.describe( 'Inserting blocks (@firefox, @webkit)', () => {
'role=region[name="Editor top bar"i] >> role=button[name="Toggle block inserter"i]'
);

const PATTERN_NAME = 'Social links with a shared background color';
const PATTERN_NAME = 'Standard';

await page.fill(
'role=region[name="Block Library"i] >> role=searchbox[name="Search for blocks and patterns"i]',
Expand Down Expand Up @@ -350,7 +350,7 @@ test.describe( 'Inserting blocks (@firefox, @webkit)', () => {
'role=region[name="Editor top bar"i] >> role=button[name="Toggle block inserter"i]'
);

const PATTERN_NAME = 'Social links with a shared background color';
const PATTERN_NAME = 'Standard';

await page.fill(
'role=region[name="Block Library"i] >> role=searchbox[name="Search for blocks and patterns"i]',
Expand Down
Loading