Skip to content

Commit

Permalink
Rename Link E2E tests
Browse files Browse the repository at this point in the history
Renames managing-links → links and makes the test descriptions read like
English sentences.
  • Loading branch information
noisysocks committed Aug 20, 2018
1 parent 213b8d1 commit 47d0bd8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -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`] = `
"<!-- wp:paragraph -->
<p>This is <a href=\\"https://wordpress.org/gutenberg\\">Gutenberg</a></p>
<!-- /wp:paragraph -->"
`;
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`] = `
"<!-- wp:paragraph -->
<p>This is <a href=\\"https://wordpress.org/gutenberg\\">Gutenberg</a></p>
<!-- /wp:paragraph -->"
`;
exports[`Managing links Creating a link without any text selected 1`] = `
exports[`Links can be created without any text selected 1`] = `
"<!-- wp:paragraph -->
<p>This is Gutenberg: <a href=\\"https://wordpress.org/gutenberg\\">https://wordpress.org/gutenberg</a></p>
<!-- /wp:paragraph -->"
`;
exports[`Managing links Editing a link 1`] = `
exports[`Links can be edited 1`] = `
"<!-- wp:paragraph -->
<p>This is <a href=\\"https://wordpress.org/gutenberg/handbook\\">Gutenberg</a></p>
<!-- /wp:paragraph -->"
`;
exports[`Managing links Removing a link 1`] = `
exports[`Links can be removed 1`] = `
"<!-- wp:paragraph -->
<p>This is Gutenberg</p>
<!-- /wp:paragraph -->"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand All @@ -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' );
Expand All @@ -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: ' );
Expand All @@ -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' );
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit 47d0bd8

Please sign in to comment.