Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/calcite-components/src/components/alert/alert.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { E2EElement, E2EPage, newE2EPage } from "@stencil/core/testing";
import { html } from "../../../support/formatting";
import { accessible, hidden, HYDRATED_ATTR, renders, t9n } from "../../tests/commonTests";
import { accessible, defaults, hidden, HYDRATED_ATTR, renders, t9n } from "../../tests/commonTests";
import { getElementXY } from "../../tests/utils";
import { CSS, DURATIONS } from "./resources";

describe("defaults", () => {
defaults("calcite-alert", [
{
propertyName: "autoCloseDuration",
defaultValue: "medium"
}
]);
});

describe("calcite-alert", () => {
const alertContent = `
<div slot="title">Title Text</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/calcite-components/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export class Alert implements OpenCloseComponent, LoadableComponent, T9nComponen
@Prop({ reflect: true }) autoClose = false;

/** Specifies the duration before the component automatically closes (only use with `autoClose`). */
@Prop({ reflect: true }) autoCloseDuration: AlertDuration = this.autoClose ? "medium" : null;
@Prop({ reflect: true }) autoCloseDuration: AlertDuration = "medium";

/** Specifies the kind of the component (will apply to top border and icon). */
@Prop({ reflect: true }) kind: Extract<
Expand Down