Skip to content

Commit 1f1b19e

Browse files
committed
fix(react-tooltio): remove test comments
1 parent 9d0c2fc commit 1f1b19e

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

  • packages/react-components/react-tooltip/library/src/components/Tooltip

packages/react-components/react-tooltip/library/src/components/Tooltip/Tooltip.cy.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ describe('Tooltip', () => {
3535
position: 'relative',
3636
}}
3737
>
38-
{/* tall content so the container becomes scrollable */}
3938
<div style={{ height: '400px', paddingTop: '8px' }}>
4039
<Tooltip content="Overflow tooltip" relationship="label" data-testid="tooltip-content">
4140
<Button id="trigger">Hover me</Button>
@@ -44,16 +43,9 @@ describe('Tooltip', () => {
4443
</div>,
4544
);
4645

47-
// Hover the trigger to open the tooltip
4846
cy.get('#trigger').realHover();
49-
50-
// Wait for the tooltip to become visible (it renders into a portal)
5147
cy.get('[role="tooltip"]').should('be.visible');
52-
53-
// Scroll the container until the trigger is out of view
5448
cy.get('#scroll-container').scrollTo(0, 300);
55-
56-
// The positioning middleware should now set the referenceHidden attribute
5749
cy.get('[role="tooltip"]').should('have.attr', DATA_POSITIONING_HIDDEN);
5850
});
5951

@@ -79,11 +71,9 @@ describe('Tooltip', () => {
7971
cy.get('#trigger').realHover();
8072
cy.get('[role="tooltip"]').should('be.visible');
8173

82-
// Scroll away — attribute should appear
8374
cy.get('#scroll-container').scrollTo(0, 300);
8475
cy.get('[role="tooltip"]').should('have.attr', DATA_POSITIONING_HIDDEN);
8576

86-
// Scroll back — attribute should be removed
8777
cy.get('#scroll-container').scrollTo(0, 0);
8878
cy.get('[role="tooltip"]').should('not.have.attr', DATA_POSITIONING_HIDDEN);
8979
});
@@ -111,8 +101,6 @@ describe('Tooltip', () => {
111101
cy.get('[role="tooltip"]').should('be.visible');
112102

113103
cy.get('#scroll-container').scrollTo(0, 300);
114-
115-
// The CSS rule `&[data-popper-reference-hidden] { visibility: hidden }` should apply
116104
cy.get('[role="tooltip"]').should('have.css', 'visibility', 'hidden');
117105
});
118106
});

0 commit comments

Comments
 (0)