diff --git a/packages/edit-site/src/components/global-styles/font-families.js b/packages/edit-site/src/components/global-styles/font-families.js index cd1697b7b79bd..f3e81efbe597b 100644 --- a/packages/edit-site/src/components/global-styles/font-families.js +++ b/packages/edit-site/src/components/global-styles/font-families.js @@ -6,9 +6,11 @@ import { __experimentalText as Text, __experimentalItemGroup as ItemGroup, __experimentalVStack as VStack, + __experimentalHStack as HStack, Button, } from '@wordpress/components'; import { privateApis as blockEditorPrivateApis } from '@wordpress/block-editor'; +import { settings } from '@wordpress/icons'; import { useContext } from '@wordpress/element'; /** @@ -67,10 +69,18 @@ function FontFamilies() { /> ) } - + + + { __( 'Fonts' ) } + + ) } - ); diff --git a/test/e2e/specs/site-editor/font-library.spec.js b/test/e2e/specs/site-editor/font-library.spec.js index 6d699f4b02a63..7271768206d1b 100644 --- a/test/e2e/specs/site-editor/font-library.spec.js +++ b/test/e2e/specs/site-editor/font-library.spec.js @@ -38,7 +38,7 @@ test.describe( 'Font Library', () => { ).toBeVisible(); } ); - test( 'should display the "Add fonts" button', async ( { page } ) => { + test( 'should display the "Manage fonts" icon', async ( { page } ) => { await page .getByRole( 'region', { name: 'Editor top bar' } ) .getByRole( 'button', { name: 'Styles' } ) @@ -46,10 +46,10 @@ test.describe( 'Font Library', () => { await page .getByRole( 'button', { name: 'Typography Styles' } ) .click(); - const addFontsButton = page.getByRole( 'button', { - name: 'Add fonts', + const manageFontsIcon = page.getByRole( 'button', { + name: 'Manage fonts', } ); - await expect( addFontsButton ).toBeVisible(); + await expect( manageFontsIcon ).toBeVisible(); } ); } ); @@ -66,9 +66,7 @@ test.describe( 'Font Library', () => { } ); } ); - test( 'should display the "Manage fonts" button', async ( { - page, - } ) => { + test( 'should display the "Manage fonts" icon', async ( { page } ) => { await page .getByRole( 'region', { name: 'Editor top bar' } ) .getByRole( 'button', { name: 'Styles' } ) @@ -76,13 +74,13 @@ test.describe( 'Font Library', () => { await page .getByRole( 'button', { name: 'Typography Styles' } ) .click(); - const manageFontsButton = page.getByRole( 'button', { + const manageFontsIcon = page.getByRole( 'button', { name: 'Manage fonts', } ); - await expect( manageFontsButton ).toBeVisible(); + await expect( manageFontsIcon ).toBeVisible(); } ); - test( 'should open the "Manage fonts" modal when clicking the "Manage fonts" button', async ( { + test( 'should open the "Manage fonts" modal when clicking the "Manage fonts" icon', async ( { page, } ) => { await page