1
0
Fork 0

fix (banner) add text separately from spacers to allow for i18n during rendering

This commit is contained in:
Enoch Riese 2023-04-18 16:40:30 -04:00
parent ccf2ff3931
commit c147c6b652
2 changed files with 12 additions and 6 deletions

View file

@ -27,7 +27,7 @@ describe('Banner Plugin Tests', () => {
pattern.draft()
const c = pattern.parts[0].test.paths.example
expect(c.attributes.get('data-text')).to.equal(
'            foo            foo            foo            foo            foo            foo            foo            foo            foo            foo            '
'             foo              foo              foo              foo              foo              foo              foo              foo              foo              foo             '
)
expect(c.attributes.get('data-text-class').trim()).to.equal('center')
expect(c.attributes.get('data-text-dy')).to.equal('-1')
@ -56,7 +56,7 @@ describe('Banner Plugin Tests', () => {
const pattern = new design()
pattern.draft()
const c = pattern.parts[0].test.paths.example2
expect(c.attributes.get('data-text')).to.equal('  foo  foo  ')
expect(c.attributes.get('data-text')).to.equal('   foo    foo   ')
})
it('Number of repetitions should be configurable', () => {
@ -82,6 +82,8 @@ describe('Banner Plugin Tests', () => {
const pattern = new design()
pattern.draft()
const c = pattern.parts[0].test.paths.example3
expect(c.attributes.get('data-text')).to.equal(' foo foo foo foo ')
expect(c.attributes.get('data-text')).to.equal(
'  foo   foo   foo   foo  '
)
})
})