Playwright Proof of Concept Setup Notes

Set up working environment

 

Toggling fake authentication

*NOTE: This step is already done and deployed to rsig-playwright.azure.net , but will be important to run the tests locally in the future *

  • In order to test with playwright we must fake an authenticated user. This can be done with the FakeAuthenticationStateProvider class within our codebase.

  • The following changes must be made to program.cs:

    • Remove the following line:

      • options.FallbackPolicy = options.DefaultPolicy;
    • Add the following line anywhere in the file before “app.UseAuthentication()” :

      • builder.Services.AddScoped<AuthenticationStateProvider, FakeAuthenticationStateProvider>();