swisspost / design-system

The Swiss Post Design System pattern library for a consistent and accessible user experience across the web platform.
https://design-system.post.ch
Apache License 2.0
120 stars 14 forks source link

e2e are not started when only documentation changes #2364

Closed imagoiq closed 6 months ago

imagoiq commented 11 months ago

e2e test were not triggered on CI with https://github.com/swisspost/design-system/pull/2175 Pnpm did not trigger the internet-header tests because there were no change there and there is no dependency for the documentation on the internet-header packages. But in reality, there is a dependency between the two as the Cypress test are using the documentation to test the component.

We could add the documentation as a dependency in the package.json, but this creates a loop as the documentation is using the internet-header package to display the component.

So we should either:

gfellerph commented 11 months ago

The third point would probably be the cleanest solution. We could easily use fixture html files like we already use for the language tests for all other header tests.

The components suffer from the same issue. There, for example for the popover tests, the component is embedded in the storybook iframe which puts a div.overflow-hidden around the button that triggers the popover. The popover is then displayed "outside" of the div area and cypress thinks it's not visible and fails the .should('be.visible) test.

If only component testing for stencil would work (https://github.com/cypress-io/cypress/issues/24054)...

As a bonus, this would make the tests faster because we don't have to compile the docs before the test. As a malus, we have to maintain separate markup for test cases.

imagoiq commented 11 months ago

Let's think about it and make a decision on the next triage

gfellerph commented 10 months ago

Decided to go with option 3

gfellerph commented 6 months ago

Closing as won't fix.