From 2d101433ed70dafa9fcd65f2298ab59c6c8993c4 Mon Sep 17 00:00:00 2001 From: "Matthew Riley MacPherson (tofumatt)" Date: Tue, 26 Jun 2018 19:58:24 +0100 Subject: [PATCH] chore: Change escaped single-quoted strings after #7366 --- core-blocks/categories/index.js | 2 +- core-blocks/columns/index.js | 2 +- core-blocks/freeform/index.js | 2 +- core-blocks/image/index.js | 2 +- core-blocks/more/index.js | 2 +- core-blocks/subhead/index.js | 2 +- core-blocks/test/full-content.js | 10 +++++----- .../components/autocompleters/test/block.js | 2 +- .../test/block-mode-toggle.js | 2 +- editor/components/post-author/test/check.js | 4 ++-- .../post-pending-status/test/check.js | 2 +- .../post-publish-panel/postpublish.js | 2 +- .../post-publish-panel/prepublish.js | 2 +- editor/components/post-schedule/test/check.js | 2 +- editor/components/post-sticky/test/index.js | 2 +- .../components/post-visibility/test/check.js | 2 +- .../template-validation-notice/index.js | 2 +- .../theme-support-check/test/index.js | 6 +++--- editor/store/test/reducer.js | 2 +- editor/store/test/selectors.js | 4 ++-- .../api-fetch/src/middlewares/test/http-v1.js | 2 +- packages/blocks/src/api/test/parser.js | 8 ++++---- packages/blocks/src/api/test/serializer.js | 2 +- packages/blocks/src/api/test/templates.js | 4 ++-- packages/blocks/src/api/test/validation.js | 4 ++-- .../components/src/autocomplete/test/index.js | 2 +- .../components/src/disabled/test/index.js | 4 ++-- packages/components/src/popover/test/utils.js | 14 ++++++------- .../components/src/slot-fill/test/slot.js | 2 +- packages/core-data/src/test/entities.js | 4 ++-- packages/core-data/src/test/selectors.js | 2 +- packages/dom/src/test/dom.js | 2 +- post-content.js | 20 +++++++++---------- test/e2e/specs/adding-blocks.test.js | 2 +- test/e2e/specs/change-detection.test.js | 2 +- test/e2e/specs/managing-links.test.js | 2 +- test/e2e/specs/nux.test.js | 2 +- 37 files changed, 67 insertions(+), 67 deletions(-) diff --git a/core-blocks/categories/index.js b/core-blocks/categories/index.js index b69986dbe12273..f2797c5586f582 100644 --- a/core-blocks/categories/index.js +++ b/core-blocks/categories/index.js @@ -14,7 +14,7 @@ export const name = 'core/categories'; export const settings = { title: __( 'Categories' ), - description: __( 'Display a list of all your site\'s categories.' ), + description: __( "Display a list of all your site's categories." ), icon: 'list-view', diff --git a/core-blocks/columns/index.js b/core-blocks/columns/index.js index 3d7320c7168f7d..4e2003eed2aaba 100644 --- a/core-blocks/columns/index.js +++ b/core-blocks/columns/index.js @@ -66,7 +66,7 @@ export const settings = { }, }, - description: __( 'Add a block that displays content in multiple columns, then add whatever content blocks you\'d like.' ), + description: __( "Add a block that displays content in multiple columns, then add whatever content blocks you'd like." ), supports: { align: [ 'wide', 'full' ], diff --git a/core-blocks/freeform/index.js b/core-blocks/freeform/index.js index 711fb3b7768d8e..a58dbf3b266485 100644 --- a/core-blocks/freeform/index.js +++ b/core-blocks/freeform/index.js @@ -14,7 +14,7 @@ export const name = 'core/freeform'; export const settings = { title: __( 'Classic' ), - description: __( 'It\'s the classic WordPress editor and it\'s a block! Drop the editor right in.' ), + description: __( "It's the classic WordPress editor and it's a block! Drop the editor right in." ), icon: 'editor-kitchensink', diff --git a/core-blocks/image/index.js b/core-blocks/image/index.js index 361aee8b548e21..f5c5f62d47d3c2 100644 --- a/core-blocks/image/index.js +++ b/core-blocks/image/index.js @@ -93,7 +93,7 @@ const schema = { export const settings = { title: __( 'Image' ), - description: __( 'They\'re worth 1,000 words! Insert a single image.' ), + description: __( "They're worth 1,000 words! Insert a single image." ), icon: 'format-image', diff --git a/core-blocks/more/index.js b/core-blocks/more/index.js index c62c7e220a96e9..3ac3ebb4b4679c 100644 --- a/core-blocks/more/index.js +++ b/core-blocks/more/index.js @@ -20,7 +20,7 @@ export const name = 'core/more'; export const settings = { title: __( 'More' ), - description: __( 'Want to show only part of this post on your blog\'s home page? Insert a "More" block where you want the split.' ), + description: __( `Want to show only part of this post on your blog's home page? Insert a "More" block where you want the split.` ), icon: 'editor-insertmore', diff --git a/core-blocks/subhead/index.js b/core-blocks/subhead/index.js index 6486ac14fe16d5..8884db372a14ad 100644 --- a/core-blocks/subhead/index.js +++ b/core-blocks/subhead/index.js @@ -21,7 +21,7 @@ export const name = 'core/subhead'; export const settings = { title: __( 'Subheading' ), - description: __( 'What\'s a subhead? Smaller than a headline, bigger than basic text.' ), + description: __( "What's a subhead? Smaller than a headline, bigger than basic text." ), icon: 'text', diff --git a/core-blocks/test/full-content.js b/core-blocks/test/full-content.js index 66155153cf99f3..63687cbe62731c 100644 --- a/core-blocks/test/full-content.js +++ b/core-blocks/test/full-content.js @@ -146,7 +146,7 @@ describe( 'full post content fixture', () => { ).toEqual( parserOutputExpected ); } catch ( err ) { throw new Error( format( - 'File \'%s.parsed.json\' does not match expected value:\n\n%s', + "File '%s.parsed.json' does not match expected value:\n\n%s", f, err.message ) ); @@ -188,7 +188,7 @@ describe( 'full post content fixture', () => { ).toEqual( blocksExpected ); } catch ( err ) { throw new Error( format( - 'File \'%s.json\' does not match expected value:\n\n%s', + "File '%s.json' does not match expected value:\n\n%s", f, err.message ) ); @@ -214,7 +214,7 @@ describe( 'full post content fixture', () => { expect( serializedActual ).toEqual( serializedExpected ); } catch ( err ) { throw new Error( format( - 'File \'%s.serialized.html\' does not match expected value:\n\n%s', + "File '%s.serialized.html' does not match expected value:\n\n%s", f, err.message ) ); @@ -253,7 +253,7 @@ describe( 'full post content fixture', () => { if ( ! foundFixtures.length ) { errors.push( format( - 'Expected a fixture file called \'%s.html\' or \'%s__*.html\'.', + "Expected a fixture file called '%s.html' or '%s__*.html'.", nameToFilename, nameToFilename ) ); @@ -262,7 +262,7 @@ describe( 'full post content fixture', () => { foundFixtures.forEach( ( fixture ) => { if ( name !== fixture.firstBlock ) { errors.push( format( - 'Expected fixture file \'%s\' to test the \'%s\' block.', + "Expected fixture file '%s' to test the '%s' block.", fixture.filename, name ) ); diff --git a/editor/components/autocompleters/test/block.js b/editor/components/autocompleters/test/block.js index 379433adf858fc..d5dd74d2a5b052 100644 --- a/editor/components/autocompleters/test/block.js +++ b/editor/components/autocompleters/test/block.js @@ -82,7 +82,7 @@ describe( 'block', () => { expect( labelComponents.at( 1 ).text() ).toBe( 'expected-text' ); } ); - it( 'should derive isOptionDisabled from the item\'s isDisabled', () => { + it( "should derive isOptionDisabled from the item's isDisabled", () => { const disabledInserterItem = { name: 'core/foo', title: 'foo', diff --git a/editor/components/block-settings-menu/test/block-mode-toggle.js b/editor/components/block-settings-menu/test/block-mode-toggle.js index 203c059ac8f342..026f03c528dd92 100644 --- a/editor/components/block-settings-menu/test/block-mode-toggle.js +++ b/editor/components/block-settings-menu/test/block-mode-toggle.js @@ -9,7 +9,7 @@ import { shallow } from 'enzyme'; import { BlockModeToggle } from '../block-mode-toggle'; describe( 'BlockModeToggle', () => { - it( 'should not render the HTML mode button if the block doesn\'t support it', () => { + it( "should not render the HTML mode button if the block doesn't support it", () => { const wrapper = shallow( ); diff --git a/editor/components/post-author/test/check.js b/editor/components/post-author/test/check.js index 93f6bf1b5b55ca..891068ef12c52c 100644 --- a/editor/components/post-author/test/check.js +++ b/editor/components/post-author/test/check.js @@ -49,7 +49,7 @@ describe( 'PostAuthorCheck', () => { expect( wrapper.type() ).toBe( null ); } ); - it( 'should not render anything if doesn\'t have author action', () => { + it( "should not render anything if doesn't have author action", () => { const wrapper = shallow( authors @@ -58,7 +58,7 @@ describe( 'PostAuthorCheck', () => { expect( wrapper.type() ).toBe( null ); } ); - it( 'should render control', () => { + it( 'should render control', () => { const wrapper = shallow( authors diff --git a/editor/components/post-pending-status/test/check.js b/editor/components/post-pending-status/test/check.js index af28ca98036e54..b26eebb7331be2 100644 --- a/editor/components/post-pending-status/test/check.js +++ b/editor/components/post-pending-status/test/check.js @@ -9,7 +9,7 @@ import { shallow } from 'enzyme'; import { PostPendingStatusCheck } from '../check'; describe( 'PostPendingStatusCheck', () => { - it( 'should not render anything if the user doesn\'t have the right capabilities', () => { + it( "should not render anything if the user doesn't have the right capabilities", () => { const wrapper = shallow( status diff --git a/editor/components/post-publish-panel/postpublish.js b/editor/components/post-publish-panel/postpublish.js index f8c5591be5689c..47650af43e0860 100644 --- a/editor/components/post-publish-panel/postpublish.js +++ b/editor/components/post-publish-panel/postpublish.js @@ -56,7 +56,7 @@ class PostPublishPanelPostpublish extends Component { __( 'is now live.' ); const postPublishBodyText = isScheduled ? __( 'The post address will be:' ) : - __( 'What\'s next?' ); + __( "What's next?" ); return (
diff --git a/editor/components/post-publish-panel/prepublish.js b/editor/components/post-publish-panel/prepublish.js index 8a26baf66c3d20..2340fd2c6bdfc4 100644 --- a/editor/components/post-publish-panel/prepublish.js +++ b/editor/components/post-publish-panel/prepublish.js @@ -26,7 +26,7 @@ function PostPublishPanelPrepublish( { return (
{ hasPublishAction ? __( 'Are you ready to publish?' ) : __( 'Are you ready to submit for review?' ) }
-

{ hasPublishAction ? __( 'Here, you can do a last-minute check up of your settings below, before you publish.' ) : __( 'When you\'re ready, submit your work for review, and an Editor will be able to approve it for you.' ) }

+

{ hasPublishAction ? __( 'Here, you can do a last-minute check up of your settings below, before you publish.' ) : __( "When you're ready, submit your work for review, and an Editor will be able to approve it for you." ) }

{ hasPublishAction && ( { - it( 'should not render anything if the user doesn\'t have the right capabilities', () => { + it( "should not render anything if the user doesn't have the right capabilities", () => { const wrapper = shallow( yes ); expect( wrapper.type() ).toBe( null ); } ); diff --git a/editor/components/post-sticky/test/index.js b/editor/components/post-sticky/test/index.js index 716b48b13f14d1..ca6440734a152f 100644 --- a/editor/components/post-sticky/test/index.js +++ b/editor/components/post-sticky/test/index.js @@ -18,7 +18,7 @@ describe( 'PostSticky', () => { expect( wrapper.type() ).toBe( null ); } ); - it( 'should not render anything if post doesn\'t support stickying', () => { + it( "should not render anything if post doesn't support stickying", () => { const wrapper = shallow( Can Toggle Sticky diff --git a/editor/components/post-visibility/test/check.js b/editor/components/post-visibility/test/check.js index d719680f0bdcda..c64e73f6631637 100644 --- a/editor/components/post-visibility/test/check.js +++ b/editor/components/post-visibility/test/check.js @@ -11,7 +11,7 @@ import { PostVisibilityCheck } from '../check'; describe( 'PostVisibilityCheck', () => { const render = ( { canEdit } ) => ( canEdit ? 'yes' : 'no' ); - it( 'should not render the edit link if the user doesn\'t have the right capability', () => { + it( "should not render the edit link if the user doesn't have the right capability", () => { const wrapper = shallow( ); expect( wrapper.text() ).toBe( 'no' ); } ); diff --git a/editor/components/template-validation-notice/index.js b/editor/components/template-validation-notice/index.js index 39cc0c1aacfba0..1eca4c07b2ecc2 100644 --- a/editor/components/template-validation-notice/index.js +++ b/editor/components/template-validation-notice/index.js @@ -25,7 +25,7 @@ function TemplateValidationNotice( { isValid, ...props } ) { return ( -

{ __( 'The content of your post doesn\'t match the template assigned to your post type.' ) }

+

{ __( "The content of your post doesn't match the template assigned to your post type." ) }

diff --git a/editor/components/theme-support-check/test/index.js b/editor/components/theme-support-check/test/index.js index 2514778391141f..0d1d2d9df13a74 100644 --- a/editor/components/theme-support-check/test/index.js +++ b/editor/components/theme-support-check/test/index.js @@ -9,7 +9,7 @@ import { shallow } from 'enzyme'; import { ThemeSupportCheck } from '../index'; describe( 'ThemeSupportCheck', () => { - it( 'should not render if there\'s no support check provided', () => { + it( "should not render if there's no support check provided", () => { const wrapper = shallow( foobar ); expect( wrapper.type() ).toBe( null ); } ); @@ -37,7 +37,7 @@ describe( 'ThemeSupportCheck', () => { expect( wrapper.type() ).not.toBe( null ); } ); - it( 'should not render if post-thumbnails aren\'t supported for the post type', () => { + it( "should not render if post-thumbnails aren't supported for the post type", () => { const themeSupports = { 'post-thumbnails': [ 'post' ], }; @@ -61,7 +61,7 @@ describe( 'ThemeSupportCheck', () => { expect( wrapper.type() ).toBe( null ); } ); - it( 'should not render if theme doesn\'t support post-thumbnails', () => { + it( "should not render if theme doesn't support post-thumbnails", () => { const themeSupports = { 'post-thumbnails': false, }; diff --git a/editor/store/test/reducer.js b/editor/store/test/reducer.js index bb2c7234ed2c61..36cb0a35ec7902 100644 --- a/editor/store/test/reducer.js +++ b/editor/store/test/reducer.js @@ -1968,7 +1968,7 @@ describe( 'state', () => { } ); } ); - it( 'should update the shared block\'s id if it was temporary', () => { + it( "should update the shared block's id if it was temporary", () => { const initialState = { data: { shared1: { clientId: '', title: '' }, diff --git a/editor/store/test/selectors.js b/editor/store/test/selectors.js index fb411be0b04f2f..03ebca1917a9d3 100644 --- a/editor/store/test/selectors.js +++ b/editor/store/test/selectors.js @@ -395,7 +395,7 @@ describe( 'selectors', () => { } ); describe( 'getEditedPostAttribute', () => { - it( 'should return the current post\'s slug if no edits have been made', () => { + it( "should return the current post's slug if no edits have been made", () => { const state = { currentPost: { slug: 'post slug' }, editor: { @@ -3870,7 +3870,7 @@ describe( 'selectors', () => { } ); } ); - it( 'should return undefined if settings for the block don\'t exist', () => { + it( "should return undefined if settings for the block don't exist", () => { const state = { blockListSettings: {}, }; diff --git a/packages/api-fetch/src/middlewares/test/http-v1.js b/packages/api-fetch/src/middlewares/test/http-v1.js index 00873ad83756c1..c0f993f86f5557 100644 --- a/packages/api-fetch/src/middlewares/test/http-v1.js +++ b/packages/api-fetch/src/middlewares/test/http-v1.js @@ -15,7 +15,7 @@ describe( 'HTTP v1 Middleware', () => { httpV1Middleware( { method: 'PUT', data: {} }, callback ); } ); - it( 'shouldn\'t touch the options for GET requests', () => { + it( "shouldn't touch the options for GET requests", () => { expect.hasAssertions(); const requestOptions = { method: 'GET', path: '/wp/v2/posts' }; diff --git a/packages/blocks/src/api/test/parser.js b/packages/blocks/src/api/test/parser.js index 0b811b9d9a279b..6759d63e4e9aca 100644 --- a/packages/blocks/src/api/test/parser.js +++ b/packages/blocks/src/api/test/parser.js @@ -137,7 +137,7 @@ describe( 'block parser', () => { } ); describe( 'parseWithAttributeSchema', () => { - it( 'should return the matcher\'s attribute value', () => { + it( "should return the matcher's attribute value", () => { const value = parseWithAttributeSchema( '
chicken
', { @@ -216,7 +216,7 @@ describe( 'block parser', () => { expect( value ).toBe( 10 ); } ); - it( 'should return the matcher\'s attribute value', () => { + it( "should return the matcher's attribute value", () => { const value = getBlockAttribute( 'content', { @@ -571,7 +571,7 @@ describe( 'block parser', () => { } ); const parsed = parse( - '' + + `` + 'Brisket' + '' ); @@ -582,7 +582,7 @@ describe( 'block parser', () => { content: 'Brisket', smoked: 'yes', url: 'http://google.com', - chicken: 'ribs & \'wings\'', + chicken: "ribs & 'wings'", } ); expect( typeof parsed[ 0 ].clientId ).toBe( 'string' ); } ); diff --git a/packages/blocks/src/api/test/serializer.js b/packages/blocks/src/api/test/serializer.js index 09af0f11f7a6b5..994868cb19f4c0 100644 --- a/packages/blocks/src/api/test/serializer.js +++ b/packages/blocks/src/api/test/serializer.js @@ -291,7 +291,7 @@ describe( 'block serializer', () => { } ); describe( 'getBlockContent', () => { - it( 'should return the block\'s serialized inner HTML', () => { + it( "should return the block's serialized inner HTML", () => { const blockType = { attributes: { content: { diff --git a/packages/blocks/src/api/test/templates.js b/packages/blocks/src/api/test/templates.js index 6e16dd61b18c51..12730f75197eb9 100644 --- a/packages/blocks/src/api/test/templates.js +++ b/packages/blocks/src/api/test/templates.js @@ -73,7 +73,7 @@ describe( 'templates', () => { expect( doBlocksMatchTemplate( blockList, template ) ).toBe( true ); } ); - it( 'return false if the template length doesn\'t match the blocks length', () => { + it( "return false if the template length doesn't match the blocks length", () => { const template = [ [ 'core/test-block' ], [ 'core/test-block-2' ], @@ -86,7 +86,7 @@ describe( 'templates', () => { expect( doBlocksMatchTemplate( blockList, template ) ).toBe( false ); } ); - it( 'return false if the nested template doesn\'t match the blocks', () => { + it( "return false if the nested template doesn't match the blocks", () => { const template = [ [ 'core/test-block' ], [ 'core/test-block-2', {}, [ diff --git a/packages/blocks/src/api/test/validation.js b/packages/blocks/src/api/test/validation.js index 9e12c4d64cdd6d..8f7df89255a2fe 100644 --- a/packages/blocks/src/api/test/validation.js +++ b/packages/blocks/src/api/test/validation.js @@ -177,7 +177,7 @@ describe( 'validation', () => { it( 'returns true if the same style', () => { const isEqual = isEqualAttributesOfName.style( 'background-image: url( "https://wordpress.org/img.png" ); color: red;', - 'color: red; background-image: url(\'https://wordpress.org/img.png\n);' + "color: red; background-image: url('https://wordpress.org/img.png\n);" ); expect( isEqual ).toBe( true ); @@ -186,7 +186,7 @@ describe( 'validation', () => { it( 'returns false if not same style', () => { const isEqual = isEqualAttributesOfName.style( 'background-image: url( "https://wordpress.org/img.png" ); color: red;', - 'color: red; font-size: 13px; background-image: url(\'https://wordpress.org/img.png\');' + "color: red; font-size: 13px; background-image: url('https://wordpress.org/img.png');" ); expect( isEqual ).toBe( false ); diff --git a/packages/components/src/autocomplete/test/index.js b/packages/components/src/autocomplete/test/index.js index 6af237d3403c00..6263bed441c5c3 100644 --- a/packages/components/src/autocomplete/test/index.js +++ b/packages/components/src/autocomplete/test/index.js @@ -723,7 +723,7 @@ describe( 'Autocomplete', () => { } ); } ); - it( 'doesn\'t otherwise interfere with keydown behavior', ( done ) => { + it( "doesn't otherwise interfere with keydown behavior", ( done ) => { const wrapper = makeAutocompleter( [ slashCompleter ] ); // listen to keydown events on the editor to see if it gets them const editorKeydown = jest.fn(); diff --git a/packages/components/src/disabled/test/index.js b/packages/components/src/disabled/test/index.js index 647af5d30d1c7d..36fdf3a85524de 100644 --- a/packages/components/src/disabled/test/index.js +++ b/packages/components/src/disabled/test/index.js @@ -122,13 +122,13 @@ describe( 'Disabled', () => { } } - test( 'lets components know that they\'re disabled via context', () => { + test( "lets components know that they're disabled via context", () => { const wrapper = TestUtils.renderIntoDocument( ); const wrapperElement = TestUtils.findRenderedDOMComponentWithTag( wrapper, 'p' ); expect( wrapperElement.textContent ).toBe( 'Disabled' ); } ); - test( 'lets components know that they\'re not disabled via context', () => { + test( "lets components know that they're not disabled via context", () => { const wrapper = TestUtils.renderIntoDocument( ); const wrapperElement = TestUtils.findRenderedDOMComponentWithTag( wrapper, 'p' ); expect( wrapperElement.textContent ).toBe( 'Not disabled' ); diff --git a/packages/components/src/popover/test/utils.js b/packages/components/src/popover/test/utils.js index aaf9a0ecd621b2..0ea5844f06f597 100644 --- a/packages/components/src/popover/test/utils.js +++ b/packages/components/src/popover/test/utils.js @@ -8,7 +8,7 @@ import { } from '../utils'; describe( 'computePopoverYAxisPosition', () => { - it( 'should leave the position as is there\'s enought space', () => { + it( "should leave the position as is there's enought space", () => { const anchorRect = { top: 10, left: 10, @@ -30,7 +30,7 @@ describe( 'computePopoverYAxisPosition', () => { } ); } ); - it( 'should switch to bottom position if there\'s not enough space', () => { + it( "should switch to bottom position if there's not enough space", () => { const anchorRect = { top: 10, left: 10, @@ -52,7 +52,7 @@ describe( 'computePopoverYAxisPosition', () => { } ); } ); - it( 'should set a maxHeight if there\'s not enough space in any direction', () => { + it( "should set a maxHeight if there's not enough space in any direction", () => { const anchorRect = { top: 400, left: 10, @@ -98,7 +98,7 @@ describe( 'computePopoverYAxisPosition', () => { } ); describe( 'computePopoverXAxisPosition', () => { - it( 'should leave the position as is there\'s enought space', () => { + it( "should leave the position as is there's enought space", () => { const anchorRect = { top: 10, left: 10, @@ -120,7 +120,7 @@ describe( 'computePopoverXAxisPosition', () => { } ); } ); - it( 'should switch to right position if there\'s not enough space', () => { + it( "should switch to right position if there's not enough space", () => { const anchorRect = { top: 10, left: 10, @@ -142,7 +142,7 @@ describe( 'computePopoverXAxisPosition', () => { } ); } ); - it( 'should set a maxWidth if there\'s not enough space in any direction', () => { + it( "should set a maxWidth if there's not enough space in any direction", () => { const anchorRect = { top: 10, left: 400, @@ -166,7 +166,7 @@ describe( 'computePopoverXAxisPosition', () => { } ); describe( 'computePopoverPosition', () => { - it( 'should leave the position as is there\'s enought space', () => { + it( "should leave the position as is there's enought space", () => { const anchorRect = { top: 10, left: 10, diff --git a/packages/components/src/slot-fill/test/slot.js b/packages/components/src/slot-fill/test/slot.js index 85cbf09141eb5a..59b8b8bb7523b1 100644 --- a/packages/components/src/slot-fill/test/slot.js +++ b/packages/components/src/slot-fill/test/slot.js @@ -83,7 +83,7 @@ describe( 'Slot', () => { expect( element.find( 'Slot > div' ).html() ).toBe( '
text
' ); } ); - it( 'calls the functions passed as the Slot\'s fillProps in the Fill', () => { + it( "calls the functions passed as the Slot's fillProps in the Fill", () => { const onClose = jest.fn(); const element = mount( diff --git a/packages/core-data/src/test/entities.js b/packages/core-data/src/test/entities.js index 5b017692575f26..5facfb37b6f432 100644 --- a/packages/core-data/src/test/entities.js +++ b/packages/core-data/src/test/entities.js @@ -59,7 +59,7 @@ describe( 'getKindEntities', () => { } ); } ); - it( 'shouldn\'t do anything if the entities have already been resolved', async () => { + it( "shouldn't do anything if the entities have already been resolved", async () => { const state = { entities: { config: [ { kind: 'postType' } ] }, }; @@ -68,7 +68,7 @@ describe( 'getKindEntities', () => { expect( done ).toBe( true ); } ); - it( 'shouldn\'t do anything if there no defined kind config', async () => { + it( "shouldn't do anything if there no defined kind config", async () => { const state = { entities: { config: [] } }; const fulfillment = getKindEntities( state, 'unknownKind' ); const done = ( await fulfillment.next() ).done; diff --git a/packages/core-data/src/test/selectors.js b/packages/core-data/src/test/selectors.js index 314ccc385b89df..bb6e17b745b0d0 100644 --- a/packages/core-data/src/test/selectors.js +++ b/packages/core-data/src/test/selectors.js @@ -67,7 +67,7 @@ describe( 'isRequestingCategories()', () => { } ); describe( 'getEntityRecord', () => { - it( 'should return undefined for unknown record\'s key', () => { + it( "should return undefined for unknown record's key", () => { const state = deepFreeze( { entities: { data: { diff --git a/packages/dom/src/test/dom.js b/packages/dom/src/test/dom.js index 9f3bc16db01def..91ab71fed896ea 100644 --- a/packages/dom/src/test/dom.js +++ b/packages/dom/src/test/dom.js @@ -46,7 +46,7 @@ describe( 'DOM', () => { expect( isHorizontalEdge( input, false ) ).toBe( false ); } ); - it( 'Should return false if we\'re not at the edge', () => { + it( "Should return false if we're not at the edge", () => { const input = document.createElement( 'input' ); parent.appendChild( input ); input.value = 'value'; diff --git a/post-content.js b/post-content.js index 3009968bdd9566..248db1cad58d89 100644 --- a/post-content.js +++ b/post-content.js @@ -10,7 +10,7 @@ window._wpGutenbergDefaultPost = { '', '', - '

The goal of this new editor is to make adding rich content to WordPress simple and enjoyable. This whole post is composed of pieces of content—somewhat similar to LEGO bricks—that you can move around and interact with. Move your cursor around and you\'ll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting.

', + "

The goal of this new editor is to make adding rich content to WordPress simple and enjoyable. This whole post is composed of pieces of content—somewhat similar to LEGO bricks—that you can move around and interact with. Move your cursor around and you'll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting.

", '', '', @@ -30,15 +30,15 @@ window._wpGutenbergDefaultPost = { '', '', - '

Handling images and media with the utmost care is a primary focus of the new editor. Hopefully, you\'ll find aspects of adding captions or going full-width with your pictures much easier and robust than before.

', + "

Handling images and media with the utmost care is a primary focus of the new editor. Hopefully, you'll find aspects of adding captions or going full-width with your pictures much easier and robust than before.

", '', '', - '
Beautiful landscape
If your theme supports it, you\'ll see the "wide" button on the image toolbar. Give it a try.
', + `
Beautiful landscape
If your theme supports it, you'll see the "wide" button on the image toolbar. Give it a try.
`, '', '', - '

Try selecting and removing or editing the caption, now you don\'t have to be careful about selecting the image or other text by mistake and ruining the presentation.

', + "

Try selecting and removing or editing the caption, now you don't have to be careful about selecting the image or other text by mistake and ruining the presentation.

", '', '', @@ -46,11 +46,11 @@ window._wpGutenbergDefaultPost = { '', '', - '

Imagine everything that WordPress can do is available to you quickly and in the same place on the interface. No need to figure out HTML tags, classes, or remember complicated shortcode syntax. That\'s the spirit behind the inserter—the (+) button you\'ll see around the editor—which allows you to browse all available content blocks and add them into your post. Plugins and themes are able to register their own, opening up all sort of possibilities for rich editing and publishing.

', + "

Imagine everything that WordPress can do is available to you quickly and in the same place on the interface. No need to figure out HTML tags, classes, or remember complicated shortcode syntax. That's the spirit behind the inserter—the (+) button you'll see around the editor—which allows you to browse all available content blocks and add them into your post. Plugins and themes are able to register their own, opening up all sort of possibilities for rich editing and publishing.

", '', '', - '

Go give it a try, you may discover things WordPress can already add into your posts that you didn\'t know about. Here\'s a short list of what you can currently find there:

', + "

Go give it a try, you may discover things WordPress can already add into your posts that you didn't know about. Here's a short list of what you can currently find there:

", '', '', @@ -74,7 +74,7 @@ window._wpGutenbergDefaultPost = { '', '', - '

The information corresponding to the source of the quote is a separate text field, similar to captions under images, so the structure of the quote is protected even if you select, modify, or remove the source. It\'s always easy to add it back.

', + "

The information corresponding to the source of the quote is a separate text field, similar to captions under images, so the structure of the quote is protected even if you select, modify, or remove the source. It's always easy to add it back.

", '', '', @@ -102,7 +102,7 @@ window._wpGutenbergDefaultPost = { '', '', - '
Accessibility is important don\'t forget image alt attribute
', + `
Accessibility is important don't forget image alt attribute
`, '', '', @@ -117,7 +117,7 @@ window._wpGutenbergDefaultPost = { '', '', - '

The above is a gallery with just two images. It\'s an easier way to create visually appealing layouts, without having to deal with floats. You can also easily convert the gallery back to individual images again, by using the block switcher.

', + "

The above is a gallery with just two images. It's an easier way to create visually appealing layouts, without having to deal with floats. You can also easily convert the gallery back to individual images again, by using the block switcher.

", '', '', @@ -129,7 +129,7 @@ window._wpGutenbergDefaultPost = { '', '', - '

You can build any block you like, static or dynamic, decorative or plain. Here\'s a pullquote block:

', + "

You can build any block you like, static or dynamic, decorative or plain. Here's a pullquote block:

", '', '', diff --git a/test/e2e/specs/adding-blocks.test.js b/test/e2e/specs/adding-blocks.test.js index e6b74f4fd58c67..ed35a2bbd2122d 100644 --- a/test/e2e/specs/adding-blocks.test.js +++ b/test/e2e/specs/adding-blocks.test.js @@ -90,7 +90,7 @@ describe( 'adding blocks', () => { // Switch to Text Mode to check HTML Output await page.click( '.edit-post-more-menu [aria-label="More"]' ); - const codeEditorButton = ( await page.$x( '//button[contains(text(), \'Code Editor\')]' ) )[ 0 ]; + const codeEditorButton = ( await page.$x( "//button[contains(text(), 'Code Editor')]" ) )[ 0 ]; await codeEditorButton.click( 'button' ); expect( await getEditedPostContent() ).toMatchSnapshot(); diff --git a/test/e2e/specs/change-detection.test.js b/test/e2e/specs/change-detection.test.js index 8db99f779d6f75..60f24b6e39ae99 100644 --- a/test/e2e/specs/change-detection.test.js +++ b/test/e2e/specs/change-detection.test.js @@ -192,7 +192,7 @@ describe( 'Change detection', () => { pressWithModifier( 'Mod', 'S' ), // Ensure save update fails and presents button. - page.waitForXPath( '//p[contains(text(), \'Updating failed\')]' ), + page.waitForXPath( "//p[contains(text(), 'Updating failed')]" ), page.waitForSelector( '.editor-post-save-draft' ), ] ); diff --git a/test/e2e/specs/managing-links.test.js b/test/e2e/specs/managing-links.test.js index 3c68fa79e9ee6f..8d5f258db52dd6 100644 --- a/test/e2e/specs/managing-links.test.js +++ b/test/e2e/specs/managing-links.test.js @@ -12,7 +12,7 @@ describe( 'Managing links', () => { const setFixedToolbar = async ( b ) => { await page.click( '.edit-post-more-menu button' ); - const button = ( await page.$x( '//button[contains(text(), \'Fix Toolbar to Top\')]' ) )[ 0 ]; + const button = ( await page.$x( "//button[contains(text(), 'Fix Toolbar to Top')]" ) )[ 0 ]; const buttonClassNameProperty = await button.getProperty( 'className' ); const buttonClassName = await buttonClassNameProperty.jsonValue(); const isSelected = buttonClassName.indexOf( 'is-selected' ) !== -1; diff --git a/test/e2e/specs/nux.test.js b/test/e2e/specs/nux.test.js index 1e908e4d77ae14..0fbe0b5a01b360 100644 --- a/test/e2e/specs/nux.test.js +++ b/test/e2e/specs/nux.test.js @@ -48,7 +48,7 @@ describe( 'New User Experience (NUX)', () => { const firstTipText = await page.$eval( '.nux-dot-tip', ( element ) => element.innerText ); expect( firstTipText ).toContain( 'Welcome to the wonderful world of blocks!' ); - const [ nextTipButton ] = await page.$x( '//button[contains(text(), \'See next tip\')]' ); + const [ nextTipButton ] = await page.$x( "//button[contains(text(), 'See next tip')]" ); await nextTipButton.click(); const secondTipText = await page.$eval( '.nux-dot-tip', ( element ) => element.innerText );