Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
update timing for long press since it's failing intermittently in ci
  • Loading branch information
jostnes committed May 20, 2022
commit 9dc1b8f382ded235400087efd888f6c1ccd7c014
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ const longPressMiddleOfElement = async ( driver, element ) => {
const x = location.x + size.width / 2;
const y = location.y + size.height / 2;
action.press( { x, y } );
action.wait( 2000 );
// Setting to wait a bit longer because this is failing more frequently on the CI
action.wait( 3500 );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increasing the wait here before releasing the button press as found out that this is the culprit for flakiness on the gutenberg-editor-block-insertion-2.test.js tests.

Some examples of this failing before the fix from the past week: 1, 2, 3.

This is how the test should look like when the wait time is enough and the correct element is pressed at the right time.

action.release();
await action.perform();
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,7 @@ class EditorPage {
? '//android.widget.Button[@content-desc="Add Block Before"]'
: '//XCUIElementTypeButton[@name="Add Block Before"]';

const addBlockBeforeButton = await waitForVisible(
this.driver,
addBlockBeforeButtonLocator
);
await addBlockBeforeButton.click();
await clickIfClickable( this.driver, addBlockBeforeButtonLocator );
} else {
await addButton.click();
}
Expand Down