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 Oct 26, 2022
1 parent a7ba2e1 commit 3331209
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions iosApp/Survey.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
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 */; };
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 */; };
Expand Down Expand Up @@ -116,6 +117,7 @@
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>"; };
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 @@ -230,12 +232,21 @@
09495F7228FFF2C40036BDFB /* SurveySelection */ = {
isa = PBXGroup;
children = (
09495F93290945C50036BDFB /* SurveyHeader */,
09495F7328FFF2C40036BDFB /* SurveySelectionView.swift */,
09495F7428FFF2C40036BDFB /* SurveyItemView.swift */,
);
path = SurveySelection;
sourceTree = "<group>";
};
09495F93290945C50036BDFB /* SurveyHeader */ = {
isa = PBXGroup;
children = (
09495F94290945C50036BDFB /* SurveyHeaderView.swift */,
);
path = SurveyHeader;
sourceTree = "<group>";
};
09636AEF28D4777E00A5CB97 /* Fonts */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1122,6 +1133,7 @@
09636B0D28D4917200A5CB97 /* OverlayButton.swift in Sources */,
686B2C185816765B3E124776 /* IOSApp.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
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 @@ -63,6 +63,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 3331209

Please sign in to comment.