test(settings): measure Git Log checkboxes after the dialog settles (#5311)

The Git Log settings layout test read two checkbox positions one after the other while the Settings dialog was still opening, so it failed depending on timing. It now polls both positions together until they match.
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-11-23 11:16:43 +08:00
1 джерело 7dff6e1852
коміт a539baec37
1 file changed
+4 -1
+4 -1
Переглянути файл
@@ -121,7 +121,10 @@ test("Git Log settings group display and column options with aligned checkboxes"
for (const width of [1000, 520]) {
await page.setViewportSize({ width, height: 760 });
expect((await tagNames.boundingBox())!.x).toBeCloseTo((await hash.boundingBox())!.x, 0);
// Read both rows together once the dialog has finished opening and relaid out.
await expect
.poll(async () => Math.abs((await tagNames.boundingBox())!.x - (await hash.boundingBox())!.x))
.toBeLessThan(0.5);
}
await expect(hash).not.toBeChecked();