// Story's settings, organised as Comms' You (owner, 23 Nov 2026; shared/DECISIONS.md): the profile // card, Look, Sync, Storage, Help and feedback and About, in that order, each saying how it // stands and opening its own page, Back returning to the list; Sign out on Profile alone. Storage's // parts and Free up space, Share a report shown whole first, and About's facts stand on their pages. // At the default text size and the largest. import XCTest final class StorySettingsTests: XCTestCase { override func setUp() { continueAfterFailure = false } @MainActor private func launched(_ extra: [String] = []) -> XCUIApplication { StoryUI.launch(["-story-ink-open", "settings"] + extra) } // RULE: the card, then Look, Sync, Storage, Help and feedback and About, in that order. @MainActor func testSettingsAreGroupedAsComms() { SettingsGroupedUI.assertList(launched(), own: ["look"]) } // RULE: each row opens its own page and Back returns to the list; Sign out stands on Profile. @MainActor func testEachRowOpensItsPage() { SettingsGroupedUI.assertPages(launched(), backID: "story-settings-back") } // RULE: Share a report shows the whole report first; Close closes it with nothing shared. @MainActor func testShareAReportShowsTheReportFirst() { SettingsGroupedUI.assertReportShownFirst(launched()) } // RULE (store pass, 24 Nov 2026): Help and feedback ends with Privacy policy and Help and contact; the policy opens. @MainActor func testThePrivacyPolicyOpensFromHelp() { SettingsGroupedUI.assertPrivacyOpens(launched()) } // RULE: at the largest text every row still stands, each page opens, and the report's Close and Share stay in the window. @MainActor func testSettingsAtTheLargestText() { let app = launched(SettingsPartsUI.largestText) SettingsGroupedUI.assertList(app, own: ["look"]) SettingsGroupedUI.assertPages(app, backID: "story-settings-back") } // RULE: the whole list draws on the first frame from what this phone holds; the read fills values in place. @MainActor func testTheListDrawsWholeAtOnce() { SettingsGroupedUI.assertDrawnWhole({ self.launched($0) }, own: ["look"]) } }