Skip to content

Commit

Permalink
Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jan 25, 2018
1 parent 1c97fe8 commit a5302b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion editor/components/block-list/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class BlockList extends Component {
if ( nextProps.multiSelectedBlockUids && nextProps.multiSelectedBlockUids.length > 0 ) {
const extent = this.nodes[ nextProps.selectionEnd ];
if ( extent ) {
scrollIntoView( extent, extent.closest( '.editor-layout__content' ), {
scrollIntoView( extent, extent.closest( '.edit-post-layout__content' ), {
onlyScrollIfNeeded: true,
} );
}
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/integration/002-adding-blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ describe( 'Adding blocks', () => {
cy.get( lastBlockSelector ).type( 'Quote block' );

// Using the regular inserter
cy.get( '.editor-header [aria-label="Add block"]' ).click();
cy.get( '.edit-post-header [aria-label="Add block"]' ).click();
cy.get( '[placeholder="Search for a block"]' ).type( 'code' );
cy.get( '.editor-inserter__block' ).contains( 'Code' ).click();
cy.get( '[placeholder="Write code…"]' ).type( 'Code block' );

// Switch to Text Mode to check HTML Output
cy.get( '.editor-ellipsis-menu [aria-label="More"]' ).click();
cy.get( '.edit-post-ellipsis-menu [aria-label="More"]' ).click();
cy.get( 'button' ).contains( 'Code Editor' ).click();

// Assertions
cy.get( '.editor-post-text-editor' )
cy.get( '.edit-post-text-editor' )
.should( 'contain', 'Paragraph block' )
.should( 'contain', 'Quote block' )
.should( 'contain', 'Code block' );
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/integration/004-managing-links.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe( 'Managing links', () => {
const fixedIsOff = 'button:contains("Fix toolbar to block"):not(".is-selected")';

const setFixedToolbar = ( b ) => {
cy.get( '.editor-ellipsis-menu button' ).click();
cy.get( '.edit-post-ellipsis-menu button' ).click();

cy.get( 'body' ).then( ( $body ) => {
const candidate = b ? fixedIsOff : fixedIsOn;
Expand All @@ -16,7 +16,7 @@ describe( 'Managing links', () => {
return 'button:contains("Fix toolbar to block")';
}

return '.editor-ellipsis-menu button';
return '.edit-post-ellipsis-menu button';
} ).then( ( selector ) => {
cy.log( ' selector " + selector ', selector );
cy.get( selector ).click();
Expand Down

0 comments on commit a5302b0

Please sign in to comment.