[Files app] Deflake test drivePinFileMobileNetwork
Remove wait(100) and wait for an UI clue that the pinned action has finished, which is more predictable. Change the ActionsController to listen to ActionModel invalidated event to clear the cached ActionsModel instance. Change the pinned action (DriveToggleOfflineAction) to call 'onExecute_' which invalidates the model, after it has finished processing all entries, the last |pinDriveFile| API callback has been called and metadata has been cleared and re-fetched from backend. The flakiness was due to cache invalidation and refreshing was happening before the |pinDriveFile| API had finished, so metadata and ActionsModel were getting cached with outdated value for |pinned|. Bug: 936429 Change-Id: Ib0878d41d28a46205dc3e2ced8243d681ec1945d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1660301 Commit-Queue: Noel Gordon <noel@chromium.org> Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Reviewed-by:Luciano Pacheco <lucmult@chromium.org> Reviewed-by:
Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#669610}
Showing
Please register or sign in to comment