Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixed-phone-chrome-probe-fixture-note.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The Activity monitor phone-chrome acceptance probe credits the fixture-only provenance note back when counting fully visible rows, so the 375×667 run no longer fails every dashboard PR on a row the real render shows.
4 changes: 3 additions & 1 deletion src/pkg/dashboard/webstatic/testdata/tracker-phone-chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
measurements.fixtureNote = note ? Math.round(rect(note).height + parseFloat(noteStyle.marginTop) + parseFloat(noteStyle.marginBottom)) : 0;
measurements.chrome = Math.round(rect(first).top - rect(header).bottom - measurements.fixtureNote);
assert(measurements.chrome <= maxChromePx, 'chrome between the section header and the first row is ' + measurements.chrome + 'px (max ' + maxChromePx + ')');
measurements.rowsFullyVisible = rows.filter(row => { const box = rect(row); return box.top >= navbar - 1 && box.bottom <= innerHeight + 1; }).length;
// The note also pushes every row down by its own height, so credit it
// back here too: a 375×667 phone shows the first row without it.
measurements.rowsFullyVisible = rows.filter(row => { const box = rect(row); return box.top >= navbar - 1 && box.bottom - measurements.fixtureNote <= innerHeight + 1; }).length;
assert(measurements.rowsFullyVisible >= 1, 'at least one row is fully visible with the section header at the top of the viewport');
}
const sticky = document.getElementById('activity-monitor-sticky');
Expand Down
Loading