refactor: move rule editor actions into the navigation bar
- Both editor modes commit via a checkmark confirmation button (role: .confirm) in the navigation bar — accessibility labels 'Add Rule' (create) and 'Done' (edit); replaces the bottom 'Add Rule' button, so nothing floats over the form anymore - Edit mode gains an ellipsis 'Rule Actions' menu next to the checkmark holding Disable/Enable Rule and destructive Delete Rule; the red form rows are removed - Tests pin the checkmark to the navigation bar with its label and drive disable/delete through the menu; the swipe-to-reach workarounds are gone. 95 passing - Spec §6 updated
This commit is contained in:
@@ -22,8 +22,11 @@ final class RuleCreationUITests: XCTestCase {
|
||||
XCTAssertEqual(app.staticTexts["ruleEditorTitle"].waitToAppear().label, "In the Zone")
|
||||
XCTAssertTrue(app.staticTexts["During this time"].exists)
|
||||
|
||||
// Hold to commit saves the rule and returns home.
|
||||
app.buttons["commitRuleButton"].waitToAppear().tap()
|
||||
// The confirmation checkmark lives in the navigation bar and carries
|
||||
// a descriptive accessibility label.
|
||||
let commit = app.navigationBars.buttons["commitRuleButton"].waitToAppear()
|
||||
XCTAssertEqual(commit.label, "Add Rule")
|
||||
commit.tap()
|
||||
app.buttons["ruleCard-In the Zone"].waitToAppear()
|
||||
XCTAssertFalse(app.element("emptyRulesCard").exists)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user