3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-08-18 11:15:42 +00:00

Use capPagination() after form submission too

This commit is contained in:
snipe
2026-07-21 14:49:22 +01:00
parent 5a6fdb0784
commit d5388af0ee

View File

@ -213,6 +213,12 @@ async function shot(name, opts = {}) {
await mkdir(dirname(path), {recursive: true});
const {element, ...playwrightOpts} = opts;
await page.waitForLoadState('networkidle').catch(() => {});
// Cap bootstrap-table pagination on every shot, not just after
// explicit waitForTable() calls. Post-submit redirects and other
// "arrived here without knowing there's a table" flows would
// otherwise render at the user's persisted per-page preference
// (often 20 or 25). Safe no-op on pages without a snipe-table.
await capPagination();
// Capture the current URL path for the frame address bar (relative
// path only, so the frame doesn't leak / dumb-look the local .test
// hostname). Grabbed at shot time rather than inside frameLocally