广告点击接口添加
This commit is contained in:
@@ -119,3 +119,9 @@ test('carousel frames keep their own titles below the stable page heading, inclu
|
||||
}
|
||||
assert.ok(!/<h1\b/.test(hero(null)));
|
||||
});
|
||||
|
||||
test('ad links carry the numeric ad ID and slot for click reporting, and invalid identities are omitted',()=>{
|
||||
const html=promotionRow([{id:'1138200002',location:2,title:'广告',images:'https://example.com/ad.png',link:'https://example.com/landing'},{id:'bad-id',location:2,title:'无效',images:'https://example.com/b.png',link:'https://example.com/b'}]);
|
||||
assert.ok(html.includes('data-ad data-ads-id="1138200002" data-ads-location="2" href="https://example.com/landing"'));
|
||||
assert.equal((html.match(/data-ads-id=/g)||[]).length,1);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user