Cotton code
39 lines · 2.1 KB · SwiftRaw
// Your Claude asks in Comms's own sheet (shared/DECISIONS.md "Your Claude asks"; Shared/UnlockAskUI.swift): plain// words and no table, Let me choose and its groups, the lengths of a timed card, the foot in sight at the largest text,// and a tap above putting it aside until the app is next opened. Invented requests; nothing is sent.import XCTestfinal class ChatUnlockAskTests: XCTestCase {    override func setUp() { continueAfterFailure = false }    @MainActor private func launched(_ which: String, _ more: [String] = []) -> XCUIApplication {        let extra = UnlockAskUI.seed(which) + more        return {            let app = XCUIApplication()            app.launchArguments += ["-chat-warm-seed", "YES"] + extra            app.launch()            return app        }()    }    // RULE: the card for your Claude is Comms's own sheet in plain words, no table named; Not now answers it.    @MainActor func testTheCardSpeaksPlainly() { UnlockAskUI.assertPlainWords(launched("account")) }    // RULE: Let me choose opens the groups; Allow is off while none is ticked.    @MainActor func testLetMeChooseOpensTheGroups() { UnlockAskUI.assertChoosing(launched("timed")) }    // RULE: a group's line stands on one line where it fits (Scripts as Photos).    @MainActor func testTheGroupsLinesStandWhole() { UnlockAskUI.assertScriptsOnOneLine(launched("groups")) }    // RULE: several of his own machines waiting: one Allow all, the card naming them in plain words.    @MainActor func testAllowAllForHisOwnMachines() { UnlockAskUI.assertAllowAll(launched("several")) }    // RULE: a timed card offers its lengths; Not now and Allow stay in sight at the largest text.    @MainActor func testTheLengthsAndTheFootAtTheLargestText() {        UnlockAskUI.assertLengths(launched("timed", ["-UIPreferredContentSizeCategoryName", "UICTContentSizeCategoryAccessibilityXXXL"]))    }    // RULE: a tap above puts the card aside, nothing answered; opened again, it rises again.    @MainActor func testATapAbovePutsItAside() { UnlockAskUI.assertAside { self.launched("account") } }}