Skip to content

Commit

Permalink
🧪 Potential fix for the flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodordio committed Dec 16, 2024
1 parent 335446c commit e736c28
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions tests/inbox-ui-tests/InboxCustomizationTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import XCTest
@testable import IterableSDK

class InboxCustomizationTests: XCTestCase, IterableInboxUITestsProtocol {
lazy var app: XCUIApplication! = UITestsGlobal.application

internal var app: XCUIApplication!
override func setUp() {
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
app = XCUIApplication()
app.launch()

clearNetwork()
}
Expand Down
3 changes: 2 additions & 1 deletion tests/inbox-ui-tests/InboxUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class InboxUITests: XCTestCase, IterableInboxUITestsProtocol {
override func setUp() {
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false

app = XCUIApplication()
app.launch()
clearNetwork()
}

Expand Down
3 changes: 2 additions & 1 deletion tests/inbox-ui-tests/NavInboxSessionUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class NavInboxSessionUITests: XCTestCase, IterableInboxUITestsProtocol {
override func setUp() {
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false

app = XCUIApplication()
app.launch()
clearNetwork()
}

Expand Down
3 changes: 2 additions & 1 deletion tests/inbox-ui-tests/PopupInboxSessionUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ class PopupInboxSessionUITests: XCTestCase, IterableInboxUITestsProtocol {
override func setUp() {
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false

app = XCUIApplication()
app.launch()
clearNetwork()
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ui-tests/UITestsHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct UITestsHelper {
}

static func deleteSwipe(_ cell: XCUIElement) {
let startPoint = cell.coordinate(withNormalizedOffset: CGVector(dx: 1.0, dy: 0.0))
let startPoint = cell.coordinate(withNormalizedOffset: CGVector(dx: 1.0, dy: 0.1))
let endPoint = cell.coordinate(withNormalizedOffset: .zero)
startPoint.press(forDuration: 0, thenDragTo: endPoint)
}
Expand Down

0 comments on commit e736c28

Please sign in to comment.