@@ -14,13 +14,13 @@ class ios_baseUITests: XCTestCase {
14
14
15
15
let networkMocker = NetworkMocker ( )
16
16
17
- override func setUp ( ) {
18
- super. setUp ( )
17
+ override func setUpWithError ( ) throws {
18
+ try super. setUpWithError ( )
19
19
app = XCUIApplication ( )
20
20
app. launchArguments = [ " Automation Test " ]
21
21
22
- try ? networkMocker. setUp ( )
23
- networkMocker. stubLogOut ( )
22
+ try networkMocker. setUp ( )
23
+ networkMocker. stub ( with : . logOut , method : . DELETE )
24
24
app. logOutIfNeeded ( in: self )
25
25
}
26
26
@@ -68,15 +68,15 @@ class ios_baseUITests: XCTestCase {
68
68
func testAccountCreation( ) {
69
69
app. launch ( )
70
70
71
- networkMocker. stubSignUp ( )
71
+ networkMocker. stub ( with : . signUp ( success : true ) , method : . POST )
72
72
73
73
app. attemptSignUp (
74
74
in: self ,
75
75
76
76
password: " holahola "
77
77
)
78
78
79
- networkMocker. stubGetProfile ( )
79
+ networkMocker. stub ( with : . profile ( success : true ) , method : . GET )
80
80
let getMyProfile = app. buttons [ " GetMyProfileButton " ]
81
81
waitFor ( element: getMyProfile, timeOut: 10 )
82
82
getMyProfile. tap ( )
@@ -92,7 +92,7 @@ class ios_baseUITests: XCTestCase {
92
92
func testSignInSuccess( ) {
93
93
app. launch ( )
94
94
95
- networkMocker. stubLogIn ( )
95
+ networkMocker. stub ( with : . signIn ( success : true ) , method : . POST )
96
96
97
97
app. attemptSignIn ( in: self ,
98
98
@@ -105,7 +105,7 @@ class ios_baseUITests: XCTestCase {
105
105
func testSignInFailure( ) {
106
106
app. launch ( )
107
107
108
- networkMocker. stubLogIn ( shouldSucceed : false )
108
+ networkMocker. stub ( with : . signIn ( success : false ) , method : . POST )
109
109
110
110
app. attemptSignIn ( in: self ,
111
111
0 commit comments