From b4d22710c3cb29643e95b77e367828fbc21f7cd1 Mon Sep 17 00:00:00 2001 From: Bob Qiu Date: Tue, 27 Oct 2026 14:32:34 +0800 Subject: [PATCH] fix(request-page): ensure stable attribute before setting value to prevent data loss --- packages/insomnia-test/pages/request.page.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/insomnia-test/pages/request.page.ts b/packages/insomnia-test/pages/request.page.ts index edd7498e04..47015e25cb 100644 --- a/packages/insomnia-test/pages/request.page.ts +++ b/packages/insomnia-test/pages/request.page.ts @@ -425,6 +425,13 @@ export abstract class RequestPage extends TabPanelPage { checkValue: false, reapply: setName, }); + // The disk write lands before the UI swaps the row's provisional key + // for the persisted id, and that swap remounts the row's editors — + // typing the value any earlier lets the remount wipe it out. + await expect(row).not.toHaveAttribute("data-key", /^pair-blank/, { + timeout: DEFAULT_TIMEOUT, + }); + await this.waitForStableAttribute(row, "data-key"); await setValue(); if (pair.disabled) { await row.locator('button[aria-pressed="true"]').click();