CYS: apply white color to the heading elements in the core/cover block (#48447)
* CYS: apply color to the heading elements in the core/cover block * Add changefile(s) from automation for the following project(s): woocommerce * fix color * add E2E test --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
1f4a86c7f1
commit
e044ea9120
|
@ -1593,6 +1593,15 @@ export const COLOR_PALETTES = [
|
|||
text: 'var(--wp--preset--color--foreground)',
|
||||
},
|
||||
},
|
||||
'core/cover': {
|
||||
elements: {
|
||||
heading: {
|
||||
color: {
|
||||
text: '#ffffff',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
'core/site-title': {
|
||||
elements: {
|
||||
link: {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
CYS: apply white color to the heading elements in the core/cover block </details> <details> <summary>Changelog Entry Comment</summary>
|
|
@ -350,6 +350,25 @@ test.describe( 'Assembler -> Color Pickers', () => {
|
|||
} )
|
||||
);
|
||||
|
||||
const headersInCoverBlock = await editor
|
||||
.locator(
|
||||
`.wp-block-cover__inner-container h1,
|
||||
.wp-block-cover__inner-container h2,
|
||||
.wp-block-cover__inner-container h3,
|
||||
.wp-block-cover__inner-container h4,
|
||||
.wp-block-cover__inner-container h5,
|
||||
.wp-block-cover__inner-container h6`
|
||||
)
|
||||
.evaluateAll( ( elements ) =>
|
||||
elements.map( ( element ) => {
|
||||
const style = window.getComputedStyle( element );
|
||||
return {
|
||||
background: style.backgroundColor,
|
||||
color: style.color,
|
||||
};
|
||||
} )
|
||||
);
|
||||
|
||||
for ( const element of buttons ) {
|
||||
await expect( element.background ).toEqual(
|
||||
colors.button.background
|
||||
|
@ -367,6 +386,12 @@ test.describe( 'Assembler -> Color Pickers', () => {
|
|||
true
|
||||
);
|
||||
}
|
||||
|
||||
// Check that the headers in the cover block are white text.
|
||||
// See: https://github.com/woocommerce/woocommerce/pull/48447
|
||||
for ( const element of headersInCoverBlock ) {
|
||||
expect( element.color ).toEqual( 'rgb(255, 255, 255)' );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue