authentik icon indicating copy to clipboard operation
authentik copied to clipboard

web: provide a test framework

Open kensternberg-authentik opened this issue 1 year ago • 4 comments

Details

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.

  • [X] The code has been formatted (make web)

kensternberg-authentik avatar May 10 '24 16:05 kensternberg-authentik

Deploy Preview for authentik-docs canceled.

Name Link
Latest commit abc0d46272ff5c512c0cfd7ce593cb39fbcf3f16
Latest deploy log https://app.netlify.com/sites/authentik-docs/deploys/667d999241ce6500083d41d7

netlify[bot] avatar May 10 '24 16:05 netlify[bot]

Deploy Preview for authentik-storybook ready!

Name Link
Latest commit abc0d46272ff5c512c0cfd7ce593cb39fbcf3f16
Latest deploy log https://app.netlify.com/sites/authentik-storybook/deploys/667d9992797a1e00080a9e3c
Deploy Preview https://deploy-preview-9681--authentik-storybook.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar May 10 '24 16:05 netlify[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.64%. Comparing base (eff85e4) to head (abc0d46). Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9681      +/-   ##
==========================================
- Coverage   92.65%   92.64%   -0.01%     
==========================================
  Files         713      713              
  Lines       34970    34970              
==========================================
- Hits        32400    32399       -1     
- Misses       2570     2571       +1     
Flag Coverage Δ
e2e 49.54% <ø> (+<0.01%) :arrow_up:
integration 25.39% <ø> (ø)
unit 90.12% <ø> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 10 '24 16:05 codecov[bot]

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-ghcr.io/goauthentik/dev-server:gh-86994e606881a36d42427b17c3079e8720f5d3b9
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-86994e606881a36d42427b17c3079e8720f5d3b9-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 Kubernetes

Add the following block to your values.yml file:

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-86994e606881a36d42427b17c3079e8720f5d3b9

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-86994e606881a36d42427b17c3079e8720f5d3b9-arm64

Afterwards, run the upgrade commands from the latest release notes.

github-actions[bot] avatar May 10 '24 17:05 github-actions[bot]

Approved on the CI side

@rissson I'm really anxious about this one because of the spotlight/storybook issue, which leads to having nonsense like this addition to the PR I did yesterday to make it pass CI, a live-patch to compiled code.

kensternberg-authentik avatar Jun 14 '24 14:06 kensternberg-authentik

Approved on the CI side

@rissson I'm really anxious about this one because of the spotlight/storybook issue, which leads to having nonsense like this addition to the PR I did yesterday to make it pass CI, a live-patch to compiled code.

The things is we only require ci-web-mark to pass for PRs and such to be able to proceed. So even if the test job fails, we won't be blocked on other things.

rissson avatar Jun 14 '24 14:06 rissson