整体UI修改
This commit is contained in:
+3
-3
@@ -16,10 +16,10 @@ const {loadAppCategories,renderAppDirectory,scrollToAppCategory}=await import(ap
|
||||
const app=id=>({id,name:'应用 '+id,url:'https://example.com/app/'+id,logo:'https://example.com/icon.png'});
|
||||
const category=(id,appList)=>({id,title:'分类 '+id,...(appList===undefined?{}:{appList})});
|
||||
|
||||
test('benefit applications report linked advertisements with their API ids and ordinary applications as content',()=>{
|
||||
test('benefit applications mark only linked advertisements and carry no tracking attributes',()=>{
|
||||
const html=renderAppDirectory([category(3,[app(11),{...app(12),advitiseId:'ad-12',location:8}])]);
|
||||
assert.match(html,/data-track-item data-item-id="11" data-item-name="应用 11" data-item-type="app" data-parent-item-id="3"/);
|
||||
assert.match(html,/data-track-ad="external" data-ad-id="ad-12" data-ad-clickable="1" data-ad-slot-key="8" data-ad-slot-name="福利应用" data-ad-type="icon"/);
|
||||
assert.equal(html.match(/data-ad /g)?.length,1);
|
||||
assert.doesNotMatch(html,/data-track|data-item-|data-ad-/);
|
||||
});
|
||||
|
||||
test('loads every missing category once, preserves directory order, and omits empty categories',async()=>{
|
||||
|
||||
Reference in New Issue
Block a user