Add 3 passing UI tests (batch 5): heatmap, reduce motion, high contrast
- TC-148: Year View heatmap grid renders with data (added accessibility ID) - TC-143: App navigable with Reduce Motion enabled - TC-144: App navigable with High Contrast mode enabled - Marked 89 blocked tests RED in QA spreadsheet Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
06E4767B5977FAC8B644FC92 /* IntegrationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CFAE86F485C853DB3239DD9 /* IntegrationTests.swift */; };
|
||||
141C5C51CA0658F682E984F5 /* ReduceMotionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C8D04ACF01F539EA572EEB8 /* ReduceMotionTests.swift */; };
|
||||
19F8D7CA5D384E82A4BB4BCA /* YearViewHeatmapTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9475CC3818201762FA57D91 /* YearViewHeatmapTests.swift */; };
|
||||
1AB245144C89927264D16645 /* InsightsEmptyStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6988985985DE9C29CFDFA96 /* InsightsEmptyStateTests.swift */; };
|
||||
1C0DAB51279DB0FB003B1F21 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 1C0DAB50279DB0FB003B1F21 /* Localizable.xcstrings */; };
|
||||
1C0DAB52279DB0FB003B1F22 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = 1C0DAB50279DB0FB003B1F21 /* Localizable.xcstrings */; };
|
||||
@@ -72,6 +74,7 @@
|
||||
EE55550055555500EEEEEEEE /* SettingsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE55555555555555EEEEEEEE /* SettingsTests.swift */; };
|
||||
EEB21B1CAA8EAEB497BD9FB3 /* DataControllerCRUDTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5566271983AEDF1D33C34FE6 /* DataControllerCRUDTests.swift */; };
|
||||
F2A3B400000000B0C1D2E3F4 /* StabilityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2A3B4C5D6E7F8A9B0C1D2E3 /* StabilityTests.swift */; };
|
||||
F5C77B3C81A9180E138BF226 /* HighContrastTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5A135CC76572BAD0445B0DD /* HighContrastTests.swift */; };
|
||||
F6A7B8C900000000B4C5D6E7 /* EntryDeleteTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F6A7B8C9D0E1F2A3B4C5D6E7 /* EntryDeleteTests.swift */; };
|
||||
F75470AA2BA1E9EFF8F5265A /* LocalizationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 17DC4C498A1185DC831F4593 /* LocalizationTests.swift */; };
|
||||
F8A9B0C100000000B6C7D8E9 /* HeaderMoodLoggingTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8A9B0C1D2E3F4A5B6C7D8E9 /* HeaderMoodLoggingTests.swift */; };
|
||||
@@ -153,6 +156,7 @@
|
||||
21CD463209E0909393545D62 /* TrialBannerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrialBannerTests.swift; sourceTree = "<group>"; };
|
||||
29CE4110A0D8FBBAD7F92BDF /* BaseUITestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseUITestCase.swift; sourceTree = "<group>"; };
|
||||
29E2A2FC314F88244CA946BF /* StreakTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StreakTests.swift; sourceTree = "<group>"; };
|
||||
2C8D04ACF01F539EA572EEB8 /* ReduceMotionTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReduceMotionTests.swift; sourceTree = "<group>"; };
|
||||
31C2982F0B879A0C57273F0E /* SpanishLocalizationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = SpanishLocalizationTests.swift; sourceTree = "<group>"; };
|
||||
35AF32CC88B36CDFCB338F2C /* TrialExpirationTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = TrialExpirationTests.swift; sourceTree = "<group>"; };
|
||||
427CD9C91D43AB6A0302B4DD /* DayScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DayScreen.swift; sourceTree = "<group>"; };
|
||||
@@ -190,6 +194,7 @@
|
||||
D4E5F60708091011ABCDE001 /* DayViewViewModelTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DayViewViewModelTests.swift; sourceTree = "<group>"; };
|
||||
D4E5F6A7B8C9D0E1F2A3B4C5 /* MoodReplacementTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoodReplacementTests.swift; sourceTree = "<group>"; };
|
||||
D6E7F8A9B0C1D2E3F4A5B6C7 /* IconPackTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconPackTests.swift; sourceTree = "<group>"; };
|
||||
D9475CC3818201762FA57D91 /* YearViewHeatmapTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = YearViewHeatmapTests.swift; sourceTree = "<group>"; };
|
||||
DA0D74ACDD741CFA1F14F50F /* FeelsTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FeelsTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DD44444444444444DDDDDDDD /* EntryDetailTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryDetailTests.swift; sourceTree = "<group>"; };
|
||||
DD717F91BD65382B7DDFE3C4 /* VoteLogicsTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = VoteLogicsTests.swift; sourceTree = "<group>"; };
|
||||
@@ -199,6 +204,7 @@
|
||||
EE55555555555555EEEEEEEE /* SettingsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTests.swift; sourceTree = "<group>"; };
|
||||
F2A3B4C5D6E7F8A9B0C1D2E3 /* StabilityTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StabilityTests.swift; sourceTree = "<group>"; };
|
||||
F4D304CD05CC7C662CCD7DCB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F5A135CC76572BAD0445B0DD /* HighContrastTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HighContrastTests.swift; sourceTree = "<group>"; };
|
||||
F6A7B8C9D0E1F2A3B4C5D6E7 /* EntryDeleteTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryDeleteTests.swift; sourceTree = "<group>"; };
|
||||
F8A9B0C1D2E3F4A5B6C7D8E9 /* HeaderMoodLoggingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderMoodLoggingTests.swift; sourceTree = "<group>"; };
|
||||
F9A9583BE84E8DC13DB61F2B /* DeepLinkTests.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DeepLinkTests.swift; sourceTree = "<group>"; };
|
||||
@@ -442,6 +448,9 @@
|
||||
A84D4CB70B693A6CDA212035 /* PersonalityPackTests.swift */,
|
||||
31C2982F0B879A0C57273F0E /* SpanishLocalizationTests.swift */,
|
||||
C033EE00E7E7B3448FB862DA /* AccessibilityTextSizeTests.swift */,
|
||||
D9475CC3818201762FA57D91 /* YearViewHeatmapTests.swift */,
|
||||
2C8D04ACF01F539EA572EEB8 /* ReduceMotionTests.swift */,
|
||||
F5A135CC76572BAD0445B0DD /* HighContrastTests.swift */,
|
||||
);
|
||||
path = "Tests iOS";
|
||||
sourceTree = "<group>";
|
||||
@@ -851,6 +860,9 @@
|
||||
FE1A332D03B0F969BAF26CEF /* PersonalityPackTests.swift in Sources */,
|
||||
39C43652C41F5459788A604D /* SpanishLocalizationTests.swift in Sources */,
|
||||
85EF4702AE378AB3198E67D3 /* AccessibilityTextSizeTests.swift in Sources */,
|
||||
19F8D7CA5D384E82A4BB4BCA /* YearViewHeatmapTests.swift in Sources */,
|
||||
141C5C51CA0658F682E984F5 /* ReduceMotionTests.swift in Sources */,
|
||||
F5C77B3C81A9180E138BF226 /* HighContrastTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
||||
@@ -609,6 +609,7 @@ struct YearCard: View, Equatable {
|
||||
yearIndex: yearIndex,
|
||||
demoManager: demoManager
|
||||
)
|
||||
.accessibilityIdentifier(AccessibilityID.YearView.heatmap)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 16)
|
||||
}
|
||||
|
||||
@@ -87,6 +87,7 @@ enum UITestID {
|
||||
}
|
||||
|
||||
enum Year {
|
||||
static let heatmap = "year_heatmap"
|
||||
static let donutChart = "year_donut_chart"
|
||||
static let barChart = "year_bar_chart"
|
||||
static let statsSection = "year_stats_section"
|
||||
|
||||
61
Tests iOS/HighContrastTests.swift
Normal file
61
Tests iOS/HighContrastTests.swift
Normal file
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// HighContrastTests.swift
|
||||
// Tests iOS
|
||||
//
|
||||
// TC-144: App remains functional in High Contrast mode.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class HighContrastTests: BaseUITestCase {
|
||||
override var seedFixture: String? { "single_mood" }
|
||||
override var bypassSubscription: Bool { true }
|
||||
|
||||
override func setUp() {
|
||||
// Do NOT call super — we need custom accessibility launch args
|
||||
continueAfterFailure = false
|
||||
|
||||
let application = XCUIApplication()
|
||||
let args: [String] = [
|
||||
"--ui-testing", "--disable-animations",
|
||||
"--reset-state",
|
||||
"--bypass-subscription",
|
||||
"--skip-onboarding",
|
||||
"-AppleLanguages", "(en)",
|
||||
"-AppleLocale", "en_US",
|
||||
"-UIAccessibilityDarkerSystemColorsEnabled", "YES"
|
||||
]
|
||||
application.launchArguments = args
|
||||
application.launchEnvironment = ["UI_TEST_FIXTURE": "single_mood"]
|
||||
application.launch()
|
||||
app = application
|
||||
}
|
||||
|
||||
/// TC-144: App is navigable with High Contrast mode enabled.
|
||||
func testHighContrast_AppRemainsNavigable() {
|
||||
// Day tab should have content
|
||||
assertDayContentVisible()
|
||||
|
||||
captureScreenshot(name: "high_contrast_day")
|
||||
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
|
||||
// Navigate through tabs
|
||||
tabBar.tapMonth()
|
||||
XCTAssertTrue(
|
||||
tabBar.monthTab.waitForExistence(timeout: 5),
|
||||
"Month tab should work with High Contrast"
|
||||
)
|
||||
|
||||
tabBar.tapYear()
|
||||
XCTAssertTrue(
|
||||
tabBar.yearTab.waitForExistence(timeout: 5),
|
||||
"Year tab should work with High Contrast"
|
||||
)
|
||||
|
||||
let settingsScreen = tabBar.tapSettings()
|
||||
settingsScreen.assertVisible()
|
||||
|
||||
captureScreenshot(name: "high_contrast_settings")
|
||||
}
|
||||
}
|
||||
61
Tests iOS/ReduceMotionTests.swift
Normal file
61
Tests iOS/ReduceMotionTests.swift
Normal file
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// ReduceMotionTests.swift
|
||||
// Tests iOS
|
||||
//
|
||||
// TC-143: App remains functional with Reduce Motion enabled.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class ReduceMotionTests: BaseUITestCase {
|
||||
override var seedFixture: String? { "single_mood" }
|
||||
override var bypassSubscription: Bool { true }
|
||||
|
||||
override func setUp() {
|
||||
// Do NOT call super — we need custom accessibility launch args
|
||||
continueAfterFailure = false
|
||||
|
||||
let application = XCUIApplication()
|
||||
let args: [String] = [
|
||||
"--ui-testing", "--disable-animations",
|
||||
"--reset-state",
|
||||
"--bypass-subscription",
|
||||
"--skip-onboarding",
|
||||
"-AppleLanguages", "(en)",
|
||||
"-AppleLocale", "en_US",
|
||||
"-UIReduceMotionPreference", "YES"
|
||||
]
|
||||
application.launchArguments = args
|
||||
application.launchEnvironment = ["UI_TEST_FIXTURE": "single_mood"]
|
||||
application.launch()
|
||||
app = application
|
||||
}
|
||||
|
||||
/// TC-143: App is navigable with Reduce Motion enabled.
|
||||
func testReduceMotion_AppRemainsNavigable() {
|
||||
// Day tab should have content
|
||||
assertDayContentVisible()
|
||||
|
||||
captureScreenshot(name: "reduce_motion_day")
|
||||
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
|
||||
// Navigate through tabs
|
||||
tabBar.tapMonth()
|
||||
XCTAssertTrue(
|
||||
tabBar.monthTab.waitForExistence(timeout: 5),
|
||||
"Month tab should work with Reduce Motion"
|
||||
)
|
||||
|
||||
tabBar.tapYear()
|
||||
XCTAssertTrue(
|
||||
tabBar.yearTab.waitForExistence(timeout: 5),
|
||||
"Year tab should work with Reduce Motion"
|
||||
)
|
||||
|
||||
let settingsScreen = tabBar.tapSettings()
|
||||
settingsScreen.assertVisible()
|
||||
|
||||
captureScreenshot(name: "reduce_motion_settings")
|
||||
}
|
||||
}
|
||||
37
Tests iOS/YearViewHeatmapTests.swift
Normal file
37
Tests iOS/YearViewHeatmapTests.swift
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// YearViewHeatmapTests.swift
|
||||
// Tests iOS
|
||||
//
|
||||
// TC-148: Year View heatmap grid renders with data.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
final class YearViewHeatmapTests: BaseUITestCase {
|
||||
override var seedFixture: String? { "week_of_moods" }
|
||||
override var bypassSubscription: Bool { true }
|
||||
|
||||
/// TC-148: Year View heatmap grid is visible and rendered.
|
||||
func testYearView_HeatmapRendered() {
|
||||
let tabBar = TabBarScreen(app: app)
|
||||
tabBar.tapYear()
|
||||
|
||||
XCTAssertTrue(tabBar.yearTab.isSelected, "Year tab should be selected")
|
||||
|
||||
// Heatmap grid should be visible
|
||||
let heatmap = app.element(UITestID.Year.heatmap)
|
||||
XCTAssertTrue(
|
||||
heatmap.waitForExistence(timeout: 8),
|
||||
"Year View heatmap grid should be visible with data"
|
||||
)
|
||||
|
||||
// Stats section should also be visible (has data)
|
||||
let statsSection = app.element(UITestID.Year.statsSection)
|
||||
XCTAssertTrue(
|
||||
statsSection.waitForExistence(timeout: 5),
|
||||
"Year stats section should be visible"
|
||||
)
|
||||
|
||||
captureScreenshot(name: "year_heatmap_rendered")
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Reference in New Issue
Block a user