Skip to content

Commit 91b7d62

Browse files
fix(Chip): prevented duplicate ID being applied (#9886)
* fix(Chip): prevented duplicate ID being applied * Updated snapshot * Updated integration test selector
1 parent 25223e7 commit 91b7d62

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/react-core/src/components/Chip/Chip.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ class Chip extends React.Component<ChipProps, ChipState> {
149149
isOverflowChip,
150150
// eslint-disable-next-line @typescript-eslint/no-unused-vars
151151
tooltipPosition,
152+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
153+
id: idProp,
152154
component,
153155
ouiaId,
154156
textMaxWidth,

packages/react-core/src/components/Chip/__tests__/__snapshots__/Chip.test.tsx.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ exports[`Matches snapshot 1`] = `
77
data-ouia-component-id="snapshot-test"
88
data-ouia-component-type="PF5/Chip"
99
data-ouia-safe="true"
10-
id="snapshot-test"
1110
>
1211
<span
1312
class="pf-v5-c-chip__content"

packages/react-integration/cypress/integration/chip.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ describe('Chip Group Demo Test', () => {
44
});
55

66
it('Verify tooltipPosition is passed to Tooltip', () => {
7-
cy.get('#longName-chip').focus();
7+
cy.get('.pf-v5-c-chip').focus();
88
cy.get('.pf-v5-c-tooltip').should('have.class', 'pf-m-bottom');
99
});
1010
});

0 commit comments

Comments
 (0)