         let finishPoint = startPoint.withOffset(CGVector(dx: swipeOffset - 10, dy: 0))
         startPoint.press(forDuration: 0, thenDragTo: finishPoint)
         
+        wait(for: 1)
+        
         // Check if first cell doesn't exist anymore (after swiping away)
         XCTAssertTrue(firstCell.exists)
     }
 }
+
+extension XCTestCase {
+    
+    func wait(for duration: TimeInterval) {
+        let waitExpectation = expectation(description: "Waiting")
+        
+        let when = DispatchTime.now() + duration
+        DispatchQueue.main.asyncAfter(deadline: when) {
+            waitExpectation.fulfill()
+        }
+        
+        // We use a buffer here to avoid flakiness with Timer on CI
+        waitForExpectations(timeout: duration + 0.5)
+    }
+}

    override func setUp() {
        super.setUp()
        
        // In UI tests it is usually best to stop immediately when a failure occurs.
        continueAfterFailure = true
        XCUIApplication().launch()
        XCUIDevice.shared.orientation = .portrait

        let startPoint = firstCell.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5))
        let finishPoint = startPoint.withOffset(CGVector(dx: swipeOffset + 10, dy: 0))
        startPoint.press(forDuration: 0, thenDragTo: finishPoint)
        
        wait(for: 1)
        
        // Check if first cell doesn't exist anymore (after swiping away)
        XCTAssertFalse(firstCell.exists)
