Skip to content

Commit

Permalink
background-color and tip-spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
Elijbet committed Jun 18, 2024
1 parent b13365c commit 9692222
Showing 1 changed file with 34 additions and 14 deletions.
48 changes: 34 additions & 14 deletions packages/calcite-components/src/components/shell/shell.e2e.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { newE2EPage } from "@stencil/core/testing";
import { accessible, hidden, renders, slots, themed } from "../../tests/commonTests";
import { html } from "../../../support/formatting";
import { ComponentTestTokens } from "../../tests/commonTests/themed";
import { CSS, SLOTS } from "./resources";

describe("calcite-shell", () => {
Expand Down Expand Up @@ -123,18 +124,28 @@ describe("calcite-shell", () => {
});
});

describe("slotted overrides", () => {
themed(
html`
<calcite-shell>
<calcite-panel heading="Leading panel content"></calcite-panel>
<calcite-flow heading="Leading panel content"></calcite-flow>
<calcite-shell-center-row slot="${SLOTS.panelBottom}"></calcite-shell-center-row>
<calcite-shell-center-row slot="${SLOTS.panelTop}"></calcite-shell-center-row>
<calcite-shell-center-row slot="${SLOTS.centerRow}"></calcite-shell-center-row>
</calcite-shell>
`,
{
const tipMangerHTML = html`
<calcite-tip-manager>
<calcite-tip heading="Example tip title">
<calcite-link href="http://www.esri.com">An example link</calcite-link>
</calcite-tip>
</calcite-tip-manager>
`;

describe("theme", () => {
const shellHTML = html`
<calcite-shell>
${tipMangerHTML}
<calcite-panel heading="Leading panel content"></calcite-panel>
<calcite-flow heading="Leading panel content"></calcite-flow>
<calcite-shell-center-row slot="${SLOTS.panelBottom}"></calcite-shell-center-row>
<calcite-shell-center-row slot="${SLOTS.panelTop}"></calcite-shell-center-row>
<calcite-shell-center-row slot="${SLOTS.centerRow}"></calcite-shell-center-row>
</calcite-shell>
`;

describe("default", () => {
const tokens: ComponentTestTokens = {
"--calcite-shell-border-color": [
{
selector: `calcite-panel`,
Expand All @@ -157,6 +168,15 @@ describe("slotted overrides", () => {
targetProp: "borderColor",
},
],
},
);
"--calcite-shell-background-color": {
targetProp: "backgroundColor",
},
"--calcite-shell-tip-spacing": {
selector: `calcite-tip-manager`,
targetProp: "insetInline",
},
};

themed(async () => shellHTML, tokens);
});
});

0 comments on commit 9692222

Please sign in to comment.