Skip to content

Commit 03729e6

Browse files
committed
test(accordion): add basic test for ionic theme with content only
1 parent 84942b9 commit 03729e6

7 files changed

+37
-0
lines changed

core/src/components/accordion/test/basic/accordion.e2e.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ configs().forEach(({ config, screenshot, title }) => {
1212
});
1313
});
1414
});
15+
1516
configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
1617
test.describe(title('accordion: ionChange'), () => {
1718
test.beforeEach(async ({ page }) => {
@@ -58,3 +59,39 @@ configs({ directions: ['ltr'] }).forEach(({ config, title }) => {
5859
});
5960
});
6061
});
62+
63+
configs({ modes: ['ionic-md'] }).forEach(({ config, screenshot, title }) => {
64+
test.describe(title('accordion: basic'), () => {
65+
test('should not have visual regressions with text content', async ({ page }) => {
66+
await page.setContent(
67+
`
68+
<ion-accordion-group value="first">
69+
<ion-accordion value="first">
70+
<ion-item slot="header">
71+
<ion-label>Accordion title</ion-label>
72+
</ion-item>
73+
<div slot="content">This is the body of the accordion.</div>
74+
</ion-accordion>
75+
<ion-accordion value="second">
76+
<ion-item slot="header">
77+
<ion-label>Accordion title</ion-label>
78+
</ion-item>
79+
<div slot="content">This is the body of the accordion.</div>
80+
</ion-accordion>
81+
<ion-accordion value="third">
82+
<ion-item slot="header">
83+
<ion-label>Accordion title</ion-label>
84+
</ion-item>
85+
<div slot="content">This is the body of the accordion.</div>
86+
</ion-accordion>
87+
</ion-accordion-group>
88+
`,
89+
config
90+
);
91+
92+
const accordion = page.locator('ion-accordion-group');
93+
94+
await expect(accordion).toHaveScreenshot(screenshot('accordion-basic-text'));
95+
});
96+
});
97+
});
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)