mirror of
https://github.com/Kong/insomnia.git
synced 2026-11-03 19:45:33 -05:00
fix(request-page): ensure stable attribute before setting value to prevent data loss
This commit is contained in:
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();
|
||||
|
||||
Reference in new issue
Block a user