feat: add category order rules and read-only sent mail history
This commit is contained in:
1 parent
388805a8a6
commit
efa982a8a1
41 files changed
+1828
-28
No files matched your search
@@ -33,3 +33,15 @@ test('isolated preview signs in locally with fictional workspace data and surviv
|
||||
runtime=await startPreview({stateDir:dir,port:0});
|
||||
assert.deepEqual(runtime.workspace.snapshot(runtime.store.users()).exceptions.map(item=>item.id),ids);
|
||||
});
|
||||
|
||||
test('rule preview can configure IMAP history without enabling polling or SMTP',async t=>{
|
||||
const dir=fs.mkdtempSync(path.join(os.tmpdir(),'history-preview-'));
|
||||
const runtime=await startPreview({stateDir:dir,port:0,mailHistory:true});
|
||||
t.after(async()=>{await runtime.close();fs.rmSync(dir,{recursive:true,force:true});});
|
||||
const base='http://127.0.0.1:'+runtime.server.address().port;
|
||||
const login=await fetch(base+'/api/preview-login',{method:'POST',headers:{Origin:base,'Content-Type':'application/json'},body:'{}'});
|
||||
const cookie=login.headers.get('set-cookie').split(';')[0];
|
||||
const result=await fetch(base+'/api/mail',{headers:{Cookie:cookie}});
|
||||
assert.equal(result.status,200);assert.equal((await result.json()).historyOnly,true);
|
||||
assert.equal(runtime.mail.timer,undefined);assert.equal(runtime.mail.startTimer,undefined);
|
||||
});
|
||||
Reference in new issue
Block a user