-
-
Notifications
You must be signed in to change notification settings - Fork 570
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
base: web/cleanup/admin-overview
Are you sure you want to change the base?
web: Provide tests for the aggregate cards, fix a few minor things #9744
Conversation
As is typical of a system where a new build engine is involved, this thing is sadly fragile. Use the wrong import style in wdio.conf.js and it breaks; there are several notes in tsconfig.test.conf and wdio.conf.ts to tell eslint or tsc not to complain, it's just a different build with different criteria, the native criteria don't apply. On the other hand, writing tests is easy and predictable. We can test behaviors at the unit and component scale in a straightforward manner, and validate our expectations that things work the way we believe they should.
* dev: web: bump esbuild from 0.21.1 to 0.21.2 in /web (#9696) web: bump chromedriver from 124.0.2 to 124.0.3 in /tests/wdio (#9692) website: bump @types/react from 18.3.1 to 18.3.2 in /website (#9691) core, web: update translations (#9672) core: bump psycopg from 3.1.18 to 3.1.19 (#9698) core: bump google-api-python-client from 2.128.0 to 2.129.0 (#9694) web: bump the esbuild group in /web with 2 updates (#9695) web: bump glob from 10.3.14 to 10.3.15 in /web (#9697) core: bump freezegun from 1.5.0 to 1.5.1 (#9693) web: fix value handling inside controlled components (#9648)
…testing * web/automated-testing: Adjusting paths to work with tests. Rolling back a reversion. web: provide a test framework
This commit provides tests alongside the stories for the aggregate cards. The tests are fairly basic, but they're good enough for starting *and* they provide a pretty good example of how to test when a promise with a delay is involved. Two minor fixes in this code: - The subtext was given a small amount of whitespace above, to remove the crowding that happened. It looks much better with a half-rem of space. - In the rare case that we have a card header with no icon, the ' ' symbol that separates the icon from the header is now not rendered. In the previous form, it would push the header to the left, making it "hang in space" one rem to the right of the visual line formed by the rightmost content border. The padding between the header, body, and footer is odd; body is 1 rem, the header and footer 2rems. This looks good for the graphs, but for the text, not so much.
✅ Deploy Preview for authentik-docs canceled.
|
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -82,6 +82,7 @@ export class AggregateCard extends AKElement implements IAggregateCard { | |||
text-align: center; | |||
} | |||
.subtext { | |||
margin-top: var(--pf-global--spacer--sm); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little more whitespace and breathing room.
<i class="${ifDefined(this.icon)}"></i> ${this.renderHeader()} | ||
${this.icon | ||
? html`<i class="${ifDefined(this.icon)}"></i> ` | ||
: nothing}${this.renderHeader()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't include the if there's no icon.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## web/cleanup/admin-overview #9744 +/- ##
===========================================================
Coverage 92.39% 92.39%
===========================================================
Files 704 704
Lines 34403 34403
===========================================================
Hits 31787 31787
Misses 2616 2616
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-ghcr.io/goauthentik/dev-server:gh-bd6651ebfebae84116761098e6a96576d966f20f
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s For arm64, use these values: AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-ghcr.io/goauthentik/dev-server:gh-bd6651ebfebae84116761098e6a96576d966f20f-arm64
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s Afterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-ghcr.io/goauthentik/dev-server:gh-bd6651ebfebae84116761098e6a96576d966f20f For arm64, use these values: authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-ghcr.io/goauthentik/dev-server:gh-bd6651ebfebae84116761098e6a96576d966f20f-arm64 Afterwards, run the upgrade commands from the latest release notes. |
web: Provide tests for the aggregate cards, fix a few minor things
Details
This commit provides tests alongside the stories for the aggregate cards. The tests are fairly basic, but they’re good enough for starting and they provide a pretty good example of how to test when a promise with a delay is involved.
Two minor fixes in this code:
The subtext was given a small amount of whitespace above, to remove the crowding that happened. It looks much better with a half-rem of space.
In the rare case that we have a card header with no icon, the ‘ ’ symbol that separates the icon from the header is now not rendered. In the previous form, it would push the header to the left, making it “hang in space” one rem to the right of the visual line formed by the rightmost content border. The padding between the header, body, and footer is odd; body is 1 rem, the header and footer 2rems. This looks good for the graphs, but for the text, not so much.
The code has been formatted (
make web
)The documentation has been updated