Skip to content

Commit

Permalink
Merge branch 'web/element/ak-select-table' into web/policy-wizard-3
Browse files Browse the repository at this point in the history
* web/element/ak-select-table:
  Prettier had opinions
  web: small fixes for elements and forms
  web: not sure where all these getElement() additions come from; did I add them?  Anyway, they were breaking the tests, they're a Wdio9-ism.
  web: rollback dependabot "upgrade" that broke testing
  web: update api-less tables
  • Loading branch information
kensternberg-authentik committed Sep 27, 2024
2 parents 1bcecb2 + 9e1731d commit 59f884b
Show file tree
Hide file tree
Showing 10 changed files with 287 additions and 234 deletions.
477 changes: 261 additions & 216 deletions web/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"@types/eslint__js": "^8.42.3",
"@types/grecaptcha": "^3.0.9",
"@types/guacamole-common-js": "1.5.2",
"@types/mocha": "^10.0.8",
"@types/node": "^22.7.3",
"@types/showdown": "^2.0.6",
"@typescript-eslint/eslint-plugin": "^8.7.0",
Expand Down
4 changes: 2 additions & 2 deletions web/src/admin/enterprise/EnterpriseStatusCard.test.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js";
import { $, expect } from "@wdio/globals";

import { msg } from "@lit/localize";
import { TemplateResult, html, render as litRender } from "lit";

import AKGlobal from "@goauthentik/common/styles/authentik.css";
import AKGlobal from "../../common/styles/authentik.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";

import { LicenseForecast, LicenseSummary, LicenseSummaryStatusEnum } from "@goauthentik/api";

import { ensureCSSStyleSheet } from "../../elements/utils/ensureCSSStyleSheet.js";
import "./EnterpriseStatusCard.js";

const render = (body: TemplateResult) => {
Expand Down
4 changes: 2 additions & 2 deletions web/src/elements/EmptyState.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js";
import { $, expect } from "@wdio/globals";

import { msg } from "@lit/localize";
import { TemplateResult, html, render as litRender } from "lit";

import AKGlobal from "@goauthentik/common/styles/authentik.css";
import AKGlobal from "../common/styles/authentik.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";

import "./EmptyState.js";
import { ensureCSSStyleSheet } from "./utils/ensureCSSStyleSheet.js";

const render = (body: TemplateResult) => {
document.adoptedStyleSheets = [
Expand Down
6 changes: 3 additions & 3 deletions web/src/elements/ak-table/tests/ak-select-table.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ describe("Multiselect Table", () => {
});

it("it should render the select-all control", async () => {
const selall = await table.$("thead").$$("tr")[0].$$("th")[0];
const selall = await table.$("thead").$$("tr")[0].$$("td")[0];
if (selall === undefined) {
throw new Error("Could not find table header");
}
Expand All @@ -104,7 +104,7 @@ describe("Multiselect Table", () => {
});

it("it should select all when that control is clicked", async () => {
const selall = await table.$("thead").$$("tr")[0].$$("th")[0];
const selall = await table.$("thead").$$("tr")[0].$$("td")[0];
if (selall === undefined) {
throw new Error("Could not find table header");
}
Expand All @@ -117,7 +117,7 @@ describe("Multiselect Table", () => {
});

it("it should clear all when that control is clicked twice", async () => {
const selall = await table.$("thead").$$("tr")[0].$$("th")[0];
const selall = await table.$("thead").$$("tr")[0].$$("td")[0];
if (selall === undefined) {
throw new Error("Could not find table header");
}
Expand Down
4 changes: 2 additions & 2 deletions web/src/elements/cards/tests/AggregateCard.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js";
import { $, expect } from "@wdio/globals";

import { TemplateResult, html, render as litRender } from "lit";

import AKGlobal from "@goauthentik/common/styles/authentik.css";
import AKGlobal from "../../../common/styles/authentik.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";

import { ensureCSSStyleSheet } from "../../utils/ensureCSSStyleSheet.js";
import "../AggregateCard.js";

const render = (body: TemplateResult) => {
Expand Down
4 changes: 2 additions & 2 deletions web/src/elements/cards/tests/AggregatePromiseCard.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js";
import { $, expect } from "@wdio/globals";

import { TemplateResult, html, render as litRender } from "lit";

import AKGlobal from "@goauthentik/common/styles/authentik.css";
import AKGlobal from "../../../common/styles/authentik.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";

import { ensureCSSStyleSheet } from "../../utils/ensureCSSStyleSheet.js";
import "../AggregatePromiseCard.js";

const render = (body: TemplateResult) => {
Expand Down
4 changes: 2 additions & 2 deletions web/src/elements/cards/tests/QuickActionCard.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ensureCSSStyleSheet } from "@goauthentik/elements/utils/ensureCSSStyleSheet.js";
import { $, expect } from "@wdio/globals";

import { TemplateResult, html, render as litRender } from "lit";

import AKGlobal from "@goauthentik/common/styles/authentik.css";
import AKGlobal from "../../../common/styles/authentik.css";
import PFBase from "@patternfly/patternfly/patternfly-base.css";

import { ensureCSSStyleSheet } from "../../utils/ensureCSSStyleSheet.js";
import { QuickAction } from "../QuickActionsCard.js";
import "../QuickActionsCard.js";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
/* eslint-env jest */
import { AKElement } from "@goauthentik/elements/Base";
import { bound } from "@goauthentik/elements/decorators/bound.js";
import { CustomListenerElement } from "@goauthentik/elements/utils/eventEmitter";
import { $, browser, expect } from "@wdio/globals";
import { slug } from "github-slugger";

import { html, render } from "lit";
import { customElement } from "lit/decorators.js";
import { property, query } from "lit/decorators.js";

import { AKElement } from "../../../../elements/Base.js";
import { bound } from "../../../../elements/decorators/bound.js";
import { CustomListenerElement } from "../../../../elements/utils/eventEmitter";
import "../ak-search-select.js";
import { SearchSelect } from "../ak-search-select.js";
import { type ViewSample, sampleData } from "../stories/sampleData.js";
Expand Down
11 changes: 9 additions & 2 deletions web/tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
"paths": {
"@goauthentik/docs/*": ["../website/docs/*"]
},
"types": ["@wdio/types", "grecaptcha"],
"types": [
"node",
"@wdio/mocha-framework",
"@wdio/types",
"expect-webdriverio",
"grecaptcha"
],
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"experimentalDecorators": true,
Expand Down Expand Up @@ -58,5 +64,6 @@
}
}
]
}
},
"exclude": ["src/**/*.test.ts"]
}

0 comments on commit 59f884b

Please sign in to comment.