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

UI Tests for Block Mover #27883

Closed
wants to merge 4 commits into from
Closed

UI Tests for Block Mover #27883

wants to merge 4 commits into from

Conversation

illusaen
Copy link
Contributor

@illusaen illusaen commented Dec 24, 2020

Description

Original issue link: 1191
Gutenberg-mobile link: PR 2930

UI Tests for move to top/bottom block mover functionality.

Types of changes

New feature added.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@illusaen illusaen requested a review from ellatrix as a code owner December 24, 2020 02:39
@gziolo gziolo added [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Dec 24, 2020
Copy link
Member

@ceyhun ceyhun left a comment

Choose a reason for hiding this comment

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

The failing tests don't have video links for some reason on CircleCI so I couldn't watch them. Will try to login to saucelabs.com later to do that instead.

I'm making a few more changes in this PR: #27381

After it is merged, the iteration on this PR could be faster by adding -@canary to the filename temporarily (and maybe also removing -@canary from others), so only this test runs on CircleCI.

await typeString( this.driver, textViewElement, text, clear );
await this.driver.sleep( 1000 ); // Give time for the block to rerender (such as for accessibility)
if ( ! isAndroid() ) {
block.type( text );
Copy link
Member

Choose a reason for hiding this comment

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

This seemed to be the failure reason for some of the e2e tests. What was the reason behind this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this because locally my machine wouldn't type anything on iOS with that function. Not sure if I have something set up wrong?

Copy link
Member

Choose a reason for hiding this comment

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

Which iOS simulator (version, device) were you using?

block.click();
}

async tapCoordinates( x, y, longPress = false ) {
Copy link
Member

Choose a reason for hiding this comment

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

If possible, using clickMiddleOfElement instead could be more robust. The device size, running locally or in the cloud, could be different and coordinates may not be the same between them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm. The problem is that I need to click outside of the alert and I can't get elements behind the alert.

Copy link
Member

Choose a reason for hiding this comment

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

Would pressing the back button instead on Android work?

Wendy Chen added 4 commits January 13, 2021 13:03
…ng at gutenberg-mobile. Adding more convenience functions to EditorPage.
WC: Cleaning up code.

WC: Fixing merge issue where import was changed to const.

WC: Changing all imports to requires as per jest bug.

WC: Removing before/afterAll blocks from UI tests.

WC: Updating UI tests to align with UI test changes.
Base automatically changed from master to trunk March 1, 2021 15:45
@illusaen illusaen closed this by deleting the head repository Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants