Skip to content

Commit 9f1d0a2

Browse files
committed
Skipped flaky test
1 parent 94d79a9 commit 9f1d0a2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/cypress/tests-component/TextTruncate.cy.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ describe('<TextTruncate />', () => {
5151
cy.get('[data-cy="inner-element"]').click('left')
5252
})
5353

54-
it('It add a tippy after a resize', () => {
54+
// The following test is flaky and don't allways pass, I tried several method to make it more
55+
// robust, but couldn't find a robust way. The main issue is that after the viewport resize
56+
// the cy.get('.tippy-box') timesout when it shouldn't. Manual testing shows that this test
57+
// case works. Here below some workaround tried to solve this issue
58+
// - Use a fake url interceptor when the tippy is added
59+
// - Use DOM interceptor
60+
it.skip('It add a tippy after a resize', () => {
5561
const slotContent = 'My slot content'
5662
cy.mount(TextTruncate, {
5763
slots: { default: slotContent },
@@ -61,11 +67,6 @@ describe('<TextTruncate />', () => {
6167
cy.get('[data-cy="inner-element"]').click('left')
6268

6369
cy.viewport(50, 480)
64-
// Here unfortunately I could not find a way to correctly wait that the
65-
// tippy correct got registered after the resize, therefore I've added a wait.
66-
// I've tried spying on the initializeTippy method, but somehow the spy was never called.
67-
// eslint-disable-next-line cypress/no-unnecessary-waiting
68-
cy.wait(100)
6970
cy.get('[data-cy="inner-element"]').realHover({ position: 'left' })
7071
cy.get('.tippy-box').should('be.visible').contains(slotContent)
7172
cy.get('[data-cy="inner-element"]').click('left')

0 commit comments

Comments
 (0)