fix(request-page): ensure stable attribute before setting value to prevent data loss

This commit is contained in:
Bob Qiu authored and GitHub committed 2026-11-02 16:34:00 +08:00
1 parent 5abe65b756
commit b4d22710c3
1 file changed
+7
@@ -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();