Skip to content

Commit

Permalink
Change e2e selectors.
Browse files Browse the repository at this point in the history
  • Loading branch information
tellthemachines committed Sep 27, 2019
1 parent 9fbbc25 commit f5da04e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/e2e-tests/specs/editor-modes.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe( 'Editing modes (visual/HTML)', () => {
expect( htmlBlockContent ).toEqual( '<p>Hello world!</p>' );

// Change the font size using the sidebar.
await page.select( '.components-font-size-picker__select .components-select-control__input', 'large' );
await page.select( '.components-font-size-picker__select-selector', 'large' );

// Make sure the HTML content updated.
htmlBlockContent = await page.$eval( '.block-editor-block-list__layout .block-editor-block-list__block .block-editor-block-list__block-html-textarea', ( node ) => node.textContent );
Expand Down
6 changes: 3 additions & 3 deletions packages/e2e-tests/specs/font-size-picker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe( 'Font Size Picker', () => {
// Create a paragraph block with some content.
await clickBlockAppender();
await page.keyboard.type( 'Paragraph to be made "large"' );
await page.select( '.components-font-size-picker__select .components-select-control__input', 'large' );
await page.select( '.components-font-size-picker__select-selector', 'large' );

// Ensure content matches snapshot.
const content = await getEditedPostContent();
Expand Down Expand Up @@ -56,7 +56,7 @@ describe( 'Font Size Picker', () => {
await clickBlockAppender();
await page.keyboard.type( 'Paragraph with font size reset using button' );

await page.select( '.components-font-size-picker__select .components-select-control__input', 'normal' );
await page.select( '.components-font-size-picker__select-selector', 'normal' );

const resetButton = ( await page.$x( '//*[contains(concat(" ", @class, " "), " components-font-size-picker__controls ")]//*[text()=\'Reset\']' ) )[ 0 ];
await resetButton.click();
Expand All @@ -71,7 +71,7 @@ describe( 'Font Size Picker', () => {
await clickBlockAppender();
await page.keyboard.type( 'Paragraph with font size reset using input field' );

await page.select( '.components-font-size-picker__select .components-select-control__input', 'large' );
await page.select( '.components-font-size-picker__select-selector', 'large' );

// Clear the custom font size input.
await page.click( '.blocks-font-size .components-range-control__number' );
Expand Down

0 comments on commit f5da04e

Please sign in to comment.