Phone tests: expired sign-ins, evidence, and probes that only judge what can be tapped

A saved sign-in whose session expired landed on the login page and every route its persona opened timed out; both the
desktop and the phone sign-in now see that and sign in afresh. A route that fails to open leaves its screenshot and
text, as a failed sign-in does. A target's probes stay inside what its scroller shows (a card half under the feed's
top edge was failed for the part out of sight), a failed probe names what it hit, and the element blamed for sideways
scroll is never one inside a nested clipping box, which can't widen the page. The desktop guard reads its probe sizes
as a list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
This commit is contained in:
thepraandClaude Opus 5.5 committed 2026-10-06 23:13:23 +02:00
1 parent 63f2517f5b
commit ffd4acd3d0
4 files changed
+92 -20

No files matched your search

+6 -9
View File
@@ -10,14 +10,14 @@ namespace decePubClient.E2E.Mobile
public sealed class DesktopUnchangedTests(Browser browser)
{
const string Probe = """
() => Object.fromEntries(["btn", "btn btn-sm", "btn btn-xs", "input", "input input-sm"].map(classes => {
() => ["btn", "btn btn-sm", "btn btn-xs", "input", "input input-sm"].map(classes => {
const el = document.createElement(classes.startsWith("input") ? "input" : "button")
el.className = classes
document.body.append(el)
const height = el.getBoundingClientRect().height
el.remove()
return [classes, height]
}))
return height
})
""";
[Fact]
@@ -29,12 +29,9 @@ namespace decePubClient.E2E.Mobile
await Results.Cell("client.mobile.desktop", "privapub", "desktop", async () =>
{
Assert.False(await page.EvaluateAsync<bool>("() => matchMedia('(pointer: coarse)').matches"), "the desktop session has a coarse pointer");
var heights = await page.EvaluateAsync<Dictionary<string, double>>(Probe);
Assert.Equal(40, heights["btn"], 0.5);
Assert.Equal(32, heights["btn btn-sm"], 0.5);
Assert.Equal(24, heights["btn btn-xs"], 0.5);
Assert.Equal(40, heights["input"], 0.5);
Assert.Equal(32, heights["input input-sm"], 0.5);
// btn, btn btn-sm, btn btn-xs, input, input input-sm
var heights = await page.EvaluateAsync<double[]>(Probe);
Assert.Equal([40, 32, 24, 40, 32], heights.Select(h => Math.Round(h)).ToArray());
await Assertions.Expect(page.Locator("nav a.btn").First).ToBeVisibleAsync();
await session.AssertGuards();
}, page);