- Timestamp:
- 07/19/2026 05:38:25 PM (7 weeks ago)
- Branches:
- main
- Children:
- e9c9ae1
- Parents:
- feced2c
- git-author:
- Robin <roboburr@…> (07/19/2026 05:38:00 PM)
- git-committer:
- Robin <roboburr@…> (07/19/2026 05:38:25 PM)
- File:
-
- 1 edited
-
test/rich-reply.test.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
test/rich-reply.test.js
rfeced2c r5190152 120 120 assert.equal(r, null); 121 121 }); 122 123 test('rich edit: content replaced, language updated, attachments survive', async () => { 124 const r = await AP.deliverReply(site, { 125 postId: 'p1', postSlug: 'hallo', parent, text: 'origineel', html: '', 126 attachments: [{ url: '/media/reply-media/keep.webp', mediaType: 'image/webp', name: 'blijft' }], 127 language: 'nl', 128 }); 129 const upd = await AP.deliverOutboxUpdate(site, r.id, '', { html: '<p>bewerkt met <em>nadruk</em></p>', language: 'en' }); 130 assert.ok(upd && upd.ok); 131 const row = db.prepare('SELECT * FROM ap_outbox WHERE id = ?').get(r.id); 132 assert.match(row.content, /bewerkt met <em>nadruk<\/em>/); 133 assert.match(row.content, /^<p><a [^>]*class="u-url mention"/); // mention re-attached inline 134 assert.equal(row.language, 'en'); 135 assert.equal(JSON.parse(row.attachments)[0].url, '/media/reply-media/keep.webp'); 136 }); 137 138 test('plain edit path unchanged; bogus language keeps the old one', async () => { 139 const r = await AP.deliverReply(site, { postId: 'p1', postSlug: 'hallo', parent, text: 'plain start', language: 'nl' }); 140 const upd = await AP.deliverOutboxUpdate(site, r.id, 'plain bewerkt', { language: '???' }); 141 assert.ok(upd && upd.ok); 142 const row = db.prepare('SELECT * FROM ap_outbox WHERE id = ?').get(r.id); 143 assert.match(row.content, /plain bewerkt/); 144 assert.equal(row.language, 'nl'); 145 });
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)