Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web: Provide tests for the aggregate cards, fix a few minor things #9744

Merged
merged 56 commits into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from 53 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
3146e5a
web: fix esbuild issue with style sheets
kensternberg-authentik Mar 8, 2024
fe52f44
Merge branch 'main' into dev
kensternberg-authentik Mar 11, 2024
e505f27
Merge branch 'main' into dev
kensternberg-authentik Mar 11, 2024
5090621
Merge branch 'main' into dev
kensternberg-authentik Mar 11, 2024
035bda4
Merge branch 'main' into dev
kensternberg-authentik Mar 12, 2024
2d0117d
Merge branch 'main' into dev
kensternberg-authentik Mar 13, 2024
22cb5b7
Merge branch 'main' into dev
kensternberg-authentik Mar 14, 2024
8b4e036
Merge branch 'main' into dev
kensternberg-authentik Mar 14, 2024
db96e1a
Merge branch 'main' into dev
kensternberg-authentik Mar 18, 2024
8946b81
Merge branch 'main' into dev
kensternberg-authentik Mar 19, 2024
30beca9
Merge branch 'main' into dev
kensternberg-authentik Mar 19, 2024
5d84082
Merge branch 'main' into dev
kensternberg-authentik Mar 20, 2024
a7e3dca
Merge branch 'main' into dev
kensternberg-authentik Mar 21, 2024
2d254d6
Merge branch 'main' into dev
kensternberg-authentik Mar 25, 2024
3f95020
Merge branch 'main' into dev
kensternberg-authentik Mar 26, 2024
a056703
Merge branch 'main' into dev
kensternberg-authentik Mar 27, 2024
fc00bde
Merge branch 'main' into dev
kensternberg-authentik Mar 29, 2024
7123b2c
Merge branch 'main' into dev
kensternberg-authentik Mar 29, 2024
5d4c380
Merge branch 'main' into dev
kensternberg-authentik Apr 1, 2024
66cefcc
Merge branch 'main' into dev
kensternberg-authentik Apr 2, 2024
875fc5c
Merge branch 'main' into dev
kensternberg-authentik Apr 4, 2024
c84be1d
Merge branch 'main' into dev
kensternberg-authentik Apr 8, 2024
b08dcc2
Merge branch 'main' into dev
kensternberg-authentik Apr 9, 2024
272fdc5
Merge branch 'main' into dev
kensternberg-authentik Apr 10, 2024
23665d1
Merge branch 'main' into dev
kensternberg-authentik Apr 10, 2024
cacdf64
Merge branch 'main' into dev
kensternberg-authentik Apr 11, 2024
085debf
Merge branch 'main' into dev
kensternberg-authentik Apr 12, 2024
f19ed14
Merge branch 'main' into dev
kensternberg-authentik Apr 16, 2024
ac4ba5d
Merge branch 'main' into dev
kensternberg-authentik Apr 17, 2024
98503f6
Merge branch 'main' into dev
kensternberg-authentik Apr 18, 2024
2d94b16
Merge branch 'main' into dev
kensternberg-authentik Apr 22, 2024
34de6bf
Merge branch 'main' into dev
kensternberg-authentik Apr 24, 2024
ca42506
Merge branch 'main' into dev
kensternberg-authentik Apr 25, 2024
2a96900
Merge branch 'main' into dev
kensternberg-authentik May 2, 2024
9acebec
Merge branch 'main' into dev
kensternberg-authentik May 3, 2024
8248163
Merge branch 'main' into dev
kensternberg-authentik May 3, 2024
ee37e92
Merge branch 'main' into dev
kensternberg-authentik May 7, 2024
e1d565d
Merge branch 'main' into dev
kensternberg-authentik May 8, 2024
3d532d4
Merge branch 'main' into dev
kensternberg-authentik May 9, 2024
fffc8c7
Merge branch 'main' into dev
kensternberg-authentik May 10, 2024
61717b1
web: provide a test framework
kensternberg-authentik May 10, 2024
ac8ecf1
Rolling back a reversion.
kensternberg-authentik May 10, 2024
3fae9e5
Merge branch 'main' into dev
kensternberg-authentik May 13, 2024
9133ab6
Merge branch 'dev' into web/automated-testing
kensternberg-authentik May 13, 2024
09803fe
Merge branch 'main' into dev
kensternberg-authentik May 14, 2024
99f8802
web: update storybook, storybook a few things, fix a few things
kensternberg-authentik May 14, 2024
beab52d
Slight revision in exception logic.
kensternberg-authentik May 14, 2024
234d52d
Added a ton of documentation; made the failure message configurable.
kensternberg-authentik May 14, 2024
c46fc3e
A few documentation changes.
kensternberg-authentik May 15, 2024
41c362e
Adjusting paths to work with tests.
kensternberg-authentik May 15, 2024
04355d8
Merge branch 'web/automated-testing' into web/cleanup/admin-overview-…
kensternberg-authentik May 15, 2024
83bac1f
web: Provide tests for the aggregate cards, fix a few minor things
kensternberg-authentik May 15, 2024
bd6651e
Prettier had opinions.
kensternberg-authentik May 15, 2024
d3c2870
Merge branch 'main' into web/cleanup/admin-overview-testing
kensternberg-authentik Aug 6, 2024
8659883
Merge branch 'main' into web/cleanup/admin-overview-testing
kensternberg-authentik Aug 23, 2024
012cb0a
Merge and catching up with the evolution of our test framework.
kensternberg-authentik Aug 23, 2024
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
4 changes: 3 additions & 1 deletion web/.storybook/authentikTheme.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { create } from "@storybook/theming/create";

const isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;

export default create({
base: "light",
base: isDarkMode ? "dark" : "light",
brandTitle: "authentik Storybook",
brandUrl: "https://goauthentik.io",
brandImage: "https://goauthentik.io/img/icon_left_brand_colour.svg",
Expand Down
8 changes: 6 additions & 2 deletions web/.storybook/css-import-maps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ const rawCssImportMaps = [
'import PFSizing from "@patternfly/patternfly/utilities/Sizing/sizing.css";',
'import PFSpacing from "@patternfly/patternfly/utilities/Spacing/spacing.css";',
'import PFSpinner from "@patternfly/patternfly/components/Spinner/spinner.css";',
'import PFSplit from "@patternfly/patternfly/layouts/Split/split.css";',
'import PFStack from "@patternfly/patternfly/layouts/Stack/stack.css";',
'import PFSwitch from "@patternfly/patternfly/components/Switch/switch.css";',
'import PFTable from "@patternfly/patternfly/components/Table/table.css";',
'import PFTabs from "@patternfly/patternfly/components/Tabs/tabs.css";',
'import PFText from "@patternfly/patternfly/utilities/Text/text.css";',
'import PFTitle from "@patternfly/patternfly/components/Title/title.css";',
'import PFToggleGroup from "@patternfly/patternfly/components/ToggleGroup/toggle-group.css";',
'import PFToolbar from "@patternfly/patternfly/components/Toolbar/toolbar.css";',
Expand All @@ -71,8 +73,10 @@ const rawCssImportMaps = [
'import styles from "./LibraryPageImpl.css";',
];

const cssImportMaps = rawCssImportMaps.reduce((acc, line) => (
{...acc, [line]: line.replace(/\.css/, ".css?inline")}), {});
const cssImportMaps = rawCssImportMaps.reduce(
(acc, line) => ({ ...acc, [line]: line.replace(/\.css/, ".css?inline") }),
{},
);

export { cssImportMaps };
export default cssImportMaps;
14 changes: 14 additions & 0 deletions web/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@ const config: StorybookConfig = {
"@jeysal/storybook-addon-css-user-preferences",
"storybook-addon-mock",
],
staticDirs: [
{
from: "../node_modules/@patternfly/patternfly/patternfly-base.css",
to: "@patternfly/patternfly/patternfly-base.css",
},
{
from: "../src/common/styles/authentik.css",
to: "@goauthentik/common/styles/authentik.css",
},
{
from: "../src/common/styles/theme-dark.css",
to: "@goauthentik/common/styles/theme-dark.css",
},
],
framework: {
name: "@storybook/web-components-vite",
options: {},
Expand Down
60 changes: 60 additions & 0 deletions web/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<link rel="stylesheet" href="@patternfly/patternfly/patternfly-base.css" />
<link rel="stylesheet" href="@goauthentik/common/styles/authentik.css" />
<style>
body {
overflow-y: scroll;
margin: 0;
}

.sb-main-padded {
padding: 0 !important;
}

.story-shadow-container {
background-color: #fff;
box-shadow: 0 0 0.25em #ddd;
box-sizing: border-box;
display: flex;
flex-direction: column;
gap: 1em;
margin: 0 auto;
max-width: 72em;
padding: 1em;
width: 100%;
}

.docs-story .story-shadow-container {
box-shadow: none;
}

.story-shadow-container[display-mode="flex-wrap"] {
flex-wrap: wrap;
flex-direction: row;
}

.title {
border-bottom: 1px solid #ccc;
color: #333;
font-size: 13px;
font-weight: bold;
margin: 2rem -1rem 1rem;
padding-bottom: 0.25rem;
padding-left: 1rem;
}

.title code {
background-color: #f5f5f5;
border-radius: 0.25rem;
font-weight: bold;
padding: 0.1rem 0.25rem;
}

.sbdocs-preview .hljs {
color: #fff !important;
white-space: pre-line;
}

.sbdocs-pre > div {
margin: 1em 0;
}
</style>
5 changes: 5 additions & 0 deletions web/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import "@patternfly/patternfly/patternfly-base.css";

const preview: Preview = {
parameters: {
options: {
storySort: {
method: "alphabetical",
},
},
actions: { argTypesRegex: "^on[A-Z].*" },
cssUserPrefs: {
"prefers-color-scheme": "light",
Expand Down
Loading
Loading