diff --git a/test/blocks/section-metadata/mocks/body.html b/test/blocks/section-metadata/mocks/body.html index 4b2da335cb..c89b6d05e5 100644 --- a/test/blocks/section-metadata/mocks/body.html +++ b/test/blocks/section-metadata/mocks/body.html @@ -7,6 +7,20 @@ +
+
item
+
item
+
+
+
style
+
Darkest, XXL Spacing, auto up
+
+
+
background
+
linear-gradient(red, yellow)
+
+
+
diff --git a/test/blocks/section-metadata/section-meta.test.js b/test/blocks/section-metadata/section-meta.test.js index 49b1ca8a8e..62849731b7 100644 --- a/test/blocks/section-metadata/section-meta.test.js +++ b/test/blocks/section-metadata/section-meta.test.js @@ -54,7 +54,7 @@ describe('Section Metdata', () => { expect(metadata.background.text).to.equal('rgb(239, 239, 239)'); }); - it('gets section metadata', () => { + it('gets section to bottom', () => { const sec = document.querySelector('.section.sticky-bottom'); const sm = sec.querySelector('.section-metadata'); const main = document.querySelector('main'); @@ -83,4 +83,14 @@ describe('Section Metdata', () => { await delay(700); expect(sec.style.top).to.be.eql('77px'); }); + + it('adds section auto up attributes', async () => { + const sec = document.querySelector('.section.auto-up'); + const sm = sec.querySelector('.section-metadata'); + await init(sm); + const styles = getComputedStyle(sec); + const variable = styles.getPropertyValue('--section-grid-columns') + expect(sec.classList.contains('auto-up')).to.be.true; + expect(variable).to.be.equal('2'); + }); });