Build Mission Core Promo around 15 applied solutions
This commit is contained in:
@@ -37,4 +37,21 @@ test('image opening is opt-in per carousel and survives ordinary model rendering
|
||||
assert.equal(count(await render(), /— открыть изображение/g), 0);
|
||||
galleries.forEach(b=>b.content.openImagesInFullscreen=false);
|
||||
assert.equal(count(await render(), /— открыть изображение/g), 0);
|
||||
// Details remain independent of fullscreen media, including after a CMS template change.
|
||||
for (const template of ['project-video-detail.html', 'project-composition.html']) {
|
||||
const gallery = galleries.find(b=>b.id==='applications');
|
||||
gallery.template = template;
|
||||
gallery.content.sliderItems[0].detailsHref = '/knowledge/applications/hidden-works-passport/';
|
||||
gallery.content.sliderItems[0].detailsLabel = 'Подробно <о решении>';
|
||||
gallery.content.sliderItems[1].detailsHref = 'javascript:alert(1)';
|
||||
gallery.content.sliderItems[2].detailsHref = 'java\nscript:alert(1)';
|
||||
gallery.content.sliderItems[3].detailsHref = 'data:text/html,<script>alert(1)</script>';
|
||||
const details = await render();
|
||||
assert.match(details, /href="\/knowledge\/applications\/hidden-works-passport\/"/);
|
||||
assert.match(details, /Подробно <о решении>/);
|
||||
assert.doesNotMatch(details, /href="(?:javascript:|data:text\/html)/);
|
||||
assert.equal(count(details, /— открыть изображение/g), 0);
|
||||
assert.equal(count(details, /class="carousel-media"/g), mediaCount);
|
||||
assert.equal(count(details, /<video /g), videoCount);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user