99import  XCTest
1010
1111class  ios_baseUITests :  XCTestCase  { 
12- 
12+    
1313  var  app :  XCUIApplication ! 
1414
15-   let   networkMocker   =   NetworkMocker ( ) 
15+   private   var   networkMocker :   NetworkMocker ! 
1616
1717  override   func  setUpWithError( )  throws  { 
1818    try   super. setUpWithError ( ) 
1919    app =  XCUIApplication ( ) 
2020    app. launchArguments =  [ " Automation Test " ] 
21-       
21+     app. launch ( ) 
22+ 
23+     networkMocker =  NetworkMocker ( ) 
2224    try   networkMocker. setUp ( ) 
2325    networkMocker. stub ( with:  . logOut,  method:  . DELETE) 
2426    app. logOutIfNeeded ( in:  self ) 
@@ -30,8 +32,6 @@ class ios_baseUITests: XCTestCase {
3032  } 
3133
3234  func  testCreateAccountValidations( )  { 
33-     app. launch ( ) 
34-     
3535    app. buttons [ " GoToSignUpButton " ] . forceTap ( ) 
3636
3737    let  toolbarDoneButton  =  app. buttons [ " Toolbar Done Button " ] 
@@ -66,8 +66,6 @@ class ios_baseUITests: XCTestCase {
6666  } 
6767
6868  func  testAccountCreation( )  { 
69-     app. launch ( ) 
70-     
7169    networkMocker. stub ( with:  . signUp( success:  true ) ,  method:  . POST) 
7270
7371    app. attemptSignUp ( 
@@ -90,8 +88,6 @@ class ios_baseUITests: XCTestCase {
9088  } 
9189
9290  func  testSignInSuccess( )  { 
93-     app. launch ( ) 
94-     
9591    networkMocker. stub ( with:  . signIn( success:  true ) ,  method:  . POST) 
9692
9793    app. attemptSignIn ( in:  self , 
@@ -103,8 +99,6 @@ class ios_baseUITests: XCTestCase {
10399  } 
104100
105101  func  testSignInFailure( )  { 
106-     app. launch ( ) 
107-     
108102    networkMocker. stub ( with:  . signIn( success:  false ) ,  method:  . POST) 
109103
110104    app. attemptSignIn ( in:  self , 
@@ -122,8 +116,6 @@ class ios_baseUITests: XCTestCase {
122116  } 
123117
124118  func  testSignInValidations( )  { 
125-     app. launch ( ) 
126-     
127119    app. buttons [ " GoToSignInButton " ] . forceTap ( ) 
128120
129121    let  toolbarDoneButton  =  app. buttons [ " Toolbar Done Button " ] 
0 commit comments