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

@@ -47,10 +47,12 @@ final class RuleManagementUITests: XCTestCase {
app.buttons["ruleCard-Sleep"].waitToAppear().tap()
app.buttons["editRuleButton"].waitToAppear().tap()
// The disable/delete rows sit at the bottom of the form.
app.staticTexts["ruleEditorTitle"].waitToAppear()
app.swipeUp()
app.buttons["toggleEnabledButton"].waitToAppear().tap()
// Disable lives in the ellipsis menu in the navigation bar.
let actionsMenu = app.navigationBars.buttons["ruleActionsMenu"].waitToAppear()
XCTAssertEqual(actionsMenu.label, "Rule Actions")
actionsMenu.tap()
app.buttons["Disable Rule"].waitToAppear().tap()
// The detail caption now reports the rule as disabled.
let status = app.staticTexts["detailStatusLabel"].waitToAppear()
@@ -66,10 +68,10 @@ final class RuleManagementUITests: XCTestCase {
app.buttons["ruleCard-Sleep"].waitToAppear().tap()
app.buttons["editRuleButton"].waitToAppear().tap()
// The disable/delete rows sit at the bottom of the form.
app.staticTexts["ruleEditorTitle"].waitToAppear()
app.swipeUp()
app.buttons["deleteRuleButton"].waitToAppear().tap()
// Delete lives in the ellipsis menu in the navigation bar.
app.navigationBars.buttons["ruleActionsMenu"].waitToAppear().tap()
app.buttons["Delete Rule"].waitToAppear().tap()
app.buttons["newRuleButton"].waitToAppear()
XCTAssertFalse(