ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Slider: Not rendering in the cypress test execution

Open saurabhmehta02 opened this issue 7 months ago • 1 comments

Bug Description

We are using <Slider> webcomponent in our UI - https://sap.github.io/ui5-webcomponents-react/?path=/docs/inputs-slider--docs Its rendering fine in all browsers and resolution but when we are executing cypress tests, the slider component isn't rendering. We have following cypress test: Then("I should see slider component", () => { cy.get("[data-testid='mySlider']").should("be.visible"); });

We are getting error in the cypress logs that Slider component with dimension 368x0 is not visible. After giving explicit height, the top level DOM rendered but none of the child nodes are getting rendered.

For example below is not working even after giving explicit height: cy.get("[data-testid=mySlider]").shadow().find(".ui5-slider-tickmarks").children().eq(4).click({ force: true });

I suspect its related to lack of polyfills or somehow the library for Slider isn't available. Is there any known issue with Slider component while testing using cypress?

Affected Component

Slider

Expected Behaviour

Slider should render fine in the cypress test env how its rendering in the normal browser

Isolated Example

No response

Steps to Reproduce

Due to confidentiality, its not possible to share cypress test commands and recording as contains other information. Please contact me over email if you need further details.

Log Output, Stack Trace or Screenshots

No response

Priority

Medium

UI5 Web Components Version

1.24.0

Browser

Chrome

Operating System

No response

Additional Context

No response

Organization

SAP Labs

Declaration

  • [X] I’m not disclosing any internal or sensitive information.

saurabhmehta02 avatar Jun 27 '24 03:06 saurabhmehta02