Skip to content

Commit 8a493dc

Browse files
committed
pr feedbacks
1 parent 77bea60 commit 8a493dc

File tree

7 files changed

+21
-15
lines changed

7 files changed

+21
-15
lines changed

WireNetwork/Sources/WireNetwork/APIs/Rest/AuthenticationAPI/AuthenticationAPIV0.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,12 @@ class AuthenticationAPIV0: AuthenticationAPI, VersionedAPI {
270270
.withBody(body, contentType: .json)
271271
.build()
272272

273-
let (_, _) = try await networkService.executeRequest(request)
273+
let (_, response) = try await networkService.executeRequest(request)
274274

275-
_ = ResponseParser()
275+
try ResponseParser()
276276
.success(code: .ok)
277277
.failure(code: .badRequest, label: "bad-request", error: AuthenticationAPIError.invalidEmail)
278+
.parse(code: response.statusCode, data: nil)
278279
}
279280

280281
func requestEmailVerificationCode(for email: String) async throws {

wire-ios/WireUITests/Pages/AccountSettingsPage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class AccountSettingsPage: PageModel {
115115
}
116116

117117
func goBackToSettingsPage() throws -> SettingsPage {
118-
if app.onPad() {
118+
if app.iPadOnly() {
119119
return try SettingsPage()
120120
}
121121
backToSettingsButton.tap()

wire-ios/WireUITests/Pages/ActiveConversationPage .swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class ActiveConversationPage: PageModel {
7777
// Revert this temporary workaround once WPB-17997 is fixed
7878
// See: https://wearezeta.atlassian.net/browse/WPB-17997
7979
let hideKeyboard = app.buttons["Hide keyboard"]
80-
app.onPad {
80+
app.iPadOnly {
8181
hideKeyboard.tap()
8282
}
8383
return self

wire-ios/WireUITests/Pages/BackupOrRestorePage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class BackupOrRestorePage: PageModel {
6060
}
6161

6262
private func sortFiles() {
63-
if app.onPad() {
63+
if app.iPadOnly() {
6464
return
6565
}
6666
if !browseButtonOnBottom.isSelected {

wire-ios/WireUITests/Pages/ConversationsPage.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class ConversationsPage: PageModel {
6161
}
6262

6363
func openSettings() throws -> SettingsPage {
64-
app.onPad {
64+
app.iPadOnly {
6565
if self.sideBarPanel.exists {
6666
self.sideBarPanel.tap()
6767
}
@@ -71,7 +71,7 @@ class ConversationsPage: PageModel {
7171
}
7272

7373
func openUserAccountPageForUser(with input: String) throws -> UserAccountPage {
74-
app.onPad {
74+
app.iPadOnly {
7575
if self.sideBarPanel.exists {
7676
self.sideBarPanel.tap()
7777
}
@@ -85,7 +85,7 @@ class ConversationsPage: PageModel {
8585
}
8686

8787
func tapPlusButtonToCreateGroup() throws -> NewConversationPage {
88-
app.onPad {
88+
app.iPadOnly {
8989
if self.sidePanel.exists {
9090
self.sidePanel.tap()
9191
}
@@ -95,7 +95,7 @@ class ConversationsPage: PageModel {
9595
}
9696

9797
func openPendingRequest() throws -> ConnectionRequestsPage {
98-
app.onPad {
98+
app.iPadOnly {
9999
if self.sidePanel.exists {
100100
self.sidePanel.tap()
101101
}
@@ -115,7 +115,7 @@ class ConversationsPage: PageModel {
115115
}
116116

117117
func openConversation() throws -> ActiveConversationPage {
118-
app.onPad {
118+
app.iPadOnly {
119119
if self.sidePanel.exists {
120120
self.sidePanel.tap()
121121
}
@@ -146,7 +146,7 @@ class ConversationsPage: PageModel {
146146
}
147147

148148
func getNameLabel() -> String? {
149-
app.onPad {
149+
app.iPadOnly {
150150
if self.sidePanel.exists {
151151
self.sidePanel.tap()
152152
}

wire-ios/WireUITests/Pages/SettingsPage.swift

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,14 @@ class SettingsPage: PageModel {
5959
if conversationsTab.exists {
6060
conversationsTab.tap()
6161
} else {
62-
app.onPad { [self] in
63-
if sideBarPanel.exists { sideBarPanel.tap() }
64-
if allConversations.exists { allConversations.tap() }
62+
app.iPadOnly { [self] in
63+
if sideBarPanel.exists {
64+
sideBarPanel.tap()
65+
}
66+
67+
if allConversations.exists {
68+
allConversations.tap()
69+
}
6570
}
6671
}
6772
return try ConversationsPage()

wire-ios/WireUITests/XCUIApplication+Additions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extension XCUIApplication {
3737
}
3838

3939
@discardableResult
40-
func onPad(_ block: (() -> Void)? = nil) -> Bool {
40+
func iPadOnly(_ block: (() -> Void)? = nil) -> Bool {
4141
guard UIDevice.current.userInterfaceIdiom == .pad else { return false }
4242
block?()
4343
return true

0 commit comments

Comments
 (0)