Reset maxAtlasPages after tests that lower it
setMaxAtlasPages mutates a static that lives for the page's lifetime, so a lowered cap silently leaked into every renderer built by later tests in the same file (their GL texture and shader sampler arrays were sized at the tiny cap, making tests order-dependent). Add resetMaxAtlasPages and call it in afterEach wherever the cap is lowered on a shared page.
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
import test, { expect } from '@playwright/test';
|
||||
import { ITestContext, createTestContext, openTerminal } from '../../../test/playwright/TestUtils';
|
||||
import { captureRowSignatures, expectSignatureMatches, getAtlasPageCount, loadWebglStrict, setMaxAtlasPages, writeAndWaitForRender } from '../../../test/playwright/RendererTestUtils';
|
||||
import { captureRowSignatures, expectSignatureMatches, getAtlasPageCount, loadWebglStrict, resetMaxAtlasPages, setMaxAtlasPages, writeAndWaitForRender } from '../../../test/playwright/RendererTestUtils';
|
||||
import { generateColoredAsciiFlood } from '../../../test/playwright/SyntheticTui';
|
||||
|
||||
const HEADER = ' HEADER_REF_0123456789';
|
||||
@@ -27,6 +27,9 @@ test.describe('single-terminal merge integrity (#322756 class)', () => {
|
||||
test.skip(({ browserName }) => browserName !== 'chromium');
|
||||
test.describe.configure({ timeout: 60000 });
|
||||
|
||||
// A lowered page cap must not leak into renderers built by later tests.
|
||||
test.afterEach(async () => await resetMaxAtlasPages(ctx));
|
||||
|
||||
test('pinned header renders identically across 30 merge-heavy body redraws', async () => {
|
||||
await openTerminal(ctx, { cols: 80, rows: 24 });
|
||||
await loadWebglStrict(ctx);
|
||||
|
||||
Reference in New Issue
Block a user