New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 710656 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

ShowCase EG tests are flaky on devices due to animations introduced by opening target view

Project Member Reported by liaoyuke@chromium.org, Apr 11 2017

Issue description

Take testLaunchAndTappingCell test for example: (code is attached below)

This test fails when trying to tap "Tab 0_button" because it is still not accessible, and the reason is that showcase_utils::Open(@"TabGridViewController") introduces animations and apparently EarlGrey has some synchronization issues.

// Tests launching TabGridViewController and tapping a cell.
- (void)testLaunchAndTappingCell {
  showcase_utils::Open(@"TabGridViewController");
  [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"Tab 0_button")]
      performAction:grey_tap()];
  [[EarlGrey selectElementWithMatcher:grey_text(@"TabGridCommands")]
      assertWithMatcher:grey_notNil()];
  [[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(
                                          @"protocol_alerter_done")]
      performAction:grey_tap()];
  showcase_utils::Close();
}

Ed and I tried to add a wait condition after showcase_utils::Open(@"TabGridViewController"); to wait for the target view (tab grid view) to become accessible, however, this still doesn't work because TabGridView becomes accessible doesn't necessarily mean that "Tab 0_button" is also accessible.

This flake applies to almost all showcase egtests, so we need a reliable solution to this issue so that future written tests can be flake-free.
 
This also happens for the Tab COordinator, but not for Payments and Content Suggestions  it seems. What is the difference between those tests?
Components: -Test>iOS Tests>Flaky

Comment 3 by edchin@chromium.org, Jan 24 2018

Status: Fixed (was: Assigned)
Clean has been deleted. I'm marking this fixed by virtue of being deleted.

Sign in to add a comment