Skip to content

Commit

Permalink
Adjust tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Feb 17, 2025
1 parent 7599ff3 commit abfed4e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/border-box-control/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ describe( 'BorderBoxControl', () => {
await waitFor( () =>
expect(
screen.getByRole( 'button', {
name: 'Custom color picker.',
name: 'Custom color picker',
} )
).toBeVisible()
);
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/border-control/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ describe( 'BorderControl', () => {

const customColorPicker = getButton( /Custom color picker/ );
const circularOptionPicker = screen.getByRole( 'listbox', {
name: 'Custom color picker.',
name: 'Custom color picker',
} );
const colorSwatchButtons =
within( circularOptionPicker ).getAllByRole( 'option' );
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/color-palette/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ function UnforwardedColorPalette(
buttonLabelName,
displayValue
)
: __( 'Custom color picker.' );
: __( 'Custom color picker' );

const paletteCommonProps = {
clearColor,
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/color-palette/test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ describe( 'ColorPalette', () => {
expect( screen.queryByText( colorCode ) ).not.toBeInTheDocument();
expect(
screen.getByRole( 'button', {
name: /^Custom color picker.$/,
name: /^Custom color picker$/,
} )
).toBeInTheDocument();
} );
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/specs/editor/blocks/buttons.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,13 @@ test.describe( 'Buttons', () => {
await page.click(
'role=region[name="Editor settings"i] >> role=button[name="Text"i]'
);
await page.click( 'role=button[name="Custom color picker."i]' );
await page.click( 'role=button[name="Custom color picker"i]' );
await page.fill( 'role=textbox[name="Hex color"i]', 'ff0000' );

await page.click(
'role=region[name="Editor settings"i] >> role=button[name="Background"i]'
);
await page.click( 'role=button[name="Custom color picker."i]' );
await page.click( 'role=button[name="Custom color picker"i]' );
await page.fill( 'role=textbox[name="Hex color"i]', '00ff00' );

// Check the content.
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/specs/editor/blocks/heading.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ test.describe( 'Heading', () => {

await textColor.click();
await page
.getByRole( 'button', { name: /Custom color picker./i } )
.getByRole( 'button', { name: /Custom color picker/i } )
.click();

await page
Expand Down

0 comments on commit abfed4e

Please sign in to comment.