Skip to content

Commit d592068

Browse files
committed
Updated unit tests
1 parent 092a301 commit d592068

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

packages/react-core/src/components/Page/__tests__/PageSection.test.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,21 @@ test(`Renders with ${styles.modifiers.noFill} if isFilled={false} is passed`, ()
181181
});
182182

183183
test(`Renders with ${styles.modifiers.plain} class when isPlain is true`, () => {
184-
render(<PageSection isPlain>test</PageSection>);
184+
render(
185+
<PageSection hasBodyWrapper={false} isPlain>
186+
test
187+
</PageSection>
188+
);
185189

186190
expect(screen.getByText('test')).toHaveClass(styles.modifiers.plain);
187191
});
188192

189193
test(`Renders with ${styles.modifiers.noPlainOnGlass} class when isPlain is true`, () => {
190-
render(<PageSection isNoPlainOnGlass>test</PageSection>);
194+
render(
195+
<PageSection hasBodyWrapper={false} isNoPlainOnGlass>
196+
test
197+
</PageSection>
198+
);
191199

192200
expect(screen.getByText('test')).toHaveClass(styles.modifiers.noPlainOnGlass);
193201
});

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`page group Verify basic render 1`] = `
3+
exports[`Verify basic render 1`] = `
44
<DocumentFragment>
55
<div
66
class="pf-v6-c-page__main-group"
@@ -10,7 +10,7 @@ exports[`page group Verify basic render 1`] = `
1010
</DocumentFragment>
1111
`;
1212

13-
exports[`page group Verify bottom shadow 1`] = `
13+
exports[`Verify bottom shadow 1`] = `
1414
<DocumentFragment>
1515
<div
1616
class="pf-v6-c-page__main-group pf-m-shadow-bottom"
@@ -20,7 +20,7 @@ exports[`page group Verify bottom shadow 1`] = `
2020
</DocumentFragment>
2121
`;
2222

23-
exports[`page group Verify bottom sticky 1`] = `
23+
exports[`Verify bottom sticky 1`] = `
2424
<DocumentFragment>
2525
<div
2626
class="pf-v6-c-page__main-group pf-m-sticky-bottom"
@@ -30,7 +30,7 @@ exports[`page group Verify bottom sticky 1`] = `
3030
</DocumentFragment>
3131
`;
3232

33-
exports[`page group Verify overflow scroll 1`] = `
33+
exports[`Verify overflow scroll 1`] = `
3434
<DocumentFragment>
3535
<div
3636
class="pf-v6-c-page__main-group pf-m-overflow-scroll"
@@ -42,7 +42,7 @@ exports[`page group Verify overflow scroll 1`] = `
4242
</DocumentFragment>
4343
`;
4444

45-
exports[`page group Verify top shadow 1`] = `
45+
exports[`Verify top shadow 1`] = `
4646
<DocumentFragment>
4747
<div
4848
class="pf-v6-c-page__main-group pf-m-shadow-top"
@@ -52,7 +52,7 @@ exports[`page group Verify top shadow 1`] = `
5252
</DocumentFragment>
5353
`;
5454

55-
exports[`page group Verify top sticky 1`] = `
55+
exports[`Verify top sticky 1`] = `
5656
<DocumentFragment>
5757
<div
5858
class="pf-v6-c-page__main-group pf-m-sticky-top"

0 commit comments

Comments
 (0)