Skip to content

Commit

Permalink
Log an resolve swiftlint and allow 60 bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Aug 21, 2024
1 parent f748e92 commit 8330890
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public struct RegisterRemoteNotificationsAction: Sendable {
try await registration.access.waitCheckingCancellation()

#if targetEnvironment(simulator)
async let _ = withTimeout(of: .seconds(10)) { @MainActor in
async let _ = withTimeout(of: .seconds(5)) { @MainActor in
spezi.storage[RemoteNotificationContinuation.self]?.resume(with: .failure(TimeoutError()))
}
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct RemoteNotificationsTestView: View {
@State private var task: Task<Void, Never>?

var body: some View {
List {
List { // swiftlint:disable:this closure_body_length
Section("Token") {
HStack {
Text(verbatim: "Token")
Expand Down
6 changes: 4 additions & 2 deletions Tests/UITests/TestAppUITests/RemoteNotificationsTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ final class RemoteNotificationsTests: XCTestCase {

app.buttons["Register"].tap()

if !app.staticTexts["Token, 80 bytes"].waitForExistence(timeout: 1.0) {
if !(app.staticTexts["Token, 80 bytes"].waitForExistence(timeout: 1.0)
|| app.staticTexts["Token, 60 bytes"].exists) {
XCTAssertFalse(app.staticTexts["Token, failed"].exists)
XCTAssertTrue(app.staticTexts["Token, Timeout"].waitForExistence(timeout: 15))
XCTAssertTrue(app.staticTexts["Token, Timeout"].waitForExistence(timeout: 10))
print("The token registration timed out!")
}

app.buttons["Unregister"].tap()
Expand Down

0 comments on commit 8330890

Please sign in to comment.