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:
2026-06-12 16:29:32 -04:00
parent 4ee8f01d21
commit af919c1585
4 changed files with 50 additions and 50 deletions

View File

@@ -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)
}