fix: improve scale-test pagination robustness #22
🤖 AI Code Review
Verdict: APPROVE (with comments — merge conflicts must be resolved first)
Gate Checks
✅ PR Description: Clear summary with 4 bullet points, test plan, attribution
✅ CI Status: No CI checks configured on this repo
✅ Single Concern: All changes address scale-test pagination robustness
✅ Reasonable Scope: 3 files, +105/-46 lines
✅ No Secrets: Clean
✅ Not a Draft
Findings Summary
| Severity | Count |
|----------|-------|
| Critical | 0 |
| High | 0 |
| Medium | 2 |
| Low | 2 |
Medium Issues
1. Merge conflicts — PRs #24 and #25 were merged into main after this PR was opened. Two of the three files (devicesPage.js, scaleFleetSimulatorTasks.js) now have merge conflicts. The PR cannot be merged in its current state. A rebase onto main is needed. Many changes from this PR (e.g., scaleFleetEnsureExists, stale data cleanup, scaleFleetCleanup, fleet label detach/reattach test) are already in main via PR #24 — the rebase should drop those and keep only the unique pagination-robustness changes.
2. expectEnrolledDevicesTotalPages false-positive risk (devicesPage.js:317) — Uses contain.text with of ${expectedPages}, which would match "of 40" when checking for "of 4" (substring match). Not a practical issue at 50 devices / 15-per-page, but a more precise regex assertion would be safer:
.should(($el) => {
const text = $el.text().trim()
expect(text).to.match(new RegExp(`of ${expectedPages}$`))
})
Low Issues
1. cy.wait(1200) hardcoded delay in filterByFleetScaleLabel (devicesPage.js:304) — acceptable for typeahead debounce, but a retry-based approach would be more robust.
2. Significant overlap with already-merged PR #24 — after rebasing, the effective diff will be much smaller (only the unique pagination logic, requiredStatus filter, compact pagination handling, and typeahead selector fix).
Recommendation
The code quality is solid — the iterative fixes across 5 commits correctly address real CI failures (typeahead selector, PF6 compact pagination, status filtering). Rebase onto main to resolve merge conflicts, then this is ready to merge.
talhil-rh
Summary
scaleFleetSimulatorWaitForDevicesnow defaults torequiredStatus: 'Online', ensuring all 50 devices have fully enrolled before the UI test begins (previously only checked device existence)clickEnrolledDevicesNextPage()now waits for both the spinner to disappear AND at least 1 row to render, preventing transient 0-row assertions during table re-renderTest plan
CI/edge-management-flightctl-standalone-uiwith this branch to verify the scale-test passesAttribution
Requested by: @thilzenr
🤖 Generated with Claude Code