mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
feat(toggle): expose label wrapper as shadow part (#28585)
This commit is contained in:
@ -40,6 +40,19 @@ describe('toggle', () => {
|
||||
expect(t.enableOnOffLabels).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('shadow parts', () => {
|
||||
it('should have shadow parts', async () => {
|
||||
const page = await newSpecPage({
|
||||
components: [Toggle],
|
||||
html: `<ion-toggle>Label</ion-toggle>`,
|
||||
});
|
||||
const toggle = page.body.querySelector('ion-toggle')!;
|
||||
expect(toggle).toHaveShadowPart('label');
|
||||
expect(toggle).toHaveShadowPart('track');
|
||||
expect(toggle).toHaveShadowPart('handle');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('ion-toggle: disabled', () => {
|
||||
|
||||
Reference in New Issue
Block a user