Skip to content

Commit

Permalink
Try UI tests app launch
Browse files Browse the repository at this point in the history
  • Loading branch information
glm4 committed Sep 5, 2022
1 parent ed37623 commit d5fd7e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
15 changes: 3 additions & 12 deletions ios-baseUITests/ios_baseUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import XCTest

class ios_baseUITests: XCTestCase {

var app: XCUIApplication!

let networkMocker = NetworkMocker()
Expand All @@ -18,7 +18,8 @@ class ios_baseUITests: XCTestCase {
try super.setUpWithError()
app = XCUIApplication()
app.launchArguments = ["Automation Test"]

app.launch()

try networkMocker.setUp()
networkMocker.stub(with: .logOut, method: .DELETE)
app.logOutIfNeeded(in: self)
Expand All @@ -30,8 +31,6 @@ class ios_baseUITests: XCTestCase {
}

func testCreateAccountValidations() {
app.launch()

app.buttons["GoToSignUpButton"].forceTap()

let toolbarDoneButton = app.buttons["Toolbar Done Button"]
Expand Down Expand Up @@ -66,8 +65,6 @@ class ios_baseUITests: XCTestCase {
}

func testAccountCreation() {
app.launch()

networkMocker.stub(with: .signUp(success: true), method: .POST)

app.attemptSignUp(
Expand All @@ -90,8 +87,6 @@ class ios_baseUITests: XCTestCase {
}

func testSignInSuccess() {
app.launch()

networkMocker.stub(with: .signIn(success: true), method: .POST)

app.attemptSignIn(in: self,
Expand All @@ -103,8 +98,6 @@ class ios_baseUITests: XCTestCase {
}

func testSignInFailure() {
app.launch()

networkMocker.stub(with: .signIn(success: false), method: .POST)

app.attemptSignIn(in: self,
Expand All @@ -122,8 +115,6 @@ class ios_baseUITests: XCTestCase {
}

func testSignInValidations() {
app.launch()

app.buttons["GoToSignInButton"].forceTap()

let toolbarDoneButton = app.buttons["Toolbar Done Button"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class UserServiceUnitTests: XCTestCase {
testUserStorageAfterProfileFetch(success: false) { result in
switch result {
case .success:
XCTFail("Test expected to fail")
XCTFail("GET Profile Request expected to fail")
case .failure(let error):
expectation.fulfill()
XCTAssertNil(UserDataManager.currentUser)
Expand Down

0 comments on commit d5fd7e9

Please sign in to comment.