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

Add possibility to provide CollectStates in UseSimulatedEnvironment #397

Open
Abrissirba opened this issue Dec 14, 2022 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@Abrissirba
Copy link
Contributor

Is your feature request related to a problem? Please describe.
The time it takes to authenticate using UseSimulatedEnvironment is over 10 seconds. In one way it is a good way to illustrate how long it takes in real life and you get to see some different CollectStates in the UI. However, when you use the simulated environment in test environments or unit/integration tests it gets cumbersome to have to wait that long.

What area is it related to
Core

Describe the solution you'd like
One possible solution would be to add a parameter to UseSimulatedEnvironment to be able to set the List collectStates that is exposed in one of the constructors of BankIdSimulatedApiClient.

To make it easier some defaults could be exposed as a static, for example

  • Normal - tries to imitate a "normal" flow
  • All - Includes all the collect states to be able to verify that the ui can handle all different text lengths
  • Fast - As few states as possible to make the sign in as fast as possible.

Describe alternatives you've considered
Today it is possible to do this by implementing your own verison of UseSimulatedEnvironment by copying the private method from here, https://github.com/ActiveLogin/ActiveLogin.Authentication/blob/main/src/ActiveLogin.Authentication.BankId.Core/IBankIdBuilderExtensions.cs#L217-L234, and pass in your own instance of BankIdSimulatedApiClient

@Abrissirba Abrissirba added the enhancement New feature or request label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant