Skip to content

Commit

Permalink
appointment test
Browse files Browse the repository at this point in the history
  • Loading branch information
akanshyabhat committed Mar 8, 2024
1 parent 4e853eb commit ff7a37f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PICS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
864909422B8AA1C300054C9A /* TrailMakingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 864909412B8AA1C300054C9A /* TrailMakingTest.swift */; };
8649094A2B8AB65600054C9A /* TimelineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 864909492B8AB65600054C9A /* TimelineView.swift */; };
86EB7FF72B8FB7A000D52EE2 /* NotificationPermissions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86EB7FF62B8FB7A000D52EE2 /* NotificationPermissions.swift */; };
86EF04BE2B9B1661005596D8 /* AppointmentsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86EF04BD2B9B1661005596D8 /* AppointmentsTests.swift */; };
86F62AF62B916B670075F23C /* AppointmentInformation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86F62AF52B916B670075F23C /* AppointmentInformation.swift */; };
9733CFC62A8066DE001B7ABC /* SpeziOnboarding in Frameworks */ = {isa = PBXBuildFile; productRef = 2FE5DC8029EDD91D004B9AB4 /* SpeziOnboarding */; };
9739A0C62AD7B5730084BEA5 /* FirebaseStorage in Frameworks */ = {isa = PBXBuildFile; productRef = 9739A0C52AD7B5730084BEA5 /* FirebaseStorage */; };
Expand Down Expand Up @@ -204,6 +205,7 @@
864909412B8AA1C300054C9A /* TrailMakingTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrailMakingTest.swift; sourceTree = "<group>"; };
864909492B8AB65600054C9A /* TimelineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineView.swift; sourceTree = "<group>"; };
86EB7FF62B8FB7A000D52EE2 /* NotificationPermissions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationPermissions.swift; sourceTree = "<group>"; };
86EF04BD2B9B1661005596D8 /* AppointmentsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppointmentsTests.swift; sourceTree = "<group>"; };
86F62AF52B916B670075F23C /* AppointmentInformation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppointmentInformation.swift; sourceTree = "<group>"; };
A403A52D2B705A8C003CFA5C /* HealthVisualizationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HealthVisualizationTests.swift; sourceTree = "<group>"; };
A40559A32B98204C00221783 /* HKVizUnitTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HKVizUnitTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -451,6 +453,7 @@
A403A52D2B705A8C003CFA5C /* HealthVisualizationTests.swift */,
74AE05922B98620300AB5287 /* AssessmentsTests.swift */,
862AB7F52B9AA6460048D158 /* ContactsTests.swift */,
86EF04BD2B9B1661005596D8 /* AppointmentsTests.swift */,
);
path = PICSUITests;
sourceTree = "<group>";
Expand Down Expand Up @@ -801,6 +804,7 @@
A403A52E2B705A8C003CFA5C /* HealthVisualizationTests.swift in Sources */,
74AE05932B98620300AB5287 /* AssessmentsTests.swift in Sources */,
2F4E237E2989A2FE0013F3D9 /* LaunchTests.swift in Sources */,
86EF04BE2B9B1661005596D8 /* AppointmentsTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
31 changes: 31 additions & 0 deletions PICSUITests/AppointmentsTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// This source file is part of the PICS based on the Stanford Spezi Template Application project
//
// SPDX-FileCopyrightText: 2024 Stanford University
//
// SPDX-License-Identifier: MIT
//

import XCTest


class AppoinmentsTests: XCTestCase {
override func setUpWithError() throws {
try super.setUpWithError()

continueAfterFailure = false

let app = XCUIApplication()
app.launchArguments = ["--skipOnboarding"]
app.launch()
}

func testApplicationLaunch() throws {
let app = XCUIApplication()
// checks that you can access the tab and view renders
XCTAssertTrue(app.buttons["Appointments"].waitForExistence(timeout: 2))
app.buttons["Appointments"].tap()
// checks contents of tab
XCTAssertTrue(app.staticTexts["Getting Here"].waitForExistence(timeout: 2))
}
}

0 comments on commit ff7a37f

Please sign in to comment.