Skip to content

Commit 0c9ba40

Browse files
committed
rebase and fix tests
1 parent 107ca0f commit 0c9ba40

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ describe('Accordion Demo Test', () => {
3939
.should('have.class', 'pf-m-no-plain-on-glass')
4040
.and('have.class', 'pf-m-plain');
4141

42-
/**
43-
* This test fails due to a css bug.
44-
*/
4542
cy.get('[data-testid="accordion-glass-plain-both"]').then(($el) => {
4643
const el = $el[0];
4744
const win = el.ownerDocument.defaultView;

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

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ describe('Data List Demo Test', () => {
1313
.should('have.class', 'pf-m-no-plain-on-glass')
1414
.and('have.class', 'pf-m-plain');
1515

16-
/**
17-
* This test fails due to a css bug.
18-
*/
19-
cy.get('[data-testid="data-list-glass-plain-both"]').then(($el) => {
20-
const el = $el[0];
21-
const win = el.ownerDocument.defaultView;
22-
if (!win) {
23-
throw new Error('expected window');
24-
}
25-
const bg = win.getComputedStyle(el).backgroundColor;
26-
const fullyTransparent = bg === 'transparent' || bg === 'rgba(0, 0, 0, 0)' || bg === 'rgba(0,0,0,0)';
27-
expect(fullyTransparent, `expected non-transparent background, got ${bg}`).to.eq(false);
28-
});
16+
// Glass/plain tokens set --pf-v6-c-data-list__item--BackgroundColor on the list; items paint it.
17+
// The `<ul>` has no background-color rule, so its computed background stays transparent.
18+
cy.get('[data-testid="data-list-glass-plain-both"] .pf-v6-c-data-list__item')
19+
.first()
20+
.then(($item) => {
21+
const el = $item[0];
22+
const win = el.ownerDocument.defaultView;
23+
if (!win) {
24+
throw new Error('expected window');
25+
}
26+
const bg = win.getComputedStyle(el).backgroundColor;
27+
const fullyTransparent = bg === 'transparent' || bg === 'rgba(0, 0, 0, 0)' || bg === 'rgba(0,0,0,0)';
28+
expect(fullyTransparent, `expected non-transparent item background, got ${bg}`).to.eq(false);
29+
});
2930
});
3031

3132
it('Verify rows selectable', () => {

0 commit comments

Comments
 (0)