Skip to content

Commit

Permalink
e2e: Update Gutenberg classes for 8.5 compat (#44457)
Browse files Browse the repository at this point in the history
* Change selector to match updated classes

See WordPress/gutenberg#22390
See WordPress/gutenberg@e318033

* Use nth-of-type (element has moved)
  • Loading branch information
sirreal authored Jul 27, 2020
1 parent cca0db5 commit 096d475
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/e2e/lib/gutenberg/blocks/contact-form-block-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class ContactFormBlockComponent extends GutenbergBlockComponent {

async insertEmail( email ) {
const emailSelector = By.css(
'.jetpack-contact-form__popover .components-base-control:nth-child(1) .components-text-control__input'
'.jetpack-contact-form__popover .components-base-control:nth-of-type(1) .components-text-control__input'
);
await driverHelper.waitTillPresentAndDisplayed( this.driver, emailSelector );

Expand All @@ -35,7 +35,7 @@ export class ContactFormBlockComponent extends GutenbergBlockComponent {

async insertSubject( subject ) {
const subjectSelector = By.css(
'.jetpack-contact-form__popover .components-base-control:nth-child(2) .components-text-control__input'
'.jetpack-contact-form__popover .components-base-control:nth-of-type(2) .components-text-control__input'
);
await driverHelper.waitTillPresentAndDisplayed( this.driver, subjectSelector );

Expand Down
4 changes: 2 additions & 2 deletions test/e2e/lib/gutenberg/gutenberg-editor-component.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,11 @@ export default class GutenbergEditorComponent extends AsyncBaseContainer {
await driverHelper.waitTillNotPresent( this.driver, this.publishingSpinnerSelector );
await driverHelper.waitTillPresentAndDisplayed(
this.driver,
By.css( '.editor-post-publish-panel__header-published' )
By.css( '.post-publish-panel__postpublish-header' )
);
return await driverHelper.verifyTextPresent(
this.driver,
By.css( '.editor-post-publish-panel__header-published' ),
By.css( '.post-publish-panel__postpublish-header' ),
'Scheduled'
);
}
Expand Down

0 comments on commit 096d475

Please sign in to comment.