同步小程序与管理端更新,完善抽烟记录和解绑冷静期
This commit is contained in:
@@ -15,6 +15,7 @@ function records(api) {
|
||||
Page:p=>definition=p, console:{error(){}}, setTimeout:f=>f(),
|
||||
wx:{getStorageSync:()=> 'token',navigateTo:p=>routes.push(p.url)},
|
||||
require(name) {
|
||||
if(name.endsWith('/page-cache'))return {withDataCache:p=>p};
|
||||
if(name.endsWith('/request'))return {api};
|
||||
if(name.endsWith('/journal'))return formatter();
|
||||
if(name.endsWith('/layout'))return {getLayout:()=>({})};
|
||||
@@ -45,3 +46,10 @@ test('refresh failure clears busy states and retry replaces old records with aut
|
||||
page.data.entries=[{id:'old'}];await page.onRefresh();assert.equal(page.data.loadError,true);assert.equal(page.data.refreshing,false);assert.equal(page.data.loading,false);
|
||||
fail=false;await page.loadStats();assert.equal(page.data.loadError,false);assert.equal(page.data.entries.length,0);
|
||||
});
|
||||
test('publish drawer hides the native custom tab bar and restores it when closing or navigating',()=>{
|
||||
const {page}=records({});const hidden=[];page.getTabBar=()=>({setHidden:value=>hidden.push(value)});
|
||||
page.showPublish();assert.equal(page.data.publishOpen,true);assert.equal(hidden.at(-1),true);
|
||||
page.hidePublish();assert.equal(page.data.publishOpen,false);assert.equal(hidden.at(-1),false);
|
||||
page.showPublish();page.onHide();assert.equal(page.data.publishOpen,false);assert.equal(hidden.at(-1),false);
|
||||
page.showPublish();page.createMemory();assert.equal(page.data.publishOpen,false);assert.equal(hidden.at(-1),false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user