Skip to content

Commit

Permalink
Mobile - E2E - longPressMiddleOfElement: add custom waitTime for spec…
Browse files Browse the repository at this point in the history
…fic cases like "Adding a block before" option
  • Loading branch information
Gerardo committed Dec 19, 2022
1 parent bac0848 commit 9e6044f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ const clickElementOutsideOfTextInput = async ( driver, element ) => {
const longPressMiddleOfElement = async (
driver,
element,
waitTime = 5000, // Setting to wait a bit longer because this is failing more frequently on the CI
customElementSize
) => {
const location = await element.getLocation();
Expand All @@ -326,7 +327,7 @@ const longPressMiddleOfElement = async (

const action = new wd.TouchAction( driver )
.longPress( { x, y } )
.wait( 5000 ) // Setting to wait a bit longer because this is failing more frequently on the CI
.wait( waitTime )
.release();
await action.perform();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ class EditorPage {
await longPressMiddleOfElement(
this.driver,
addButton,
8000,
customElementSize
);
const addBlockBeforeButtonLocator = isAndroid()
Expand Down

1 comment on commit 9e6044f

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3729885799
📝 Reported issues:

Please sign in to comment.