mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-14 16:52:26 +08:00
test(breadcrumbs): check color attribute renders in the DOM (#27080)
Co-authored-by: liamdebeasi <liamdebeasi@users.noreply.github.com>
This commit is contained in:
@ -51,3 +51,18 @@ it('should exclude the separator from narrators', async () => {
|
||||
|
||||
expect(separator.getAttribute('aria-hidden')).toBe('true');
|
||||
});
|
||||
|
||||
it('should have color attribute', async () => {
|
||||
const page = await newSpecPage({
|
||||
components: [Breadcrumb, Breadcrumbs],
|
||||
html: `
|
||||
<ion-breadcrumbs color="danger">
|
||||
<ion-breadcrumb>First</ion-breadcrumb>
|
||||
</ion-breadcrumbs>
|
||||
`,
|
||||
});
|
||||
|
||||
const breadcrumbs = page.body.querySelector('ion-breadcrumbs');
|
||||
|
||||
expect(breadcrumbs.hasAttribute('color')).toBe(true);
|
||||
});
|
||||
|
@ -1,9 +0,0 @@
|
||||
describe("Components: Breadcrumbs", () => {
|
||||
beforeEach(() => {
|
||||
cy.visit("http://localhost:8080/components/breadcrumbs");
|
||||
});
|
||||
|
||||
it("should have color attribute", () => {
|
||||
cy.get('ion-breadcrumbs#color').should('have.prop', 'color');
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user