Skip to content

Commit

Permalink
Fix UI tests in AppHost project
Browse files Browse the repository at this point in the history
  • Loading branch information
justinyoo committed Oct 12, 2024
1 parent bbdeeb1 commit 83f0f3b
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 49 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Jav
html.Should().Contain(expected);
}

// [Theory]
// [InlineData("<div class=\"fluent-tooltip-provider\"></div>")]
// public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
// {
// // Arrange
// using var httpClient = host.App!.CreateHttpClient("playgroundapp");
// await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));
[Theory]
[InlineData("<div class=\"fluent-tooltip-provider\" style=\"display: fixed;\"></div>")]
public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
{
// Arrange
using var httpClient = host.App!.CreateHttpClient("playgroundapp");
await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));

// // Act
// var html = await httpClient.GetStringAsync("/admin/events/new");
// Act
var html = await httpClient.GetStringAsync("/admin/events/new");

// // Assert
// html.Should().Contain(expected);
// }
// Assert
html.Should().Contain(expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Jav
html.Should().Contain(expected);
}

// [Theory]
// [InlineData("<div class=\"fluent-tooltip-provider\"></div>")]
// public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
// {
// // Arrange
// using var httpClient = host.App!.CreateHttpClient("playgroundapp");
// await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));
[Theory]
[InlineData("<div class=\"fluent-tooltip-provider\" style=\"display: fixed;\"></div>")]
public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
{
// Arrange
using var httpClient = host.App!.CreateHttpClient("playgroundapp");
await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));

// // Act
// var html = await httpClient.GetStringAsync("/admin");
// Act
var html = await httpClient.GetStringAsync("/admin");

// // Assert
// html.Should().Contain(expected);
// }
// Assert
html.Should().Contain(expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Jav
}

[Theory]
[InlineData("<div class=\"fluent-tooltip-provider\"></div>")]
[InlineData("<div class=\"fluent-tooltip-provider\" style=\"display: fixed;\"></div>")]
public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
{
// Arrange
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,18 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Jav
html.Should().Contain(expected);
}

// [Theory]
// [InlineData("<div class=\"fluent-tooltip-provider\"></div>")]
// public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
// {
// // Arrange
// using var httpClient = host.App!.CreateHttpClient("playgroundapp");
// await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));
[Theory]
[InlineData("<div class=\"fluent-tooltip-provider\" style=\"display: fixed;\"></div>")]
public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
{
// Arrange
using var httpClient = host.App!.CreateHttpClient("playgroundapp");
await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));

// // Act
// var html = await httpClient.GetStringAsync("/");
// Act
var html = await httpClient.GetStringAsync("/");

// // Assert
// html.Should().Contain(expected);
// }
// Assert
html.Should().Contain(expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@ public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_Jav
html.Should().Contain(expected);
}

// [Theory]
// [InlineData("<div class=\"fluent-tooltip-provider\"></div>")]
// public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
// {
// // Arrange
// using var httpClient = host.App!.CreateHttpClient("playgroundapp");
// await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));
[Theory]
[InlineData("<div class=\"fluent-tooltip-provider\" style=\"display: fixed;\"></div>")]
public async Task Given_Resource_When_Invoked_Endpoint_Then_It_Should_Return_HTML_Elements(string expected)
{
// Arrange
using var httpClient = host.App!.CreateHttpClient("playgroundapp");
await host.ResourceNotificationService.WaitForResourceAsync("playgroundapp", KnownResourceStates.Running).WaitAsync(TimeSpan.FromSeconds(30));

// // Act
// var html = await httpClient.GetStringAsync("/playground");
// Act
var html = await httpClient.GetStringAsync("/playground");

// // Assert
// html.Should().Contain(expected);
// }
// Assert
html.Should().Contain(expected);
}
}

0 comments on commit 83f0f3b

Please sign in to comment.