Skip to content

[module_test_ios] trying tap the buttons again if the first time didn't work#90535

Merged
fluttergithubbot merged 6 commits intoflutter:masterfrom
cyanglaz:module_test_ios_delay
Sep 24, 2021
Merged

[module_test_ios] trying tap the buttons again if the first time didn't work#90535
fluttergithubbot merged 6 commits intoflutter:masterfrom
cyanglaz:module_test_ios_delay

Conversation

@cyanglaz
Copy link
Contributor

I guess there's a race condition in the XCUITests that caused some flakiness in the tests. This PR is to try another workaround, the first try with tap on app didn't work.

#89175

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Sep 22, 2021
@google-cla google-cla bot added the cla: yes label Sep 22, 2021
@cyanglaz cyanglaz requested a review from jmagman September 22, 2021 18:49
[self waitForAndTapElement:app.buttons[@"Full Screen (Warm)"]];
XCTAssertTrue([app.staticTexts[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
BOOL newPageAppeared = [app.staticTexts[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0];
if (!newPageAppeared) {
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a comment for why this is done?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


[self waitForAndTapElement:app.buttons[@"Full Screen (Warm)"]];
XCTAssertTrue([app.staticTexts[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0]);
BOOL newPageAppeared = [app.staticTexts[@"Button tapped 0 times."] waitForExistenceWithTimeout:60.0];
Copy link
Member

Choose a reason for hiding this comment

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

I suspect 60 seconds is too long for everything in this test, but we can reevaluate once this test is stable.

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 refactored a little so all the 60.0 are now a constant, and yeah we can adjust it later.
Note that there are 2 time-outs in this tests have 30.0 time outs

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

LGTM
🤞

@jmagman
Copy link
Member

jmagman commented Sep 22, 2021

You can rebase on master to clear up the tool test errors.

@cyanglaz
Copy link
Contributor Author

looks like the google testing is stuck (it's been over 24 hours), I'll re-trigger CI

@fluttergithubbot fluttergithubbot merged commit 126370f into flutter:master Sep 24, 2021
@cyanglaz cyanglaz deleted the module_test_ios_delay branch September 27, 2021 18:50
clocksmith pushed a commit to clocksmith/flutter that referenced this pull request Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants