Skip to content

Commit 822de29

Browse files
committed
🧪 Fix for silent push flow
1 parent 007967d commit 822de29

File tree

1 file changed

+23
-17
lines changed

1 file changed

+23
-17
lines changed

tests/business-critical-integration/integration-test-app/IterableSDK-Integration-Tester/Tests/EmbeddedMessageIntegrationTests.swift

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -121,29 +121,35 @@ class EmbeddedMessageIntegrationTests: IntegrationTestBase {
121121
}
122122
}
123123

124-
// TODO: Test and fix the Silent Push refresh flow
124+
app.buttons["Disable Premium Member"].tap()
125+
app.staticTexts["Sync Messages"].tap()
126+
sleep(1)
127+
128+
let noMessages = app.staticTexts["no-embedded-messages-label"].firstMatch
129+
130+
XCTAssertTrue(noMessages.waitForExistence(timeout: standardTimeout), "no-embedded-messages-label should exist")
125131

126-
// app.buttons["Disable Premium Member"].tap()
127-
// app.staticTexts["Sync Messages"].tap()
128-
// sleep(1)
129-
//
130-
// let noMessages = app.staticTexts["no-embedded-messages-label"].firstMatch
131-
//
132-
// XCTAssertTrue(noMessages.waitForExistence(timeout: standardTimeout), "no-embedded-messages-label should exist")
133-
//
134-
// app.buttons["Enable Premium Member"].tap()
135-
// sleep(2)
136-
//
132+
app.buttons["Enable Premium Member"].tap()
133+
sleep(2)
134+
135+
XCUIDevice.shared.press(.home)
136+
XCUIDevice.shared.press(.home)
137+
138+
let springboardApp = XCUIApplication(bundleIdentifier: "com.apple.springboard")
139+
springboardApp.otherElements.element(boundBy: 100).tap()
140+
141+
app.activate()
142+
// TODO: Test and fix the Silent Push refresh flow
137143
// if isRunningInCI {
138144
// sendSimulatedEmbeddedSilentPush()
139145
// } else {
140146
// app.buttons["send-silent-push-sync-button"].tap()
141147
// }
142-
//
143-
// // Wait for auto-sync to complete
144-
// sleep(5)
145-
//
146-
// XCTAssertTrue(app.staticTexts["View Messages (1)"].waitForExistence(timeout: standardTimeout), "View Messages (1) should exist")
148+
149+
// Wait for auto-sync to complete
150+
sleep(5)
151+
152+
XCTAssertTrue(app.staticTexts["View Messages (1)"].waitForExistence(timeout: standardTimeout), "View Messages (1) should exist")
147153

148154
print("")
149155
print("✅✅✅✅✅✅✅✅✅✅✅")

0 commit comments

Comments
 (0)