diff options
| author | Adam Soltys <[email protected]> | 2026-10-26 09:49:37 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-26 09:49:37 -0700 |
| commit | 5fe2341616b2d1abdd7a3560371aff2d648e2311 (patch) | |
| tree | c4900c4c460e0df6a87dbf16aa50f06fb36d9aa3 /tools | |
| parent | ef1739e2de914f0a02990979f13057cef77c9a44 (diff) | |
| download | coinosv3-5fe2341616b2d1abdd7a3560371aff2d648e2311.tar.gz coinosv3-5fe2341616b2d1abdd7a3560371aff2d648e2311.zip | |
Cancel on a reply discards what was typed and folds the box: it only cleared the "replying" flag, and the box stays up while a draft has text, so with anything typed it did nothing. Attachments the draft carried are dropped with it
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/thread-reply-test.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/thread-reply-test.js b/tools/thread-reply-test.js index 738a31c..8ba59d3 100644 --- a/tools/thread-reply-test.js +++ b/tools/thread-reply-test.js @@ -78,6 +78,16 @@ try { await page.click('#app .note-act'); check('Reply immediately shows its composer beneath the tapped post', await inline()); check('the input receives focus before relay queries finish', await page.evaluate(() => document.activeElement.matches('.thread-reply-input'))); + // Cancel with text typed: the box folds and the draft is gone (it used to + // stay open — the box shows while a draft has text, and Cancel only + // cleared the replying flag) + await page.type('.thread-reply-input', 'Half a thought'); + await page.evaluate(() => document.querySelector('.thread-reply-cancel').click()); + check('Cancel with text typed hides the box and discards the draft', await page.evaluate(() => + !document.querySelector('.thread-reply-input') && !(test.ui.noteThread.draft || '').length)); + await page.evaluate(() => document.querySelector('#app .note-act').click()); // one atomic tap, as below + await page.waitForSelector('.thread-reply-input'); + check('Reply again opens an empty field', await page.evaluate(() => document.querySelector('.thread-reply-input')?.value === '')); await page.type('.thread-reply-input', 'A reply before the root loads'); // (one atomic tap: a repaint landing between finding the button and clicking it replaces it) await page.waitForFunction(() => !document.querySelector('.thread-reply-send')?.disabled); |
