test(printers): repair speed + AMS load/unload tests after #1661 refactor

PR #1661 swapped the visible speed badge ("100%") for an icon-only Gauge
  button and replaced the kebab "Slot options" button with hover-card
  actions inside FilamentHoverCard. The two existing test files weren't
  updated alongside the refactor and stayed broken on dev.

  - Add data-testid="speed-control" to the Gauge button and rewrite the
    Speed tests around it; assertions on the percentage text are gone
    because that text no longer renders. Parametrize the four-mode API
    call test.
  - Add data-testid="filament-slot" to FilamentHoverCard's trigger
    wrapper and rewrite the AMS load/unload tests around
    fireEvent.mouseEnter → portaled actions. Replace the "hides menu
    while RUNNING" assertion with "Load/Unload buttons exist but are
    disabled" — matches the new UX shape.
This commit is contained in:
maziggy
2026-06-18 11:54:48 +02:00
parent 0f99b54d7e
commit a1cd86880c
6 changed files with 80 additions and 119 deletions
@@ -177,6 +177,7 @@ export function FilamentHoverCard({ data, children, disabled, className = '', sp
return (
<div
ref={triggerRef}
data-testid="filament-slot"
className={`relative ${className}`}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}