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
12 changes: 12 additions & 0 deletions packages/calcite-components/src/components/panel/panel.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,18 @@ describe("calcite-panel", () => {
expect(await container.isVisible()).toBe(false);
});

it("honors closed prop initially", async () => {
Comment thread
driskull marked this conversation as resolved.
const page = await newE2EPage();

await page.setContent("<calcite-panel closed closable>test</calcite-panel>");

const container = await page.find(`calcite-panel >>> .${CSS.container}`);

await page.waitForChanges();

expect(await container.isVisible()).toBe(false);
});

it("should handle rejected 'beforeClose' promise'", async () => {
const page = await newE2EPage();

Expand Down
1 change: 1 addition & 0 deletions packages/calcite-components/src/components/panel/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ export class Panel

async componentWillLoad(): Promise<void> {
setUpLoadableComponent(this);
this.isClosed = this.closed;
await setUpMessages(this);
}

Expand Down