-
Notifications
You must be signed in to change notification settings - Fork 380
feat(Data list): Add isNoPlainOnGlass prop to add pf-m-no-plain modfier to the data list #12292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,33 @@ describe('Data List Demo Test', () => { | |
| cy.visit('http://localhost:3000/data-list-demo-nav-link'); | ||
| }); | ||
|
|
||
| it('in glass theme, does not apply glass plain transparent background when pf-m-no-plain-on-glass is present (even with pf-m-plain)', () => { | ||
| cy.visit('http://localhost:3000/data-list-demo-nav-link'); | ||
| cy.document().then((doc) => { | ||
| doc.documentElement.classList.add('pf-v6-theme-glass'); | ||
| }); | ||
|
|
||
| cy.get('[data-testid="data-list-glass-plain-both"]') | ||
| .should('have.class', 'pf-m-no-plain-on-glass') | ||
| .and('have.class', 'pf-m-plain'); | ||
|
|
||
| /** | ||
| * This test fails due to a css bug. | ||
| */ | ||
| cy.get('[data-testid="data-list-glass-plain-both"]').then(($el) => { | ||
| const el = $el[0]; | ||
| const win = el.ownerDocument.defaultView; | ||
| if (!win) { | ||
| throw new Error('expected window'); | ||
| } | ||
| const bg = win.getComputedStyle(el).backgroundColor; | ||
| const fullyTransparent = bg === 'transparent' || bg === 'rgba(0, 0, 0, 0)' || bg === 'rgba(0,0,0,0)'; | ||
| expect(fullyTransparent, `expected non-transparent background, got ${bg}`).to.eq(false); | ||
| }); | ||
|
Comment on lines
+16
to
+28
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This test is documented to fail—skip it or fix the CSS bug first. The comment on lines 16-18 explicitly states "This test fails due to a css bug." Merging a test known to fail will break CI and reduce confidence in the test suite. Either:
If the CSS bug is tracked separately, consider referencing the issue number in the comment. 🤖 Prompt for AI Agents |
||
| }); | ||
|
|
||
| it('Verify rows selectable', () => { | ||
| cy.visit('http://localhost:3000/data-list-demo-nav-link'); | ||
| cy.get('#row1.pf-m-clickable').should('exist'); | ||
| cy.get('#row2.pf-m-clickable').should('exist'); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idJSDoc is inaccurate forDataListActionProps.The description references a “data list toggle number,” but this interface is for data list actions.
✏️ Suggested edit
📝 Committable suggestion
🤖 Prompt for AI Agents