From 543da2fed7dd1a42d615909df325002030ce09c2 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Fri, 17 Aug 2018 10:01:21 +1000 Subject: [PATCH] Rename Link E2E tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Renames managing-links → links and makes the test descriptions read like English sentences. --- ...g-links.test.js.snap => links.test.js.snap} | 10 +++++----- .../{managing-links.test.js => links.test.js} | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) rename test/e2e/specs/__snapshots__/{managing-links.test.js.snap => links.test.js.snap} (65%) rename test/e2e/specs/{managing-links.test.js => links.test.js} (91%) diff --git a/test/e2e/specs/__snapshots__/managing-links.test.js.snap b/test/e2e/specs/__snapshots__/links.test.js.snap similarity index 65% rename from test/e2e/specs/__snapshots__/managing-links.test.js.snap rename to test/e2e/specs/__snapshots__/links.test.js.snap index 066c28ab4a5db..3bb19928ccb62 100644 --- a/test/e2e/specs/__snapshots__/managing-links.test.js.snap +++ b/test/e2e/specs/__snapshots__/links.test.js.snap @@ -1,30 +1,30 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Managing links Creating a link by selecting text and clicking the Link UI 1`] = ` +exports[`Links can be created by selecting text and clicking Link 1`] = ` "

This is Gutenberg

" `; -exports[`Managing links Creating a link by selecting text and using keyboard shortcuts 1`] = ` +exports[`Links can be created by selecting text and using keyboard shortcuts 1`] = ` "

This is Gutenberg

" `; -exports[`Managing links Creating a link without any text selected 1`] = ` +exports[`Links can be created without any text selected 1`] = ` "

This is Gutenberg: https://wordpress.org/gutenberg

" `; -exports[`Managing links Editing a link 1`] = ` +exports[`Links can be edited 1`] = ` "

This is Gutenberg

" `; -exports[`Managing links Removing a link 1`] = ` +exports[`Links can be removed 1`] = ` "

This is Gutenberg

" diff --git a/test/e2e/specs/managing-links.test.js b/test/e2e/specs/links.test.js similarity index 91% rename from test/e2e/specs/managing-links.test.js rename to test/e2e/specs/links.test.js index ead98f31ba2d1..ece6bda4413a3 100644 --- a/test/e2e/specs/managing-links.test.js +++ b/test/e2e/specs/links.test.js @@ -16,12 +16,12 @@ import { */ const SELECT_WORD_MODIFIER_KEYS = process.platform === 'darwin' ? [ 'Shift', 'Alt' ] : [ 'Shift', 'Control' ]; -describe( 'Managing links', () => { +describe( 'Links', () => { beforeEach( async () => { await newPost(); } ); - it( 'Creating a link by selecting text and clicking the Link UI', async () => { + it( 'can be created by selecting text and clicking Link', async () => { // Create a block with some text await clickBlockAppender(); await page.keyboard.type( 'This is Gutenberg' ); @@ -48,7 +48,7 @@ describe( 'Managing links', () => { expect( await getEditedPostContent() ).toMatchSnapshot(); } ); - it( 'Creating a link by selecting text and using keyboard shortcuts', async () => { + it( 'can be created by selecting text and using keyboard shortcuts', async () => { // Create a block with some text await clickBlockAppender(); await page.keyboard.type( 'This is Gutenberg' ); @@ -75,7 +75,7 @@ describe( 'Managing links', () => { expect( await getEditedPostContent() ).toMatchSnapshot(); } ); - it( 'Creating a link without any text selected', async () => { + it( 'can be created without any text selected', async () => { // Create a block with some text await clickBlockAppender(); await page.keyboard.type( 'This is Gutenberg: ' ); @@ -100,7 +100,7 @@ describe( 'Managing links', () => { expect( await getEditedPostContent() ).toMatchSnapshot(); } ); - it( 'Creating a link and then cancelling', async () => { + it( 'is not created when we click away from the link input', async () => { // Create a block with some text await clickBlockAppender(); await page.keyboard.type( 'This is Gutenberg' ); @@ -148,7 +148,7 @@ describe( 'Managing links', () => { await page.click( 'a[href="https://wordpress.org/gutenberg"]' ); }; - it( 'Editing a link', async () => { + it( 'can be edited', async () => { await createAndReselectLink(); // Click on the Edit button @@ -164,7 +164,7 @@ describe( 'Managing links', () => { expect( await getEditedPostContent() ).toMatchSnapshot(); } ); - it( 'Removing a link', async () => { + it( 'can be removed', async () => { await createAndReselectLink(); // Click on the Unlink button @@ -187,7 +187,7 @@ describe( 'Managing links', () => { } }; - it( 'Pressing Left and Esc in Link Dialog in "Fixed to Toolbar" mode', async () => { + it( 'allows Left to be pressed during creation in "Fixed to Toolbar" mode', async () => { await setFixedToolbar( true ); await clickBlockAppender(); @@ -205,7 +205,7 @@ describe( 'Managing links', () => { expect( modal ).toBeNull(); } ); - it( 'Pressing Left and Esc in Link Dialog in "Docked Toolbar" mode', async () => { + it( 'allows Left to be pressed during creation in "Docked Toolbar" mode', async () => { await setFixedToolbar( false ); await clickBlockAppender();