@@ -9,122 +9,126 @@ import XCTest
99class 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-
16- clearNetwork ( )
17- }
12+ // Skipping these tests until we have the time to update them.
13+ // https://iterable.atlassian.net/browse/MOB-10461
1814
19- func testShowInboxMessages( ) {
20- gotoTab ( . home)
21- app. button ( withText: " Load Dataset 1 " ) . tap ( )
22-
23- gotoTab ( . inbox)
24-
25- app. tableCell ( withText: " title1 " ) . tap ( )
26-
27- app. link ( withText: " Click Here1 " ) . waitToAppear ( ) . tap ( )
28-
29- app. tableCell ( withText: " title2 " ) . waitToAppear ( ) . tap ( )
30-
31- app. link ( withText: " Click Here2 " ) . waitToAppear ( ) . tap ( )
32-
33- app. tableCell ( withText: " title1 " ) . waitToAppear ( )
34- }
35-
36- func testShowInboxOnButtonClick( ) {
37- gotoTab ( . home)
38- app. button ( withText: " Load Dataset 1 " ) . tap ( )
39-
40- app. button ( withText: " Show Inbox " ) . tap ( )
41-
42- app. tableCell ( withText: " title1 " ) . waitToAppear ( ) . tap ( )
43-
44- app. link ( withText: " Click Here1 " ) . waitToAppear ( )
45- app. navButton ( withText: " Inbox " ) . waitToAppear ( ) // Nav bar 'back' button
46- app. link ( withText: " Click Here1 " ) . tap ( )
47-
48- app. tableCell ( withText: " title2 " ) . waitToAppear ( ) . tap ( )
49- app. link ( withText: " Click Here2 " ) . waitToAppear ( ) . tap ( )
50-
51- app. tableCell ( withText: " title1 " ) . waitToAppear ( )
52- app. navButton ( withText: " Done " ) . tap ( )
53- }
54-
55- func testTrackSession( ) {
56- gotoTab ( . home)
57- app. button ( withText: " Load Dataset 1 " ) . tap ( )
58-
59- gotoTab ( . inbox)
60- sleep ( 2 )
61- gotoTab ( . network)
62-
63-
64- let dict = body ( forEvent: Const . Path. trackInboxSession)
65- let impressions = dict [ keyPath: KeyPath ( keys: JsonKey . impressions) ] as! [ [ String : Any ] ]
66- XCTAssertEqual ( impressions. count, 3 )
67- }
68-
69- func testDeleteActionSwipeToDelete( ) {
70- gotoTab ( . inbox)
71- let count1 = app. tables. cells. count
72-
73- gotoTab ( . home)
74- app. button ( withText: " Add Inbox Message " ) . tap ( )
75-
76- gotoTab ( . inbox)
77- let count2 = app. tables. cells. count
78- XCTAssertEqual ( count2, count1 + 1 )
79- app. lastCell ( ) . deleteSwipe ( )
80- XCTAssertEqual ( app. tables. cells. count, count1)
81-
82- gotoTab ( . network)
83- let dict = body ( forEvent: Const . Path. inAppConsume)
84- TestUtils . validateMatch ( keyPath: KeyPath ( keys: JsonKey . deleteAction) , value: InAppDeleteSource . inboxSwipe. jsonValue as! String , inDictionary: dict)
85- }
86-
87- func testDeleteActionDeleteButton( ) {
88- gotoTab ( . home)
89- app. button ( withText: " Load Dataset 1 " ) . tap ( )
90-
91- gotoTab ( . inbox)
92- let count1 = app. tables. cells. count
93-
94- gotoTab ( . home)
95- app. button ( withText: " Add Inbox Message " ) . tap ( )
96-
97- gotoTab ( . inbox)
98- let count2 = app. tables. cells. count
99- XCTAssertEqual ( count2, count1 + 1 )
100-
101- app. lastCell ( ) . tap ( )
102- app. link ( withText: " Delete " ) . waitToAppear ( ) . tap ( )
103-
104- app. tableCell ( withText: " title1 " ) . waitToAppear ( )
105- XCTAssertEqual ( app. tables. cells. count, count1)
106-
107- gotoTab ( . network)
108- let dict = body ( forEvent: Const . Path. inAppConsume)
109- TestUtils . validateMatch ( keyPath: KeyPath ( keys: JsonKey . deleteAction) , value: InAppDeleteSource . deleteButton. jsonValue as! String , inDictionary: dict)
110- }
111-
112- func testPullToRefresh( ) {
113- gotoTab ( . home)
114- app. button ( withText: " Load Dataset 1 " ) . tap ( )
115- app. button ( withText: " Add Message To Server " ) . tap ( )
116-
117- gotoTab ( . inbox)
118- let count1 = app. tables. cells. count
119- app. tableCell ( withText: " title1 " ) . pullToRefresh ( )
120-
121- let count2 = app. tables. cells. count
122- XCTAssertEqual ( count2, count1 + 1 )
123-
124- app. lastCell ( ) . tap ( )
125- app. link ( withText: " Delete " ) . waitToAppear ( ) . tap ( )
126-
127- app. tableCell ( withText: " title1 " ) . waitToAppear ( )
128- XCTAssertEqual ( app. tables. cells. count, count1)
129- }
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+ // }
130134}
0 commit comments