Adds untracking for state kGREYPendingViewsToDisappear if a UIViewController's…

Authored by steven <stevdev@web.de> on Sep 21 2018, 5:12 AM.

Description

Adds untracking for state kGREYPendingViewsToDisappear if a UIViewController's viewDidAppear has been called. This is neccessary if the user triggers a transition between UIViewControllers e.g. in the context of a UIPageViewController. See this example for an explanation:

We show a UIPageViewController with three UIViewControllers <VC1>, <VC2>, and <VC3>.
This is the series of events:

  • <VC1>.viewWillAppear
  • <VC1>.viewDidAppear
  • <VC1>.view is shown to the user
  • User performs swipe left
  • <VC2>.viewWillAppear
  • <VC1>.viewWillDisappear
  • <VC2>.viewDidAppear
  • <VC1>.viewDidDisappear
  • <VC2>.view is shown to the user
  • User performs swipe left (This swipe does not go far enough to show <VC3>.view at the end of the swipe)
  • <VC3>.viewWillAppear
  • <VC2>.viewWillDisappear
  • <VC2>.viewWillAppear
  • <VC2>.viewDidAppear
  • <VC3>.viewWillDisappear
  • <VC3>.viewDidDisappear
  • <VC2>.view is shown to the user again

Without this patch, EarlGrey waits for viewDidDisappear: call on <VC2> and app state does not become kGREYIdle.
With this patch, at the call of <VC2>.viewDidAppear state kGREYPendingViewsToDisappear is untracked and app state becomes kGREYIdle.

Details

Committed
steven <stevdev@web.de>Sep 21 2018, 5:12 AM
Parents
R23:08b2bf68f5a6: Update docs to fix func name
Branches
Unknown
Tags
Unknown
References
refs/pull/750/head