feat: the three folders are created when the main one is chosen, numbered in the flow's order
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 3m31s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m4s
All checks were successful
Build and deploy / Validate source (push) Successful in 7s
Build and deploy / Integration suite on a real stack (push) Successful in 3m31s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m4s
Tried on a local Kanban with Dropstar's flow: the folders appeared only with the first file, and a listing showed Arte conferida before Arte recebida. - "1. Arte recebida", "2. Arte conferida" and "3. Finalizado" are created as soon as the main folder is chosen or released, and again on every round if someone deletes one - numbered, a folder listing shows them in the order the file moves Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -222,8 +222,8 @@ try{
|
||||
// Approved before the queue: already on this computer, in Arte recebida.
|
||||
const early='DTF-'+await kanban.eval(`board.orders.find(o=>o.id==='${oid}').number`)+'-item-1';
|
||||
await kanban.eval('syncFolder(true)');
|
||||
await waitFor(async()=>(await savedFiles('Arte recebida')).some(n=>n.startsWith(early)&&!n.endsWith('.baixando')),'final file saved in Arte recebida',45000);
|
||||
assert.equal((await savedFiles('Arte conferida')).some(n=>n.startsWith(early)),false);
|
||||
await waitFor(async()=>(await savedFiles('1. Arte recebida')).some(n=>n.startsWith(early)&&!n.endsWith('.baixando')),'final file saved in Arte recebida',45000);
|
||||
assert.equal((await savedFiles('2. Arte conferida')).some(n=>n.startsWith(early)),false);
|
||||
}
|
||||
await waitFor(()=>kanban.eval(`!!document.querySelector('[data-order="${oid}"] [data-move="${state}"]')`),'move to '+title);
|
||||
await kanban.click(`[data-order="${oid}"] [data-move="${state}"]`);
|
||||
@@ -231,28 +231,28 @@ try{
|
||||
if(state==='tra'){
|
||||
// Entering the queue moves its file to Arte conferida, whole and named after the order.
|
||||
const prefix='DTF-'+await kanban.eval(`board.orders.find(o=>o.id==='${oid}').number`)+'-item-1';
|
||||
await waitFor(async()=>(await savedFiles('Arte conferida')).some(n=>n.startsWith(prefix)&&!n.endsWith('.baixando')),'final file in Arte conferida',45000);
|
||||
await waitFor(async()=>(await savedFiles('2. Arte conferida')).some(n=>n.startsWith(prefix)&&!n.endsWith('.baixando')),'final file in Arte conferida',45000);
|
||||
// Other orders the earlier suites left in the queue may still be coming
|
||||
// down: only once the round ends must no half-written file be left.
|
||||
await waitFor(()=>kanban.eval('!FOLDER.busy'),'folder round finished',60000);
|
||||
assert.equal((await savedFiles('Arte conferida')).some(n=>n.endsWith('.baixando')),false);
|
||||
assert.equal((await savedFiles('Arte recebida')).some(n=>n.startsWith(prefix)),false);
|
||||
assert.equal((await savedFiles('2. Arte conferida')).some(n=>n.endsWith('.baixando')),false);
|
||||
assert.equal((await savedFiles('1. Arte recebida')).some(n=>n.startsWith(prefix)),false);
|
||||
// A file whose order was deleted leaves the folder.
|
||||
await kanban.eval(`(async()=>{const dir=await window.picked.getDirectoryHandle('Arte conferida',{create:true});
|
||||
await kanban.eval(`(async()=>{const dir=await window.picked.getDirectoryHandle('2. Arte conferida',{create:true});
|
||||
const f=await dir.getFileHandle('pedido-0-item-1-excluido.png',{create:true});
|
||||
const w=await f.createWritable();await w.write('x');await w.close();
|
||||
FOLDER.saved.set(crypto.randomUUID(),{order:crypto.randomUUID(),item:1,name:'pedido-0-item-1-excluido.png',folder:'Arte conferida'});})()`);
|
||||
FOLDER.saved.set(crypto.randomUUID(),{order:crypto.randomUUID(),item:1,name:'pedido-0-item-1-excluido.png',folder:'2. Arte conferida'});})()`);
|
||||
await waitFor(()=>kanban.eval('!FOLDER.busy'),'folder idle',60000);
|
||||
await kanban.eval('syncFolder(true)');
|
||||
await waitFor(async()=>!(await savedFiles('Arte conferida')).includes('pedido-0-item-1-excluido.png'),'deleted order file removed',30000);
|
||||
await waitFor(async()=>!(await savedFiles('2. Arte conferida')).includes('pedido-0-item-1-excluido.png'),'deleted order file removed',30000);
|
||||
}
|
||||
if(state==='fin'){
|
||||
// Finalized: the file goes to Finalizado, out of the queue.
|
||||
const prefix='DTF-'+await kanban.eval(`board.orders.find(o=>o.id==='${oid}').number`)+'-item-1';
|
||||
await waitFor(()=>kanban.eval('!FOLDER.busy'),'folder idle',60000);
|
||||
await kanban.eval('syncFolder(true)');
|
||||
await waitFor(async()=>(await savedFiles('Finalizado')).some(n=>n.startsWith(prefix)),'final file in Finalizado',30000);
|
||||
assert.equal((await savedFiles('Arte conferida')).some(n=>n.startsWith(prefix)),false);
|
||||
await waitFor(async()=>(await savedFiles('3. Finalizado')).some(n=>n.startsWith(prefix)),'final file in Finalizado',30000);
|
||||
assert.equal((await savedFiles('2. Arte conferida')).some(n=>n.startsWith(prefix)),false);
|
||||
}
|
||||
}
|
||||
// Undo a mistaken move from the panel: one stage back with an internal reason.
|
||||
|
||||
Reference in New Issue
Block a user