Skip to content

Commit

Permalink
[#20] Add survey header uitest
Browse files Browse the repository at this point in the history
  • Loading branch information
blyscuit committed Nov 14, 2022
1 parent b8b6411 commit 19f2a57
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 40 deletions.
47 changes: 14 additions & 33 deletions iosApp/Survey.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,23 @@

/* Begin PBXBuildFile section */
09495F6628FF97080036BDFB /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F6528FF97070036BDFB /* SplashView.swift */; };
09495F6828FF97490036BDFB /* ViewId+Splash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F6728FF97490036BDFB /* ViewId+Splash.swift */; };
09495F7528FFF2C50036BDFB /* SurveySelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F7328FFF2C40036BDFB /* SurveySelectionView.swift */; };
09495F7628FFF2C50036BDFB /* SurveyItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F7428FFF2C40036BDFB /* SurveyItemView.swift */; };
09495F7828FFF2D50036BDFB /* ViewId+SurveySelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F7728FFF2D50036BDFB /* ViewId+SurveySelection.swift */; };
09495F7B28FFF4340036BDFB /* FadePaginationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F7928FFF4340036BDFB /* FadePaginationView.swift */; };
09495F7C28FFF4340036BDFB /* PageControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F7A28FFF4340036BDFB /* PageControlView.swift */; };
09495F7E28FFF47F0036BDFB /* GestureVelocity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F7D28FFF47F0036BDFB /* GestureVelocity.swift */; };
09495F7F2900017E0036BDFB /* ViewId+SurveySelection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F7728FFF2D50036BDFB /* ViewId+SurveySelection.swift */; };
09495F95290945C50036BDFB /* SurveyHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F94290945C50036BDFB /* SurveyHeaderView.swift */; };
09495FA0290A82290036BDFB /* LoginFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F9F290A82290036BDFB /* LoginFlow.swift */; };
09495FA3290A823C0036BDFB /* SurveySelectionScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495FA2290A823C0036BDFB /* SurveySelectionScreen.swift */; };
09495FC9291106A00036BDFB /* Constants+SystemImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495FC8291106A00036BDFB /* Constants+SystemImage.swift */; };
09495FCB291107760036BDFB /* Image+Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495FCA291107760036BDFB /* Image+Constants.swift */; };
09495FCD291109450036BDFB /* CGFloat+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495FCC291109450036BDFB /* CGFloat+Extensions.swift */; };
09495FCF29110E820036BDFB /* String+URL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495FCE29110E820036BDFB /* String+URL.swift */; };
09495FA6290A82590036BDFB /* SurveySelectionSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495FA5290A82590036BDFB /* SurveySelectionSpec.swift */; };
09636AF228D4779400A5CB97 /* NeuzeitSLTStd-Book.otf in Resources */ = {isa = PBXBuildFile; fileRef = 09636AF028D4779400A5CB97 /* NeuzeitSLTStd-Book.otf */; };
09636AF328D4779400A5CB97 /* NeuzeitSLTStd-BookHeavy.otf in Resources */ = {isa = PBXBuildFile; fileRef = 09636AF128D4779400A5CB97 /* NeuzeitSLTStd-BookHeavy.otf */; };
09636AF628D47A1500A5CB97 /* R.generated.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09636AF528D47A1400A5CB97 /* R.generated.swift */; };
09636AF928D47A4D00A5CB97 /* Font+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09636AF828D47A4D00A5CB97 /* Font+Extensions.swift */; };
09636AFD28D484CA00A5CB97 /* R+SwiftUI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09636AFC28D484CA00A5CB97 /* R+SwiftUI.swift */; };
09636B0028D4860F00A5CB97 /* PrimaryTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09636AFF28D4860F00A5CB97 /* PrimaryTextField.swift */; };
09636B0228D4876100A5CB97 /* PrimaryButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09636B0128D4876100A5CB97 /* PrimaryButton.swift */; };
Expand All @@ -50,6 +48,7 @@
0982A7E129222EBB00FC1976 /* ViewId+Splash.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F6728FF97490036BDFB /* ViewId+Splash.swift */; };
0982A7E329222EFF00FC1976 /* RouteCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0982A7E229222EFF00FC1976 /* RouteCoordinator.swift */; };
0982A7E429222F2000FC1976 /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09495F6E28FFDE8C0036BDFB /* LoginView.swift */; };
0982A7E72922357C00FC1976 /* Font+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09636AF828D47A4D00A5CB97 /* Font+Extensions.swift */; };
09CE770C28E191B400EAA9EE /* AppCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE770B28E191B400EAA9EE /* AppCoordinator.swift */; };
09CE770F28E1922000EAA9EE /* Screen.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE770E28E1922000EAA9EE /* Screen.swift */; };
09CE771328E1A94600EAA9EE /* ResetPasswordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE771228E1A94600EAA9EE /* ResetPasswordView.swift */; };
Expand All @@ -59,7 +58,6 @@
09CE772328E2B87700EAA9EE /* LoadingDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE772228E2B87700EAA9EE /* LoadingDialog.swift */; };
09CE772528E2C1C600EAA9EE /* View+HideBackButtonTitle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE772428E2C1C600EAA9EE /* View+HideBackButtonTitle.swift */; };
09CE772728E2C44D00EAA9EE /* View+BackButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE772628E2C44D00EAA9EE /* View+BackButton.swift */; };
09CE773228E2ED2300EAA9EE /* LazyKoin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE772F28E2ED2300EAA9EE /* LazyKoin.swift */; };
09CE773328E2ED2300EAA9EE /* KoinApplication.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE773028E2ED2300EAA9EE /* KoinApplication.swift */; };
09CE773428E2ED2300EAA9EE /* Typealias+Koin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09CE773128E2ED2300EAA9EE /* Typealias+Koin.swift */; };
351F5715D07BB9ED3F8B15F8 /* Pods_Survey.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 315DBBA2E56D199C3AC672B5 /* Pods_Survey.framework */; };
Expand Down Expand Up @@ -135,13 +133,13 @@
09495F7928FFF4340036BDFB /* FadePaginationView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FadePaginationView.swift; sourceTree = "<group>"; };
09495F7A28FFF4340036BDFB /* PageControlView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PageControlView.swift; sourceTree = "<group>"; };
09495F7D28FFF47F0036BDFB /* GestureVelocity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GestureVelocity.swift; sourceTree = "<group>"; };
09495F94290945C50036BDFB /* SurveyHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SurveyHeaderView.swift; sourceTree = "<group>"; };
09495F9F290A82290036BDFB /* LoginFlow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoginFlow.swift; sourceTree = "<group>"; };
09495FA2290A823C0036BDFB /* SurveySelectionScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SurveySelectionScreen.swift; sourceTree = "<group>"; };
09495FC8291106A00036BDFB /* Constants+SystemImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Constants+SystemImage.swift"; sourceTree = "<group>"; };
09495FCA291107760036BDFB /* Image+Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Image+Constants.swift"; sourceTree = "<group>"; };
09495FCC291109450036BDFB /* CGFloat+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+Extensions.swift"; sourceTree = "<group>"; };
09495FCE29110E820036BDFB /* String+URL.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+URL.swift"; sourceTree = "<group>"; };
09495FA5290A82590036BDFB /* SurveySelectionSpec.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SurveySelectionSpec.swift; sourceTree = "<group>"; };
09636AF028D4779400A5CB97 /* NeuzeitSLTStd-Book.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NeuzeitSLTStd-Book.otf"; sourceTree = "<group>"; };
09636AF128D4779400A5CB97 /* NeuzeitSLTStd-BookHeavy.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NeuzeitSLTStd-BookHeavy.otf"; sourceTree = "<group>"; };
09636AF528D47A1400A5CB97 /* R.generated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = R.generated.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -266,32 +264,33 @@
09495F7228FFF2C40036BDFB /* SurveySelection */ = {
isa = PBXGroup;
children = (
09495F93290945C50036BDFB /* SurveyHeader */,
09495F7328FFF2C40036BDFB /* SurveySelectionView.swift */,
09495F7428FFF2C40036BDFB /* SurveyItemView.swift */,
);
path = SurveySelection;
sourceTree = "<group>";
};
09495F9E290A82290036BDFB /* Flows */ = {
09495F93290945C50036BDFB /* SurveyHeader */ = {
isa = PBXGroup;
children = (
09495F9F290A82290036BDFB /* LoginFlow.swift */,
09495F94290945C50036BDFB /* SurveyHeaderView.swift */,
);
path = Flows;
path = SurveyHeader;
sourceTree = "<group>";
};
09495FA1290A823C0036BDFB /* SurveySelection */ = {
09495F9E290A82290036BDFB /* Flows */ = {
isa = PBXGroup;
children = (
09495FA2290A823C0036BDFB /* SurveySelectionScreen.swift */,
09495F9F290A82290036BDFB /* LoginFlow.swift */,
);
path = SurveySelection;
path = Flows;
sourceTree = "<group>";
};
09495FA4290A82590036BDFB /* SurveySelection */ = {
09495FA1290A823C0036BDFB /* SurveySelection */ = {
isa = PBXGroup;
children = (
09495FA5290A82590036BDFB /* SurveySelectionSpec.swift */,
09495FA2290A823C0036BDFB /* SurveySelectionScreen.swift */,
);
path = SurveySelection;
sourceTree = "<group>";
Expand Down Expand Up @@ -363,23 +362,6 @@
path = Presentation;
sourceTree = "<group>";
};
09636B1128D80FB000A5CB97 /* Modules */ = {
isa = PBXGroup;
children = (
09636B1228D80FC100A5CB97 /* Login */,
09495FA4290A82590036BDFB /* SurveySelection */,
);
path = Modules;
sourceTree = "<group>";
};
09636B1228D80FC100A5CB97 /* Login */ = {
isa = PBXGroup;
children = (
09636B1A28D8215C00A5CB97 /* LoginSpec.swift */,
);
path = Login;
sourceTree = "<group>";
};
09636B1328D8146500A5CB97 /* ViewId */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1273,7 +1255,7 @@
09495FC9291106A00036BDFB /* Constants+SystemImage.swift in Sources */,
686B2C185816765B3E124776 /* IOSApp.swift in Sources */,
09CE771328E1A94600EAA9EE /* ResetPasswordView.swift in Sources */,
F860FAD5941956384AEA9646 /* Constants+API.swift in Sources */,
09495F95290945C50036BDFB /* SurveyHeaderView.swift in Sources */,
09495F7528FFF2C50036BDFB /* SurveySelectionView.swift in Sources */,
09636B3028D8267D00A5CB97 /* ViewId+General.swift in Sources */,
09636B0228D4876100A5CB97 /* PrimaryButton.swift in Sources */,
Expand Down Expand Up @@ -1302,6 +1284,7 @@
09495F7C28FFF4340036BDFB /* PageControlView.swift in Sources */,
09495F6628FF97080036BDFB /* SplashView.swift in Sources */,
870924447B8C177450E77414 /* Optional+Unwrap.swift in Sources */,
0982A7E72922357C00FC1976 /* Font+Extensions.swift in Sources */,
09CE772328E2B87700EAA9EE /* LoadingDialog.swift in Sources */,
09636AF628D47A1500A5CB97 /* R.generated.swift in Sources */,
09495F7628FFF2C50036BDFB /* SurveyItemView.swift in Sources */,
Expand All @@ -1322,9 +1305,7 @@
09CE771F28E1BB4700EAA9EE /* ResetPasswordScreen.swift in Sources */,
09495FA0290A82290036BDFB /* LoginFlow.swift in Sources */,
0982A7E129222EBB00FC1976 /* ViewId+Splash.swift in Sources */,
09495FA6290A82590036BDFB /* SurveySelectionSpec.swift in Sources */,
09636B2128D821EA00A5CB97 /* ViewId.swift in Sources */,
09495F6A28FFAFA20036BDFB /* ViewId+Splash.swift in Sources */,
09495FA0290A82290036BDFB /* LoginFlow.swift in Sources */,
09495F7F2900017E0036BDFB /* ViewId+SurveySelection.swift in Sources */,
09636B3628D8285700A5CB97 /* KeyboardScreen.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,3 @@ extension RouteCoordinator: LoginCoordinator {
routes = [.root(.surveySelection)]
}
}

extension RouteCoordinator: LoginCoordinator {

func showSurvey() {
routes = [.root(.surveySelection)]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import SwiftUI

struct SurveyHeaderView: View {

var body: some View {
VStack(alignment: .leading, spacing: 4.0) {
// TODO: Use real data from ViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ struct SurveySelectionView: View {

VStack {
SurveyHeaderView()
.accessibility(.surveySelection(.header))
Spacer()
HStack {
Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ extension ViewId {
case titleText = "survey.selection.title.text"
case detailText = "survey.selection.detail.text"
case mainImage = "survey.selection.main.image"
case header = "survey.selection.header.view"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ final class SurveySelectionSpec: QuickSpec {

let nextButton = surveySelectionScreen.find(\.buttons, with: .nextButton)
expect(nextButton.exists) == true

let headerView = surveySelectionScreen.find(\.staticTexts, with: .header)
expect(headerView.exists) == true
}
}
}
Expand Down

0 comments on commit 19f2a57

Please sign in to comment.