test for authentication and oidc closes #120 #123

Merged
carla merged 2 commits from feature/oidc_tests into main 2025-07-31 14:25:31 +02:00
Owner
No description provided.
moritz self-assigned this 2025-07-24 17:12:55 +02:00
moritz added 2 commits 2025-07-24 17:12:56 +02:00
feat: test authentication
All checks were successful
continuous-integration/drone/push Build is passing
109427cf56
moritz added this to the Sprint 4 - 09.07 - 30.07 project 2025-07-24 17:13:09 +02:00
requested reviews from simon, carla, rafael 2025-07-24 17:13:17 +02:00
carla approved these changes 2025-07-28 10:10:32 +02:00
@ -15,6 +15,8 @@ defmodule Mv.Accounts do
define :list_users, action: :read
define :update_user, action: :update_user
define :destroy_user, action: :destroy
define :create_register_with_rauthy, action: :register_with_rauthy
Owner

Do I get it right, that the actions are just for the tests? Or do they have othe rpurposes?

Do I get it right, that the actions are just for the tests? Or do they have othe rpurposes?
Collaborator

Yes, this is just used in the tests as far as I can see. This line adds a convenience function for calling the register_with_rauthy action like this:

Mv.Accounts.create_register_with_rauthy(...)

Which is used in the OidcIntegrationTest module.

Yes, this is just used in the tests as far as I can see. This line adds a convenience function for calling the `register_with_rauthy` action like this: ```elixir Mv.Accounts.create_register_with_rauthy(...) ``` Which is used in the `OidcIntegrationTest` module.
rafael approved these changes 2025-07-31 14:00:09 +02:00
rafael left a comment
Collaborator

This looks great and ready to merge :)

This looks great and ready to merge :)
@ -38,0 +52,4 @@
)
|> render_submit()
assert html =~ "Email or password was incorrect"
Collaborator

just a thought, how do these kinds of asserts interact with gettext? as long as we always use english as the locale for our tests, I assume we'll be fine.

In general, I try to avoid assertions that depend on arbitrary UI text like this, because it's annoying to update the tests when changing the UI. But I can't really think of an alternative here 😬

just a thought, how do these kinds of asserts interact with `gettext`? as long as we always use english as the locale for our tests, I assume we'll be fine. In general, I try to avoid assertions that depend on arbitrary UI text like this, because it's annoying to update the tests when changing the UI. But I can't really think of an alternative here 😬
Owner

We should anyways check if the flash core component which is a div with role "alert" is accessible to screenreaders. But just an idea: it has the css class alert-error and we could test for that. But just a minor thing, overall I agree that the PR is ready to merge :)

We should anyways check if the flash core component which is a div with role "alert" is accessible to screenreaders. But just an idea: it has the css class alert-error and we could test for that. But just a minor thing, overall I agree that the PR is ready to merge :)
carla force-pushed feature/oidc_tests from 109427cf56 to 8507109631 2025-07-31 14:18:40 +02:00 Compare
carla merged commit 0c48ed4320 into main 2025-07-31 14:25:31 +02:00
carla deleted branch feature/oidc_tests 2025-07-31 14:25:32 +02:00
Sign in to join this conversation.
No description provided.