fix(e2e): repair the two integration-card assertions the sweep left behind

Both ends of the divider removal were green and the pipe between them was
never run. The `<hr>` came out of every integration card, all three unit
tests were updated to expect none, and this browser spec kept asserting nine.
It is the same shape as the failure this project keeps rediscovering: two
correct halves and nothing exercising the assembly.

The cost was not just a red spec. The Pixel-5 horizontal-overflow assertion
sits AFTER it in the same test, so `/settings/integrations` had no proven
mobile-overflow check for the whole sweep — the test never reached it.

The second assertion read a sentence's bytes and broke on the text diet while
the thing it was about — the card rendering its explainer at all — never
changed. `SettingsCardHeader` now names its description slot
(`data-slot="settings-card-description"`) and the spec targets that: the slot
is present, non-empty, and not a raw i18n key. The product name stays
assertable because a proper noun is not prose. The wording itself is pinned
where it belongs, in the unit test that reads the same bundle it renders from.
This commit is contained in:
Marc-André Bombeck committed 2026-08-07 23:19:24 +02:00
1 parent 5a103ea096
commit ff61aec51f
3 files changed
+36 -6

No files matched your search

@@ -85,6 +85,16 @@ describe("SettingsCardHeader — one description sentence, one text run", () =>
const html = render(<SettingsCardHeader icon={Bell} title="Channels" />);
expect(html).toMatch(/<h2[^>]*class="text-lg font-semibold"/);
});
it("names the description slot so a browser test can target it", () => {
// A spec that asserted the sentence's bytes broke on the text diet while
// the thing it was actually about — the card rendering its explainer —
// never changed. This attribute is the stable target that replaced it.
const html = render(
<SettingsCardHeader icon={Bell} title="Channels" description="One." />,
);
expect(html).toContain('data-slot="settings-card-description"');
});
});
describe("SettingsCardActions — one row, one shape", () => {
+10 -2
View File
@@ -94,9 +94,17 @@ export function SettingsCardHeader({
</div>
{/* One sentence, one text run. This slot deliberately carries no
`space-y-*`: the vertical rhythm was the licence call sites used
to stack explainer paragraphs into a muted `text-xs` slot. */}
to stack explainer paragraphs into a muted `text-xs` slot.
The `data-slot` is what a browser test targets — asserting the
sentence's bytes couples the suite to wording, and a text diet
then breaks specs that were never about the words. */}
{description ? (
<div className="text-muted-foreground text-xs">{description}</div>
<div
data-slot="settings-card-description"
className="text-muted-foreground text-xs"
>
{description}
</div>
) : null}
</div>
</header>