0

Could someone please help me on what needs to be done in case tests fails with kGREYPendingViewsToDisappear as in below case

Code

EarlGrey.selectElement(with: grey_keyWindow()).assert(grey_sufficientlyVisible())

Exception

UI Test Activity: Assertion Failure: EarlGreyTests.swift:27: Exception: TimeoutException

Exception Name: TimeoutException Exception Reason: Timed out while waiting to perform assertion. Exception with Assertion: { "Assertion Criteria": "assertWithMatcher:matcherForSufficientlyVisible(>=0.750000)", "Element Matcher": "(kindOfClass('UIWindow') && keyWindow)" }

Exception Details: Error Trace: [ { "Description": "Failed to execute block because idling resources below are busy.", "Description Glossary": { "GREYAppStateTracker": "Waiting for viewDidDisappear: call on the view controller. Please ensure that this view controller and it's subclasses call through to their super's implementation.

Full state transition call stack for all objects: => Waiting for viewDidDisappear: call on the view controller. Please ensure that this view controller and it's subclasses call through to their super's implementation. ( 0 EarlGrey 0x0000000133ea1d3d -[GREYAppStateTrackerObject setState:] + 61 1 EarlGrey 0x0000000133e49685 _133-[GREYAppStateTracker grey_changeState:usingOperation:forObject:orInternalObjectDeallocationTracker:orExternalAppStateTrackerObject:]_block_invoke + 1157 2 EarlGrey 0x0000000133e48858 -[GREYAppStateTracker grey_performBlockInCriticalSection:] + 328 3 EarlGrey 0x0000000133e490ab -[GREYAppStateTracker grey_changeState:usingOperation:forObject:orInternalObjectDeallocationTracker:orExternalAppStateTrackerObject:] + 1371 4 EarlGrey 0x0000000133e4710c -[GREYAppStateTracker untrackState:forObject:] + 92 5 EarlGrey 0x0000000133e4dea7 -[UIViewController(GREYAdditions) greyswizzled_viewDidAppear:] + 135 6 EarlGreyTests 0x0000000133bf86c6 -[UIViewController(FIRAScreenClassName) fira_viewDidAppear:] + 33 7 UIKit 0x0000000136d4a9ae -[UIViewControllerAccessibility viewDidAppear:] + 67 8 UIKit 0x0000000110ee1e5f -[UIViewController _setViewAppearState:isAnimating:] + 697 9 UIKit 0x0000000110ee23ad _52-[UIViewController _setViewAppearState:isAnimating:]_block_invoke + 265 10 CoreFoundation 0x0000000115310553 -[_NSArrayI enumerateObjectsWithOptions:usingBlock:] + 163 11 UIKit 0x0000000110ee2067 -[UIViewController _setViewAppearState:isAnimating:] + 1217 12 UIKit 0x0000000110ee23ad _52-[UIViewController _setViewAppearState:isAnimating:]_block_invoke + 265 13 CoreFoundation 0x00000001153c256a -[_NSSingleObjectArrayI enumerateObjectsWithOptions:usingBlock:] + 58 14 UIKit 0x0000000110ee2067 -[UIViewController _setViewAppearState:isAnimating:] + 1217 15 UIKit 0x0000000110ee28f0 -[UIViewController _endAppearanceTransition:] + 197 16 UIKit 0x0000000110f1aebd -[UINavigationController navigationTransitionView:didEndTransition:fromView:toView:] + 1287 17 UIKit 0x0000000136d611aa -[UINavigationControllerAccessibility navigationTransitionView:didEndTransition:fromView:toView:] + 102 18 UIKit 0x0000000111296db1 -[UINavigationTransitionView _notifyDelegateTransitionDidStopWithContext:] + 421 19 UIKit 0x0000000111297072 -[UINavigationTransitionView _cleanupTransition] + 605 20 UIKit 0x0000000110dccea9 -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] + 343 21 UIKit 0x0000000110dc8546 +[UIViewAnimationState popAnimationState] + 319 22 UIKit 0x0000000111296b20 -[UINavigationTransitionView transition:fromView:toView:] + 2571 23 UIKit 0x0000000110f2411f -[UINavigationController _startTransition:fromViewController:toViewController:] + 3261 24 UIKit 0x0000000110f2461e -[UINavigationController _startDeferredTransitionIfNeeded:] + 870 25 UIKit 0x0000000110f2586c -[UINavigationController _viewWillLayoutSubviews] + 150 26 UIKit 0x000000011117dd0b -[UILayoutContainerView layoutSubviews] + 231 27 UIKit 0x0000000136d7e61c -[UILayoutContainerViewAccessibility layoutSubviews] + 42 28 UIKit 0x0000000110e077a8 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1515 29 QuartzCore 0x00000001161bd456 -[CALayer layoutSublayers] + 177 30 QuartzCore 0x00000001161c1667 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 395 31 QuartzCore 0x00000001161480fb _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 343 32 QuartzCore 0x000000011617579c _ZN2CA11Transaction6commitEv + 568 33 UIKit 0x0000000110d52269 _34-[UIApplication _firstCommitBlock]_block_invoke_2 + 141 34 CoreFoundation 0x0000000115324b0c _CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK_ + 12 35 CoreFoundation 0x00000001153092db _CFRunLoopDoBlocks + 331 36 CoreFoundation 0x0000000115308a84 _CFRunLoopRun + 1284 37 CoreFoundation 0x000000011530830b CFRunLoopRunSpecific + 635 38 GraphicsServices 0x000000011a536a73 GSEventRunModal + 62 39 UIKit 0x0000000110d38057 UIApplicationMain + 159 40 MyApp 0x000000010e56c9b7 main + 55 41 libdyld.dylib 0x0000000117a65955 start + 1 ) " }, "Error Domain": "com.google.earlgrey.GREYUIThreadExecutorErrorDomain", "Error Code": "0", "File Name": "GREYUIThreadExecutor.m", "Function Name": "-[GREYUIThreadExecutor executeSyncWithTimeout:block:error:]", "Line": "239", "TestCase Class": "EarlGreyTests.EarlGreyTests", "TestCase Method": "testExample" }, { "Description": "Failed to execute assertion within 30 seconds.", "Error Domain": "com.google.earlgrey.ElementInteractionErrorDomain", "Error Code": "4", "File Name": "GREYElementInteraction.m", "Function Name": "-[GREYElementInteraction assert:error:]", "Line": "450", "TestCase Class": "EarlGreyTests.EarlGreyTests", "TestCase Method": "testExample" } ]

What work around didn't work

Adding viewDidDisappear in FeedItemCollectionViewController

Anand
  • 216
  • 3
  • 10

0 Answers0