Skip to content

Commit

Permalink
I can live with this
Browse files Browse the repository at this point in the history
  • Loading branch information
dancormier committed Jul 17, 2023
1 parent f9eab33 commit ba9843e
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 41 deletions.
13 changes: 7 additions & 6 deletions lib/components/block-link/block-link.a11y.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { defaultOptions, runComponentTests } from "../../test/test-utils";
import "../../index";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const blockLinkTemplate = ({ component, testid }: any) => html`<div
class="d-inline-flex ai-center jc-center hs1 ws2 p8"
data-testid="${testid}"
>
${component}
</div>`;
const blockLinkTemplate = ({ component, testid }: any) =>
html`<div
class="d-inline-flex ai-center jc-center hs1 ws2 p8"
data-testid="${testid}"
>
${component}
</div>`;

describe("block-link", () => {
// Base block link
Expand Down
13 changes: 7 additions & 6 deletions lib/components/block-link/block-link.visual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { defaultOptions, runComponentTests } from "../../test/test-utils";
import "../../index";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const blockLinkTemplate = ({ component, testid }: any) => html`<div
class="d-inline-flex ai-center jc-center hs1 ws2 p8"
data-testid="${testid}"
>
${component}
</div>`;
const blockLinkTemplate = ({ component, testid }: any) =>
html`<div
class="d-inline-flex ai-center jc-center hs1 ws2 p8"
data-testid="${testid}"
>
${component}
</div>`;

describe("block-link", () => {
// Base block link
Expand Down
13 changes: 7 additions & 6 deletions lib/components/card/card.visual.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import { defaultOptions, runComponentTests } from "../../test/test-utils";
import "../../index";

// eslint-disable-next-line @typescript-eslint/no-explicit-any
const cardTemplate = ({ component, testid }: any) => html`<div
class="d-inline-flex ai-center jc-center hs2 ws3 p8"
data-testid="${testid}"
>
${component}
</div>`;
const cardTemplate = ({ component, testid }: any) =>
html`<div
class="d-inline-flex ai-center jc-center hs2 ws3 p8"
data-testid="${testid}"
>
${component}
</div>`;

const baseChild = `
<h2 class="fs-body3 lh-sm fc-dark">Base card title</h2>
Expand Down
47 changes: 24 additions & 23 deletions lib/components/toast/toast.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@ import { showToast, hideToast } from "../../controllers";

const user = userEvent.setup();

const testToast = (hidden = true) => html` <button
class="js-open-test-toast"
data-toggle="s-toast"
data-target="#test-toast"
>
Show test toast
</button>
<button type="button" aria-label="Dismiss">Close toast</button>
<div
role="alertdialog"
id="test-toast"
class="s-toast"
aria-hidden="${hidden}"
aria-labelledby="toast-message"
data-controller="s-toast"
data-s-toast-target="toast"
data-s-toast-return-element=".js-open-test-toast[data-target='#test-toast']"
data-testid="test-toast"
>
<aside class="s-notice s-notice__success">
<div id="notice-message">Test toast</div>
</aside>
</div>`;
const testToast = (hidden = true) =>
html` <button
class="js-open-test-toast"
data-toggle="s-toast"
data-target="#test-toast"
>
Show test toast
</button>
<button type="button" aria-label="Dismiss">Close toast</button>
<div
role="alertdialog"
id="test-toast"
class="s-toast"
aria-hidden="${hidden}"
aria-labelledby="toast-message"
data-controller="s-toast"
data-s-toast-target="toast"
data-s-toast-return-element=".js-open-test-toast[data-target='#test-toast']"
data-testid="test-toast"
>
<aside class="s-notice s-notice__success">
<div id="notice-message">Test toast</div>
</aside>
</div>`;

describe("toast", () => {
it("trigger should make toast visible", async () => {
Expand Down

0 comments on commit ba9843e

Please sign in to comment.