Skip to content

Commit 4816cb7

Browse files
committed
test(ui): await restored draft attachments
1 parent d4f9e95 commit 4816cb7

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎ui/src/e2e/chat-attachment-read-lifecycle.e2e.test.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ suite.define(() => {
119119
await expect
120120
.poll(() => activeComposer(restoredPage).inputValue())
121121
.toBe("restart draft A with image");
122-
await expect.poll(() => activeAttachments(restoredPage).count()).toBe(1);
122+
await activeAttachments(restoredPage).first().waitFor();
123+
expect(await activeAttachments(restoredPage).count()).toBe(1);
123124
if (artifactDir) {
124125
await restoredPage.screenshot({
125126
path: path.join(artifactDir, "existing-session-restart-draft-restored.png"),
@@ -130,7 +131,8 @@ suite.define(() => {
130131
await expect
131132
.poll(() => activeComposer(restoredPage).inputValue())
132133
.toBe("restart draft B with removable file");
133-
await expect.poll(() => activeAttachments(restoredPage).count()).toBe(1);
134+
await activeAttachments(restoredPage).first().waitFor();
135+
expect(await activeAttachments(restoredPage).count()).toBe(1);
134136
await restoredPage
135137
.locator('openclaw-chat-pane[aria-hidden="false"] .chat-attachment-remove')
136138
.click();

0 commit comments

Comments
 (0)