Merged
Conversation
# What While testing, I discovered that the `disabled` feature was not working as expected. The visuals weren’t being applied correctly, which required some CSS work to correct. This also fixed the issue where the pointer events weren’t being disabled at the same time. There were two issues: the concrete controls were being applied to the wrong component, and the CSS cascade was being read in the wrong order. `disabled` takes priority over virtually everything else, so it has to go at the bottom of the CSS field. After that, I applied [the ARIA rules for disabled links](https://www.w3.org/TR/html-aria/#example-communicate-a-disabled-link-with-aria), which specifies that “to communicate a link as ‘disabled,’ remove the `href` attribute and style accordingly.” That, in turn, caused the underline to go away, which was not desired, so when the displayed part is a “disabled anchor,” I added CSS to force the underline to return. I have added a story to show that the disabled button and disabled link work as expected.
✅ Deploy Preview for authentik-elements-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com>
GirlBossRush
approved these changes
Jan 8, 2026
| expect(button).toHaveElementClass("danger"); | ||
| // Verify slotted text content | ||
| const component = document.querySelector("ak-button"); | ||
| expect(component?.textContent?.trim()).toBe("Click to leave"); |
Collaborator
There was a problem hiding this comment.
Not sure if this is the API, do these need await?
Suggested change
| expect(component?.textContent?.trim()).toBe("Click to leave"); | |
| await expect(component?.textContent?.trim()).toBe("Click to leave"); |
Collaborator
Author
There was a problem hiding this comment.
No, expect.element does a lookup asynchronously, so it needs to be awaited; in this case, we're just using the standard expect syntax, which is synchronous.
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com>
Co-authored-by: Teffen Ellis <592134+GirlBossRush@users.noreply.github.com> Signed-off-by: Ken Sternberg <133134217+kensternberg-authentik@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
elements: Move testing to vitest + playwright
What
Remove WebdriverIO as our testing framework, and switch to using vitest + playwright. Re-write all existing tests to use the new testing framework.
Many of the tests removed were auto-generated and, it turns out, unnecessary. They tested that if you set a property value, the property value was set; this is only relevant if we’re actively changing property values at the host level, something you should never do except when using
reflect, which none of the components in the infrastructure collection do.What’s left are the purely functional tests. In the case of Icons, there are still a lot because a lot of values are forwarded from the
:hostto the icon. But many are simply missing because they’re pure CSS; they only manifest because:host([somesetting])triggered a CSS change, and have no behavioral consequences. As a result, they can’t really be tested, only eyeballed, which is why there are storybooks for all of those.This PR also includes a github action to run these tests in CI/CD.