chore: adjust tests so they are sucessfull on firefox as well

This commit is contained in:
Thomas Allmer 2020-10-09 16:01:51 +02:00 committed by Thomas Allmer
parent bdf1cfb26c
commit 58f092248e
4 changed files with 8 additions and 6 deletions

View file

@ -531,9 +531,11 @@ describe('<lion-calendar>', () => {
await el.updateComplete;
expect(elObj.previousYearButtonEl?.hasAttribute('disabled')).to.equal(false);
expect(elObj.previousYearButtonEl.ariaLabel).to.equal('Previous year, July 1999');
expect(elObj.previousYearButtonEl.getAttribute('aria-label')).to.equal(
'Previous year, July 1999',
);
expect(elObj.nextYearButtonEl?.hasAttribute('disabled')).to.equal(false);
expect(elObj.nextYearButtonEl.ariaLabel).to.equal('Next year, May 2001');
expect(elObj.nextYearButtonEl.getAttribute('aria-label')).to.equal('Next year, May 2001');
});
});

View file

@ -11,7 +11,7 @@ const fixture = /** @type {(arg: TemplateResult) => Promise<LionCollapsible>} */
const collapsibleTemplate = html`
<button slot="invoker">More about cars</button>
<div slot="content">
<div slot="content" style="font-size: 12px; line-height: 16px; font-family: Arial;">
Most definitions of cars say that they run primarily on roads, seat one to eight people, have
four tires, and mainly transport people rather than goods.
</div>
@ -50,7 +50,7 @@ describe('<lion-collapsible>', () => {
expect(collapsible._contentHeight).to.equal('0px');
collapsible.show();
await collapsible.requestUpdate();
expect(collapsible._contentHeight).to.equal('36px');
expect(collapsible._contentHeight).to.equal('32px');
});
});

View file

@ -69,7 +69,7 @@ export function runFormatMixinSuite(customConfig) {
if (options.viewValue) {
return !options.toggleValue ? '5-5-2005' : '10-10-2010';
}
return !options.toggleValue ? new Date('5-5-2005') : new Date('10-10-2010');
return !options.toggleValue ? new Date('5/5/2005') : new Date('10/10/2010');
case Array:
return !options.toggleValue ? ['foo', 'bar'] : ['baz', 'yay'];
case Object:

View file

@ -73,7 +73,7 @@ describe('<lion-input-amount>', () => {
const el = /** @type {LionInputAmount} */ (await fixture(
`<lion-input-amount></lion-input-amount>`,
));
expect(el._inputNode.inputMode).to.equal('decimal');
expect(el._inputNode.getAttribute('inputmode')).to.equal('decimal');
});
it('has type="text" to activate default keyboard on mobile with all necessary symbols', async () => {