You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 819bdb1
Browse filesBrowse the repository at this point in the historyBrowse files
e2e: poll for saved data instead of sleeping a fixed time
"File > New Notebook still works" failed intermittently (3 of 5 runs
on 48a6025, so it predates the Tab change; it was red in the run
before 28c1c10 was pushed). The app is fine: measured over 6 runs the
new notebook is in the DOM within ~10 ms and on disk ~550 ms later.
The check read the file once after 800 ms. Saves are debounced 500 ms
and any further edit restarts the timer; the new notebook's rename
input commits on blur, which fires when the test window loses OS
focus, so sometimes the write landed after the read.
waitForData(pred) polls the saved file (tolerating a read mid-rename)
until the predicate holds or 4 s pass. Every sleep-then-read check now
uses it. Three full e2e runs: 54/54 each; menuExport 8/8.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
c.check("edit saved to disk after debounce",d.notebooks[0].sections[0].pages[0].content==="<p>edited body</p>",d.notebooks[0].sections[0].pages[0].content);
c.check("context-menu Paste inserts clipboard text at the caret",/alphabody\s*PASTED-FROM-CLIPBOARD/.test(text),JSON.stringify(text));
250
-
c.check("pasted text saved",JSON.stringify(c.readData()).includes("PASTED-FROM-CLIPBOARD"));
252
+
c.check("pasted text saved",JSON.stringify(awaitc.waitForData((d)=>JSON.stringify(d).includes("PASTED-FROM-CLIPBOARD"))).includes("PASTED-FROM-CLIPBOARD"));
251
253
}finally{
252
254
awaitclipboard.writeText(saved);
253
255
}
@@ -267,7 +269,8 @@ SCENARIOS.replaceAll = {
267
269
awaitc.sleep(800);
268
270
consttext=awaitc.js(R.editorText);
269
271
c.check("Replace All inserts the replacement literally",text==="cost 5 US$& ($1) $$, US$& ($1) $$",JSON.stringify(text));
0 commit comments