Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: Update Gutenberg classes for 8.5 compat #44457

Merged
merged 2 commits into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Copy link
Member

@WunderBart WunderBart Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be set in 8.5.1 anymore:

8.3.0 8.5.1
Screenshot 2020-07-27 15 46 19 Screenshot 2020-07-27 15 45 35

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated selector matches this element. It seems to match "scheduled" in the text.

Screen Shot 2020-07-27 at 19 20 57

It seems like this should work well across versions, but let's see what the tests report.

Copy link
Member

@WunderBart WunderBart Jul 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was previously matching the header selector, but I think it's OK to keep it as a check for that summary text (unless there's a separate test for it?). I'd only make it lowercased scheduled in the test to avoid confusion.

);
}
Expand Down