Hi,
I have a method in component -
/**
* Calculate if horizontal stepper would fit within screen
*/
private canShowHorizontalStepper(): boolean {
const elementStyles = getComputedStyle(this.el);
const stepWidth = elementStyles
.getPropertyValue('--step-width-md')
.replace(/\D/g, '');
const lineWidth = elementStyles
.getPropertyValue('--step-horizontal-line-width')
.replace(/\D/g, '');
return window.innerWidth < (
(+stepWidth * this.stepperData.length) + (+lineWidth * this.stepperData.length - 1)
);
}
Which works correctly in storybook, but when running unit test both css properties are returned as empty strings;
ps. these css properties are defined inside component style :host {}