feat(ui): apply inquiry list and modal design
Apply the supplied inquiry layout to the list and native write/detail dialogs while preserving existing API requests, author controls, attachments, comments and search. Keep legacy entry links and confirm before discarding drafts. Validation: 98 tests and syntax checks pass; mocked Chromium desktop/mobile and six author/session visibility scenarios pass.
This commit is contained in:
1 parent
dbf5dc3611
commit
c62630e22d
19 files changed
+1362
-277
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import vm from 'node:vm';
|
||||
|
||||
const script = readFileSync(new URL('../assets/inquiry/entry.js', import.meta.url), 'utf8');
|
||||
|
||||
for (const [name, source, expected] of [
|
||||
['write link', '/egbim/write.html', '/egbim/?view=write'],
|
||||
['detail link preserves its feedback ID', '/egbim/detail.html?id=feedback-uuid', '/egbim/?id=feedback-uuid&view=detail'],
|
||||
['write link cannot inherit a detail ID', '/egbim/write.html?view=detail&id=old&check=1#form', '/egbim/?view=write&check=1#form'],
|
||||
['detail link preserves encoded IDs and query values', '/egbim/detail.html?id=a%26b&check=x%20y', '/egbim/?id=a%26b&check=x+y&view=detail']
|
||||
]) {
|
||||
test(name + ' opens the matching list modal using replace navigation', () => {
|
||||
const navigations = [];
|
||||
vm.runInNewContext(script, {
|
||||
URL,
|
||||
window: { location: { href: 'https://qa.example.test' + source, replace: value => navigations.push(value) } }
|
||||
});
|
||||
assert.deepEqual(navigations, ['https://qa.example.test' + expected]);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user