added tests for module management page
This commit is contained in:
parent
68aebf085e
commit
6ff59b5f8a
@ -7,7 +7,7 @@ using System.Net.Http;
|
||||
public class ModuleConfigTests : TestContext
|
||||
{
|
||||
[Fact]
|
||||
public void ImageNameInputFieldIsPresent()
|
||||
public void NameInputFieldIsPresent()
|
||||
{
|
||||
Services.AddSingleton<IHttpService, HttpService>();
|
||||
// Arrange
|
||||
@ -16,7 +16,55 @@ public class ModuleConfigTests : TestContext
|
||||
var cut = ctx.RenderComponent<ModConfig>();
|
||||
|
||||
// Act
|
||||
var input = cut.Find("input[name='ImageName']");
|
||||
var input = cut.Find("input[name='name']");
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(input);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ImageInputFieldIsPresent()
|
||||
{
|
||||
Services.AddSingleton<IHttpService, HttpService>();
|
||||
// Arrange
|
||||
using var ctx = new TestContext();
|
||||
ctx.Services.AddSingleton<IHttpService, HttpService>();
|
||||
var cut = ctx.RenderComponent<ModConfig>();
|
||||
|
||||
// Act
|
||||
var input = cut.Find("input[name='image']");
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(input);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UserInputFieldIsPresent()
|
||||
{
|
||||
Services.AddSingleton<IHttpService, HttpService>();
|
||||
// Arrange
|
||||
using var ctx = new TestContext();
|
||||
ctx.Services.AddSingleton<IHttpService, HttpService>();
|
||||
var cut = ctx.RenderComponent<ModConfig>();
|
||||
|
||||
// Act
|
||||
var input = cut.Find("input[name='user']");
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(input);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void InternalInputFieldIsPresent()
|
||||
{
|
||||
Services.AddSingleton<IHttpService, HttpService>();
|
||||
// Arrange
|
||||
using var ctx = new TestContext();
|
||||
ctx.Services.AddSingleton<IHttpService, HttpService>();
|
||||
var cut = ctx.RenderComponent<ModConfig>();
|
||||
|
||||
// Act
|
||||
var input = cut.Find("input[name='internal']");
|
||||
|
||||
// Assert
|
||||
Assert.NotNull(input);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user