Build Mission Core Promo around 15 applied solutions

This commit is contained in:
DCCONSTRUCTIONS
2026-11-05 23:36:17 +03:00
parent 1265bd11e1
commit 1b4fe33957
41 changed files with 5157 additions and 453 deletions
+17
View File
@@ -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, /Подробно &lt;о решении&gt;/);
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);
}
});