UI test: Manage Media Apply missing printer never sees noticeText behind the sheet #170

Closed
opened 2026-09-14 14:34:44 +01:00 by gronod · 0 comments
Owner

Summary

Milestone10MediaLibraryUITests.testManageApplyMissingPrinterShowsBanner failed the develop → main CI run (35190):

Milestone10MediaLibraryUITests.swift:90: XCTAssertTrue failed - Expected element noticeText

Unit tests for the same apply path passed (testApplyMissingQueueLeavesQueueUntouched). This is not a missing-printer logic regression.

Root cause

Failed Apply in Manage Media Recipes keeps the sheet open (applyAndDismiss only dismisses on success). The banner (NoticeBanner / noticeText) is on the main window, behind that sheet.

On the Monterey / Xcode 14.2 runner, XCTest does not expose the occluded banner, so waitFor("noticeText") times out after 10s even though showNotice("Printer … is not installed.") ran.

A slower second enumeratePrinters() (or a duplicateID clash with the launch-time CUPS list) can also delay the notice past that timeout; the log never showed noticeText at all.

Expected

After Apply on recipe fixture-missing-queue (queue No_Such_Queue):

  • Manage sheet stays open
  • The operator can read "Printer Missing Queue is not installed." without dismissing the sheet
  • The UI test can find that text (sheet-local identifier, not the occluded window banner)

Fix

Surface the apply failure inside #manageMediaDialog (same string as the window banner) with a stable accessibility id, and point the UI test at that.

Evidence

## Summary `Milestone10MediaLibraryUITests.testManageApplyMissingPrinterShowsBanner` failed the `develop` → `main` CI run ([35190](https://git.i3omb.com/gronod/iccery-v2-mac/actions/runs/35190/jobs/36512)): ``` Milestone10MediaLibraryUITests.swift:90: XCTAssertTrue failed - Expected element noticeText ``` Unit tests for the same apply path passed (`testApplyMissingQueueLeavesQueueUntouched`). This is not a missing-printer logic regression. ## Root cause Failed **Apply** in Manage Media Recipes keeps the sheet open (`applyAndDismiss` only dismisses on success). The banner (`NoticeBanner` / `noticeText`) is on the **main window**, behind that sheet. On the Monterey / Xcode 14.2 runner, XCTest does not expose the occluded banner, so `waitFor("noticeText")` times out after 10s even though `showNotice("Printer … is not installed.")` ran. A slower second `enumeratePrinters()` (or a `duplicateID` clash with the launch-time CUPS list) can also delay the notice past that timeout; the log never showed `noticeText` at all. ## Expected After Apply on recipe `fixture-missing-queue` (queue `No_Such_Queue`): - Manage sheet stays open - The operator can **read** "Printer Missing Queue is not installed." without dismissing the sheet - The UI test can find that text (sheet-local identifier, not the occluded window banner) ## Fix Surface the apply failure inside `#manageMediaDialog` (same string as the window banner) with a stable accessibility id, and point the UI test at that. ## Evidence - Job: https://git.i3omb.com/gronod/iccery-v2-mac/actions/runs/35190/jobs/36512 - Click on `btnMediaLibraryApply-fixture-missing-queue` succeeded; `noticeText` never appeared
gronod added the Bug/UIKind/BugKind/Testing
Priority
High
2
labels 2026-09-14 14:37:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#170