ui: edit/delete buttons for custom files
- each row now shows Edit and Delete buttons (same styling as the profiler list buttons) instead of the red X glyph - Edit reloads the entry into the top form: the Add button becomes Save (data-l10n updated too) and a Cancel button appears; submit updates the entry in place, recomputing fid/parentFid and excluding the edited row from the duplicate-path check - Delete removes without confirmation; deleting the row being edited cancels the edit and an earlier deletion shifts the edit index - pysimCustomAdd renamed to pysimCustomSubmit; tests for the whole flow; SW cache v114 -> v115.
This commit is contained in:
@@ -54,3 +54,10 @@ test('file manager has FID / Name sort pills', () => {
|
||||
assert.match(html, /data-fs-sort="name" onclick="pysimFsSetSort\('name'\)"/);
|
||||
assert.ok(html.includes('pysim-fs-sort-pill'));
|
||||
});
|
||||
|
||||
test('custom files form has add/save and cancel controls', () => {
|
||||
assert.match(html, /id="pysim-cf-add-btn"[^>]*data-l10n="Add"/);
|
||||
assert.match(html, /id="pysim-cf-cancel-btn"[^>]*class="hidden[^"]*"[^>]*data-l10n="Cancel"/);
|
||||
assert.ok(html.includes("event.key==='Enter')pysimCustomSubmit()"));
|
||||
assert.ok(!html.includes('pysimCustomAdd'));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user