Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanJosipovic committed Nov 9, 2023
1 parent 5cb5f95 commit 555c18e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install Playwright
working-directory: tests/oidc-guard-tests/bin/Release/net8.0
run: ./playwright.ps1 install
run: ./playwright.ps1 install --with-deps
shell: pwsh

- name: .NET Test
Expand Down
10 changes: 5 additions & 5 deletions tests/oidc-guard-tests/EndToEndNginx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace oidc_guard_tests
[Collection(EndToEndFixture.FixtureName)]
public class EndToEndNginx
{
EndToEndFixture fixture;
readonly EndToEndFixture fixture;

public EndToEndNginx(EndToEndFixture fixture)
{
Expand Down Expand Up @@ -44,24 +44,24 @@ public async Task OIDC()
{
using var playwright = await Playwright.CreateAsync();

await using var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions() { Headless = false });
await using var browser = await playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions() { Headless = true });
var page = await browser.NewPageAsync(new BrowserNewPageOptions() { IgnoreHTTPSErrors = true });

await page.GotoAsync("https://demo-app.test.loc:32443/");

await page.WaitForURLAsync(new Regex("^http:\\/\\/oidc-server.oidc-server:32443/"));
await page.WaitForURLAsync(new Regex("^http:\\/\\/oidc-server\\.oidc-server:32443/"));

await page.GotoAsync(page.Url.Replace("http://", "https://"));

await page.WaitForURLAsync(new Regex("^https:\\/\\/oidc-server.oidc-server:32443/"));
await page.WaitForURLAsync(new Regex("^https:\\/\\/oidc-server\\.oidc-server:32443/"));

await page.Locator("#Input_Username").TypeAsync("User1");

await page.Locator("#Input_Password").TypeAsync("pwd");

await page.Locator("#Input_Password").PressAsync("Enter");

await page.WaitForURLAsync(new Regex("^https:\\/\\/demo-app.test.loc:32443/"), new() { WaitUntil = WaitUntilState.Load });
await page.WaitForURLAsync(new Regex("^https:\\/\\/demo-app\\.test\\.loc:32443/"));

var title = await page.TitleAsync();

Expand Down

0 comments on commit 555c18e

Please sign in to comment.