fix(print): enumerate all EPIJ_Qual quality options (#180) #194

Merged
gronod merged 1 commits from feat/180-epson-qual-options into milestone/m11-print-settings 2026-09-15 19:07:19 +01:00
Owner

Refs #180

Summary

Phase 2 of M11. Issue #180's errata (E2) confirmed the real enumeration
blockers — no quality extraction in capabilities(from:ppd:) and no
detection roster — were both fixed by #183 in Phase 1. This branch
therefore lands fixture realism + proof tests only: zero production
code changes.

  • CupsParserTests: the pre-M11 synthetic cupsPrintQuality: Draft *Normal High
    listing is replaced by the recorded Epson XP-55 line
    EPIJ_Qual/Print Quality: 301 302 *303 308 304 305 307 (driver order —
    308 between 303 and 304, no 306 exists). Assertions now cover all
    seven ids in fixture order, qualityDefault == "303", the full
    seven-line XP-55 PPD fragment (Fast Economy, Economy, Normal, Draft,
    Fine, Quality, Best Quality), and detection preferring EPIJ_Qual
    over OutputMode/Resolution on an Epson-shaped listing (R11).
  • CupsOptionsFilterTests: captured EPIJ_Qual=304 and the canonical
    quality keys survive filter() — roster verified complete post-#183
    (EPIJ_Qual, CNIJPrintQuality, PrintQuality all present;
    EPIJ_Quality kept as harmless capture alias, R16).
  • LpArgsTests: explicit quality "305" emits -o EPIJ_Qual=305
    (captured EPIJ_Qual= still suppresses the emit — covered by the
    existing testCapturedWinsQuality).
  • PrintSessionViewModelTests + Tests/ICCeryUITests/Fixtures/bin/lpoptions:
    the recorded seven-choice line feeds the view model and the Stage 2
    picker; new UI test asserts the picker lists all seven entries in
    driver order.

No source changes: CupsOptionsFilter.relevantKeys,
CupsParsers.qualityKeys, capabilities(from:ppd:), and LpArgs
quality emission were verified complete on the milestone tip
(51c3073) — adding them again would be a no-op re-edit.

Test gate

xcodegen generate --spec project.yml && xcodebuild test \
  -scheme ICCery -destination 'platform=macOS' \
  -derivedDataPath build/DerivedData-feat-180-epson-qual-options \
  ARCHS="$(uname -m)" CODE_SIGNING_ALLOWED=YES CODE_SIGN_IDENTITY='-' \
  -only-testing:ICCeryCoreTests/CupsParserTests \
  -only-testing:ICCeryCoreTests/CupsOptionsFilterTests \
  -only-testing:ICCeryCoreTests/LpArgsTests \
  -only-testing:ICCeryCoreTests/PrintSessionViewModelTests \
  -only-testing:ICCeryUITests/Milestone11PrintSettingsUITests \
  -only-testing:ICCeryUITests/Milestone3UITests

Targeted gate (x86_64, macOS 15.2 SDK):

  • CupsParserTests: 15 passed, 0 failures
  • CupsOptionsFilterTests: 6 passed, 0 failures
  • LpArgsTests: 14 passed, 0 failures
  • PrintSessionViewModelTests: 8 passed, 0 failures
  • Milestone11PrintSettingsUITests: 4 executed —
    testPanelResultAppliesBackToPickers flaked once
    (printNotificationText existence; the unchanged env-stubbed panel
    path) and passed on the single allowed rerun (R2); the new
    testQualityPickerListsAllSevenDriverOptions passed first try
  • Milestone3UITests: 6 passed, 0 failures

Wider pre-merge core suite (-only-testing:ICCeryCoreTests):
468 tests, 0 failures.

Notes

  • Refs, not Fixes — issue closure is deferred to Phase 5 per the
    M11 plan.
  • No UI changes, no locale/PPD-label precedence work (#181), no panel
    capture-return changes (#186), CNIJPrintMode2/CNIJPQualitySlider
    remain deferred (#16).
  • git diff --check clean; diff touches test files and the UI fixture
    script only.
Refs #180 ## Summary Phase 2 of M11. Issue #180's errata (E2) confirmed the real enumeration blockers — no quality extraction in `capabilities(from:ppd:)` and no detection roster — were both fixed by #183 in Phase 1. This branch therefore lands **fixture realism + proof tests only**: zero production code changes. - `CupsParserTests`: the pre-M11 synthetic `cupsPrintQuality: Draft *Normal High` listing is replaced by the recorded Epson XP-55 line `EPIJ_Qual/Print Quality: 301 302 *303 308 304 305 307` (driver order — 308 between 303 and 304, no 306 exists). Assertions now cover all seven ids in fixture order, `qualityDefault == "303"`, the full seven-line XP-55 PPD fragment (Fast Economy, Economy, Normal, Draft, Fine, Quality, Best Quality), and detection preferring `EPIJ_Qual` over `OutputMode`/`Resolution` on an Epson-shaped listing (R11). - `CupsOptionsFilterTests`: captured `EPIJ_Qual=304` and the canonical quality keys survive `filter()` — roster verified complete post-#183 (`EPIJ_Qual`, `CNIJPrintQuality`, `PrintQuality` all present; `EPIJ_Quality` kept as harmless capture alias, R16). - `LpArgsTests`: explicit quality `"305"` emits `-o EPIJ_Qual=305` (captured `EPIJ_Qual=` still suppresses the emit — covered by the existing `testCapturedWinsQuality`). - `PrintSessionViewModelTests` + `Tests/ICCeryUITests/Fixtures/bin/lpoptions`: the recorded seven-choice line feeds the view model and the Stage 2 picker; new UI test asserts the picker lists all seven entries in driver order. No source changes: `CupsOptionsFilter.relevantKeys`, `CupsParsers.qualityKeys`, `capabilities(from:ppd:)`, and `LpArgs` quality emission were verified complete on the milestone tip (51c3073) — adding them again would be a no-op re-edit. ## Test gate ``` xcodegen generate --spec project.yml && xcodebuild test \ -scheme ICCery -destination 'platform=macOS' \ -derivedDataPath build/DerivedData-feat-180-epson-qual-options \ ARCHS="$(uname -m)" CODE_SIGNING_ALLOWED=YES CODE_SIGN_IDENTITY='-' \ -only-testing:ICCeryCoreTests/CupsParserTests \ -only-testing:ICCeryCoreTests/CupsOptionsFilterTests \ -only-testing:ICCeryCoreTests/LpArgsTests \ -only-testing:ICCeryCoreTests/PrintSessionViewModelTests \ -only-testing:ICCeryUITests/Milestone11PrintSettingsUITests \ -only-testing:ICCeryUITests/Milestone3UITests ``` Targeted gate (x86_64, macOS 15.2 SDK): - `CupsParserTests`: 15 passed, 0 failures - `CupsOptionsFilterTests`: 6 passed, 0 failures - `LpArgsTests`: 14 passed, 0 failures - `PrintSessionViewModelTests`: 8 passed, 0 failures - `Milestone11PrintSettingsUITests`: 4 executed — `testPanelResultAppliesBackToPickers` flaked once (`printNotificationText` existence; the unchanged env-stubbed panel path) and **passed on the single allowed rerun** (R2); the new `testQualityPickerListsAllSevenDriverOptions` passed first try - `Milestone3UITests`: 6 passed, 0 failures Wider pre-merge core suite (`-only-testing:ICCeryCoreTests`): **468 tests, 0 failures.** ## Notes - `Refs`, not `Fixes` — issue closure is deferred to Phase 5 per the M11 plan. - No UI changes, no locale/PPD-label precedence work (#181), no panel capture-return changes (#186), `CNIJPrintMode2`/`CNIJPQualitySlider` remain deferred (#16). - `git diff --check` clean; diff touches test files and the UI fixture script only.
gronod added 1 commit 2026-09-15 19:07:11 +01:00
fix(print): enumerate all EPIJ_Qual quality options (#180)
macOS CI / build-and-test (push) Skipped
79209eb911
The Phase 1 (#183) quality plumbing already covers detection,
extraction, capture, and lp emission — this change proves the Epson
path end-to-end with recorded fixtures.

- CupsParserTests: replace the synthetic cupsPrintQuality listing with
  the recorded XP-55 line (301 302 *303 308 304 305 307 — driver order,
  308 between 303 and 304); assert all seven ids enumerate unsorted,
  the * default is 303, all seven PPD labels resolve, and EPIJ_Qual
  wins detection over OutputMode/Resolution (R11).
- CupsOptionsFilterTests: captured EPIJ_Qual + canonical quality keys
  survive the filter (roster verified complete post-#183 — no source
  change needed; EPIJ_Quality kept as harmless alias, R16).
- LpArgsTests: explicit quality 305 emits -o EPIJ_Qual=305.
- PrintSessionViewModelTests + UI lpoptions fixture: recorded
  seven-choice line feeds the picker; Stage 2 picker lists all seven
  entries in driver order (new UI test).

Devin-AI: Devin <devin@cognition.ai>
Co-authored-by: Devin <devin@cognition.ai>
gronod self-assigned this 2026-09-15 19:07:14 +01:00
gronod added this to the M11 — Printer settings completeness & dialog binding milestone 2026-09-15 19:07:14 +01:00
gronod added the Kind/Bug
Priority
Critical
1
Project/ICCery-v2Bug/Backend
labels 2026-09-15 19:07:14 +01:00
gronod merged commit c9b423b229 into milestone/m11-print-settings 2026-09-15 19:07:19 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: gronod/iccery-v2-mac#194