feat: add browser upload queue and trusted sessions with bounded projections
This commit is contained in:
1 parent
84d52390f9
commit
b90aef79d0
79 files changed
+1962
-196
No files matched your search
+14
-2
@@ -132,7 +132,7 @@ window.addEventListener('load', async () => {
|
||||
await wait(()=>$('status').textContent.includes('ありません'));
|
||||
// Deletion shares the archive footer, not a UUID-search workflow.
|
||||
$('new').click();await wait(()=>document.querySelector('#tasks-form [name=title]'));
|
||||
if(!$('delete').hidden)throw Error('Unsaved task must not offer deletion');$('close').click();
|
||||
if(!$('delete').hidden)throw Error('Unsaved task must not offer deletion');if(!$('page-open').hidden||$('page-open').hasAttribute('href'))throw Error('New task leaked a related page');$('close').click();
|
||||
$('quick-title').value='Disposable deletion fixture';$('capture').requestSubmit();
|
||||
await wait(()=>$('list').querySelector('[data-action=detail]'));$('list').querySelector('[data-action=detail]').click();
|
||||
await wait(()=>!$('delete').hidden);
|
||||
@@ -142,7 +142,19 @@ window.addEventListener('load', async () => {
|
||||
if(!$('dialog').open)throw Error('Cancelled deletion closed the editor');
|
||||
const deletionAPI='/_/api/v1/extension/organizer.tasks/items/'+deletionID;
|
||||
const deletionItem=(await fetch(deletionAPI).then(r=>r.json())).item;
|
||||
const changed=await fetch(deletionAPI,{method:'PUT',headers:{'Content-Type':'application/json','If-Match':'"'+deletionItem.version+'"'},body:JSON.stringify({...deletionItem,title:'Updated deletion fixture'})});
|
||||
if(!$('page-open').hidden)throw Error('Unlinked task offered related page');
|
||||
// The footer link uses the saved, authorized path, never unsaved input.
|
||||
value('page_path','/projects/browser');$('form').requestSubmit();await wait(()=>!$('dialog').open);
|
||||
$('list').querySelector('[data-action=detail]').click();await wait(()=>!$('page-open').hidden);
|
||||
const link=$('page-open');if(link.parentElement!==$('save').parentElement||link.pathname!=='/projects/browser'||link.target!=='_blank'||!link.rel.includes('noopener'))throw Error('Unsafe or misplaced related page navigation');
|
||||
value('title','Unsaved title kept');if(link.hidden||!$('dialog').open)throw Error('Editing task hid the saved page navigation');
|
||||
if(innerWidth<761&&link.getBoundingClientRect().height<44)throw Error('Related page touch target too small');
|
||||
document.querySelector('.task-editor-advanced').open=true;
|
||||
value('page_path','//external.invalid/unsaved');if(!link.hidden||link.hasAttribute('href'))throw Error('Unsaved path exposed a link');
|
||||
value('page_path','/projects/browser');if(link.hidden)throw Error('Restored path did not restore related link');
|
||||
window.confirm=()=>true;$('close').click();$('list').querySelector('[data-action=detail]').click();await wait(()=>!$('page-open').hidden);
|
||||
const freshDeletionItem=(await fetch(deletionAPI).then(r=>r.json())).item;
|
||||
const changed=await fetch(deletionAPI,{method:'PUT',headers:{'Content-Type':'application/json','If-Match':'"'+freshDeletionItem.version+'"'},body:JSON.stringify({...freshDeletionItem,title:'Updated deletion fixture'})});
|
||||
if(!changed.ok)throw Error('Deletion conflict fixture failed');
|
||||
window.confirm=()=>true;$('delete').click();await wait(()=>$('error').textContent.includes('別の画面'));
|
||||
if(!$('dialog').open||$('delete').disabled)throw Error('Deletion failure did not keep a usable editor');
|
||||
|
||||
Reference in new issue
Block a user