Prettier had opinions.

This commit is contained in:
Ken Sternberg
2024-05-15 16:05:54 -07:00
parent 83bac1ff6d
commit bd6651ebfe
3 changed files with 14 additions and 9 deletions

View File

@ -1,7 +1,6 @@
import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js"; import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js";
import { $, expect } from "@wdio/globals"; import { $, expect } from "@wdio/globals";
import { msg } from "@lit/localize";
import { TemplateResult, html, render as litRender } from "lit"; import { TemplateResult, html, render as litRender } from "lit";
import AKGlobal from "@goauthentik/common/styles/authentik.css"; import AKGlobal from "@goauthentik/common/styles/authentik.css";

View File

@ -1,7 +1,6 @@
import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js"; import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js";
import { $, expect } from "@wdio/globals"; import { $, expect } from "@wdio/globals";
import { msg } from "@lit/localize";
import { TemplateResult, html, render as litRender } from "lit"; import { TemplateResult, html, render as litRender } from "lit";
import AKGlobal from "@goauthentik/common/styles/authentik.css"; import AKGlobal from "@goauthentik/common/styles/authentik.css";
@ -27,6 +26,7 @@ describe("ak-aggregate-card-promise", () => {
render(html`<ak-aggregate-card-promise .promise=${promise}></ak-aggregate-card-promise>`); render(html`<ak-aggregate-card-promise .promise=${promise}></ak-aggregate-card-promise>`);
const component = await $("ak-aggregate-card-promise"); const component = await $("ak-aggregate-card-promise");
// Assert we're in pre-resolve mode
await expect(await component.$(">>>.pf-c-card__header a")).not.toExist(); await expect(await component.$(">>>.pf-c-card__header a")).not.toExist();
await expect(await component.$(">>>ak-spinner")).toExist(); await expect(await component.$(">>>ak-spinner")).toExist();
await promise; await promise;
@ -47,6 +47,7 @@ describe("ak-aggregate-card-promise", () => {
); );
const component = await $("ak-aggregate-card-promise"); const component = await $("ak-aggregate-card-promise");
// Assert we're in pre-resolve mode
await expect(await component.$(">>>.pf-c-card__header a")).not.toExist(); await expect(await component.$(">>>.pf-c-card__header a")).not.toExist();
await expect(await component.$(">>>ak-spinner")).toExist(); await expect(await component.$(">>>ak-spinner")).toExist();
try { try {

View File

@ -28,12 +28,17 @@ const ACTIONS: QuickAction[] = [
describe("ak-quick-actions-card", () => { describe("ak-quick-actions-card", () => {
it("display ak-quick-actions-card", async () => { it("display ak-quick-actions-card", async () => {
render(html`<ak-quick-actions-card title="Alt Title" .actions=${ACTIONS}></ak-quick-actions-card>`); render(
html`<ak-quick-actions-card
title="Alt Title"
.actions=${ACTIONS}
></ak-quick-actions-card>`,
);
const component = await $("ak-quick-actions-card"); const component = await $("ak-quick-actions-card");
const items = await component.$$('>>>.pf-c-list li'); const items = await component.$$(">>>.pf-c-list li");
await expect(Array.from(items).length).toEqual(5); await expect(Array.from(items).length).toEqual(5);
await expect(await component.$(">>>.pf-c-list li:nth-of-type(4)")).toHaveText("Manage users"); await expect(await component.$(">>>.pf-c-list li:nth-of-type(4)")).toHaveText(
}) "Manage users",
}) );
});
});