Skip to content

Commit b510b97

Browse files
committed
🗑️ Temporarily disabling flaky tests
1 parent 3c4f18c commit b510b97

File tree

7 files changed

+497
-474
lines changed

7 files changed

+497
-474
lines changed

tests/inbox-ui-tests/InboxCustomizationTests.swift

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,39 +8,43 @@ import XCTest
88

99
class InboxCustomizationTests: XCTestCase, IterableInboxUITestsProtocol {
1010
internal var app: XCUIApplication!
11-
override func setUp() {
12-
// In UI tests it is usually best to stop immediately when a failure occurs.
13-
continueAfterFailure = false
14-
app = XCUIApplication()
15-
app.launch()
16-
17-
clearNetwork()
18-
}
1911

20-
func testCustomInboxCell() {
21-
gotoTab(.home)
22-
app.button(withText: "Load Dataset 2").tap()
23-
app.button(withText: "Show Custom Inbox 1").tap()
24-
25-
app.tableCell(withText: "Buy Now").waitToAppear()
26-
27-
app.button(withText: "Done").tap()
28-
}
12+
// Skipping these tests until we have the time to update them.
13+
// https://iterable.atlassian.net/browse/MOB-10461
2914

30-
func testCustomInboxCellWithViewDelegateClassName() {
31-
gotoTab(.home)
32-
app.button(withText: "Load Dataset 2").tap()
33-
34-
gotoTab(.customInbox)
35-
36-
app.tableCell(withText: "Buy Now").waitToAppear()
37-
}
38-
39-
func testImageLoading() {
40-
gotoTab(.home)
41-
app.button(withText: "Load Dataset 3").tap()
42-
43-
gotoTab(.inbox)
44-
XCTAssertTrue(app.images["icon-image-message3-1"].exists)
45-
}
15+
// override func setUp() {
16+
// // In UI tests it is usually best to stop immediately when a failure occurs.
17+
// continueAfterFailure = false
18+
// app = XCUIApplication()
19+
// app.launch()
20+
//
21+
// clearNetwork()
22+
// }
23+
//
24+
// func testCustomInboxCell() {
25+
// gotoTab(.home)
26+
// app.button(withText: "Load Dataset 2").tap()
27+
// app.button(withText: "Show Custom Inbox 1").tap()
28+
//
29+
// app.tableCell(withText: "Buy Now").waitToAppear()
30+
//
31+
// app.button(withText: "Done").tap()
32+
// }
33+
//
34+
// func testCustomInboxCellWithViewDelegateClassName() {
35+
// gotoTab(.home)
36+
// app.button(withText: "Load Dataset 2").tap()
37+
//
38+
// gotoTab(.customInbox)
39+
//
40+
// app.tableCell(withText: "Buy Now").waitToAppear()
41+
// }
42+
//
43+
// func testImageLoading() {
44+
// gotoTab(.home)
45+
// app.button(withText: "Load Dataset 3").tap()
46+
//
47+
// gotoTab(.inbox)
48+
// XCTAssertTrue(app.images["icon-image-message3-1"].exists)
49+
// }
4650
}

tests/inbox-ui-tests/InboxUITests.swift

Lines changed: 121 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -9,123 +9,126 @@ import XCTest
99
class InboxUITests: XCTestCase, IterableInboxUITestsProtocol {
1010
lazy var app: XCUIApplication! = UITestsGlobal.application
1111

12-
override func setUp() {
13-
// In UI tests it is usually best to stop immediately when a failure occurs.
14-
continueAfterFailure = false
15-
app = XCUIApplication()
16-
app.launch()
17-
clearNetwork()
18-
}
12+
// Skipping these tests until we have the time to update them.
13+
// https://iterable.atlassian.net/browse/MOB-10461
1914

20-
func testShowInboxMessages() {
21-
gotoTab(.home)
22-
app.button(withText: "Load Dataset 1").tap()
23-
24-
gotoTab(.inbox)
25-
26-
app.tableCell(withText: "title1").tap()
27-
28-
app.link(withText: "Click Here1").waitToAppear().tap()
29-
30-
app.tableCell(withText: "title2").waitToAppear().tap()
31-
32-
app.link(withText: "Click Here2").waitToAppear().tap()
33-
34-
app.tableCell(withText: "title1").waitToAppear()
35-
}
36-
37-
func testShowInboxOnButtonClick() {
38-
gotoTab(.home)
39-
app.button(withText: "Load Dataset 1").tap()
40-
41-
app.button(withText: "Show Inbox").tap()
42-
43-
app.tableCell(withText: "title1").waitToAppear().tap()
44-
45-
app.link(withText: "Click Here1").waitToAppear()
46-
app.navButton(withText: "Inbox").waitToAppear() // Nav bar 'back' button
47-
app.link(withText: "Click Here1").tap()
48-
49-
app.tableCell(withText: "title2").waitToAppear().tap()
50-
app.link(withText: "Click Here2").waitToAppear().tap()
51-
52-
app.tableCell(withText: "title1").waitToAppear()
53-
app.navButton(withText: "Done").tap()
54-
}
55-
56-
func testTrackSession() {
57-
gotoTab(.home)
58-
app.button(withText: "Load Dataset 1").tap()
59-
60-
gotoTab(.inbox)
61-
sleep(2)
62-
gotoTab(.network)
63-
64-
65-
let dict = body(forEvent: Const.Path.trackInboxSession)
66-
let impressions = dict[keyPath: KeyPath(keys: JsonKey.impressions)] as! [[String: Any]]
67-
XCTAssertEqual(impressions.count, 3)
68-
}
69-
70-
func testDeleteActionSwipeToDelete() {
71-
gotoTab(.inbox)
72-
let count1 = app.tables.cells.count
73-
74-
gotoTab(.home)
75-
app.button(withText: "Add Inbox Message").tap()
76-
77-
gotoTab(.inbox)
78-
let count2 = app.tables.cells.count
79-
XCTAssertEqual(count2, count1 + 1)
80-
app.lastCell().deleteSwipe()
81-
XCTAssertEqual(app.tables.cells.count, count1)
82-
83-
gotoTab(.network)
84-
let dict = body(forEvent: Const.Path.inAppConsume)
85-
TestUtils.validateMatch(keyPath: KeyPath(keys: JsonKey.deleteAction), value: InAppDeleteSource.inboxSwipe.jsonValue as! String, inDictionary: dict)
86-
}
87-
88-
func testDeleteActionDeleteButton() {
89-
gotoTab(.home)
90-
app.button(withText: "Load Dataset 1").tap()
91-
92-
gotoTab(.inbox)
93-
let count1 = app.tables.cells.count
94-
95-
gotoTab(.home)
96-
app.button(withText: "Add Inbox Message").tap()
97-
98-
gotoTab(.inbox)
99-
let count2 = app.tables.cells.count
100-
XCTAssertEqual(count2, count1 + 1)
101-
102-
app.lastCell().tap()
103-
app.link(withText: "Delete").waitToAppear().tap()
104-
105-
app.tableCell(withText: "title1").waitToAppear()
106-
XCTAssertEqual(app.tables.cells.count, count1)
107-
108-
gotoTab(.network)
109-
let dict = body(forEvent: Const.Path.inAppConsume)
110-
TestUtils.validateMatch(keyPath: KeyPath(keys: JsonKey.deleteAction), value: InAppDeleteSource.deleteButton.jsonValue as! String, inDictionary: dict)
111-
}
112-
113-
func testPullToRefresh() {
114-
gotoTab(.home)
115-
app.button(withText: "Load Dataset 1").tap()
116-
app.button(withText: "Add Message To Server").tap()
117-
118-
gotoTab(.inbox)
119-
let count1 = app.tables.cells.count
120-
app.tableCell(withText: "title1").pullToRefresh()
121-
122-
let count2 = app.tables.cells.count
123-
XCTAssertEqual(count2, count1 + 1)
124-
125-
app.lastCell().tap()
126-
app.link(withText: "Delete").waitToAppear().tap()
127-
128-
app.tableCell(withText: "title1").waitToAppear()
129-
XCTAssertEqual(app.tables.cells.count, count1)
130-
}
15+
// override func setUp() {
16+
// // In UI tests it is usually best to stop immediately when a failure occurs.
17+
// continueAfterFailure = false
18+
// app = XCUIApplication()
19+
// app.launch()
20+
// clearNetwork()
21+
// }
22+
//
23+
// func testShowInboxMessages() {
24+
// gotoTab(.home)
25+
// app.button(withText: "Load Dataset 1").tap()
26+
//
27+
// gotoTab(.inbox)
28+
//
29+
// app.tableCell(withText: "title1").tap()
30+
//
31+
// app.link(withText: "Click Here1").waitToAppear().tap()
32+
//
33+
// app.tableCell(withText: "title2").waitToAppear().tap()
34+
//
35+
// app.link(withText: "Click Here2").waitToAppear().tap()
36+
//
37+
// app.tableCell(withText: "title1").waitToAppear()
38+
// }
39+
//
40+
// func testShowInboxOnButtonClick() {
41+
// gotoTab(.home)
42+
// app.button(withText: "Load Dataset 1").tap()
43+
//
44+
// app.button(withText: "Show Inbox").tap()
45+
//
46+
// app.tableCell(withText: "title1").waitToAppear().tap()
47+
//
48+
// app.link(withText: "Click Here1").waitToAppear()
49+
// app.navButton(withText: "Inbox").waitToAppear() // Nav bar 'back' button
50+
// app.link(withText: "Click Here1").tap()
51+
//
52+
// app.tableCell(withText: "title2").waitToAppear().tap()
53+
// app.link(withText: "Click Here2").waitToAppear().tap()
54+
//
55+
// app.tableCell(withText: "title1").waitToAppear()
56+
// app.navButton(withText: "Done").tap()
57+
// }
58+
//
59+
// func testTrackSession() {
60+
// gotoTab(.home)
61+
// app.button(withText: "Load Dataset 1").tap()
62+
//
63+
// gotoTab(.inbox)
64+
// sleep(2)
65+
// gotoTab(.network)
66+
//
67+
//
68+
// let dict = body(forEvent: Const.Path.trackInboxSession)
69+
// let impressions = dict[keyPath: KeyPath(keys: JsonKey.impressions)] as! [[String: Any]]
70+
// XCTAssertEqual(impressions.count, 3)
71+
// }
72+
//
73+
// func testDeleteActionSwipeToDelete() {
74+
// gotoTab(.inbox)
75+
// let count1 = app.tables.cells.count
76+
//
77+
// gotoTab(.home)
78+
// app.button(withText: "Add Inbox Message").tap()
79+
//
80+
// gotoTab(.inbox)
81+
// let count2 = app.tables.cells.count
82+
// XCTAssertEqual(count2, count1 + 1)
83+
// app.lastCell().deleteSwipe()
84+
// XCTAssertEqual(app.tables.cells.count, count1)
85+
//
86+
// gotoTab(.network)
87+
// let dict = body(forEvent: Const.Path.inAppConsume)
88+
// TestUtils.validateMatch(keyPath: KeyPath(keys: JsonKey.deleteAction), value: InAppDeleteSource.inboxSwipe.jsonValue as! String, inDictionary: dict)
89+
// }
90+
//
91+
// func testDeleteActionDeleteButton() {
92+
// gotoTab(.home)
93+
// app.button(withText: "Load Dataset 1").tap()
94+
//
95+
// gotoTab(.inbox)
96+
// let count1 = app.tables.cells.count
97+
//
98+
// gotoTab(.home)
99+
// app.button(withText: "Add Inbox Message").tap()
100+
//
101+
// gotoTab(.inbox)
102+
// let count2 = app.tables.cells.count
103+
// XCTAssertEqual(count2, count1 + 1)
104+
//
105+
// app.lastCell().tap()
106+
// app.link(withText: "Delete").waitToAppear().tap()
107+
//
108+
// app.tableCell(withText: "title1").waitToAppear()
109+
// XCTAssertEqual(app.tables.cells.count, count1)
110+
//
111+
// gotoTab(.network)
112+
// let dict = body(forEvent: Const.Path.inAppConsume)
113+
// TestUtils.validateMatch(keyPath: KeyPath(keys: JsonKey.deleteAction), value: InAppDeleteSource.deleteButton.jsonValue as! String, inDictionary: dict)
114+
// }
115+
//
116+
// func testPullToRefresh() {
117+
// gotoTab(.home)
118+
// app.button(withText: "Load Dataset 1").tap()
119+
// app.button(withText: "Add Message To Server").tap()
120+
//
121+
// gotoTab(.inbox)
122+
// let count1 = app.tables.cells.count
123+
// app.tableCell(withText: "title1").pullToRefresh()
124+
//
125+
// let count2 = app.tables.cells.count
126+
// XCTAssertEqual(count2, count1 + 1)
127+
//
128+
// app.lastCell().tap()
129+
// app.link(withText: "Delete").waitToAppear().tap()
130+
//
131+
// app.tableCell(withText: "title1").waitToAppear()
132+
// XCTAssertEqual(app.tables.cells.count, count1)
133+
// }
131134
}

0 commit comments

Comments
 (0)