Migrate UI tests to Playwright dotta
This commit is contained in:
@@ -62,7 +62,7 @@ try
|
|||||||
.AddDataAccess(builder.Configuration) // 1. Database access + search processing
|
.AddDataAccess(builder.Configuration) // 1. Database access + search processing
|
||||||
.AddInfrastructure(builder.Configuration) // 2. Infrastructure (JDE/CMS/Auth)
|
.AddInfrastructure(builder.Configuration) // 2. Infrastructure (JDE/CMS/Auth)
|
||||||
.AddDataSyncServices(builder.Configuration) // 3. Data sync background service
|
.AddDataSyncServices(builder.Configuration) // 3. Data sync background service
|
||||||
.AddExcelIO(builder.Configuration) // 4. Result export
|
.AddExcelIO(builder.Configuration) // 4. Result export
|
||||||
.AddWebApi(builder.Configuration); // 5. Web API (controllers, auth, SignalR)
|
.AddWebApi(builder.Configuration); // 5. Web API (controllers, auth, SignalR)
|
||||||
|
|
||||||
var app = builder.Build();
|
var app = builder.Build();
|
||||||
|
|||||||
@@ -3,14 +3,31 @@ using System.Net.Http.Json;
|
|||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using JdeScoping.Core.Models;
|
|
||||||
using JdeScoping.Core.Models.Auth;
|
using JdeScoping.Core.Models.Auth;
|
||||||
using JdeScoping.Ui.Tests.Support;
|
using JdeScoping.Ui.Tests.Support;
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// API-level smoke tests for the authentication endpoint against the Docker host.
|
||||||
|
/// Validates the RSA public-key exchange, encrypted login, and session cookie flow.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public class AuthApiSmokeTests
|
public class AuthApiSmokeTests
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the full login flow: fetch public key, encrypt credentials, POST login, and confirm session via /me.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps:
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Create an HttpClient with a CookieContainer for session tracking.</item>
|
||||||
|
/// <item>GET /api/auth/public-key and verify the PEM response.</item>
|
||||||
|
/// <item>RSA-encrypt a test login payload using the returned public key.</item>
|
||||||
|
/// <item>POST /api/auth/login with the encrypted payload and assert HTTP 200.</item>
|
||||||
|
/// <item>GET /api/auth/me and assert HTTP 200 (session is authenticated).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public async Task AuthApi_Login_WorksAgainstDockerHost()
|
public async Task AuthApi_Login_WorksAgainstDockerHost()
|
||||||
@@ -23,13 +40,14 @@ public class AuthApiSmokeTests
|
|||||||
Assert.NotNull(key);
|
Assert.NotNull(key);
|
||||||
Assert.Contains("BEGIN PUBLIC KEY", key!.PublicKeyPem);
|
Assert.Contains("BEGIN PUBLIC KEY", key!.PublicKeyPem);
|
||||||
|
|
||||||
var payload = JsonSerializer.Serialize(new LoginModel { Username = "testuser", Password = "testpass" });
|
string payload = JsonSerializer.Serialize(new LoginModel { Username = "testuser", Password = "testpass" });
|
||||||
|
|
||||||
using var rsa = RSA.Create();
|
using var rsa = RSA.Create();
|
||||||
rsa.ImportFromPem(key.PublicKeyPem);
|
rsa.ImportFromPem(key.PublicKeyPem);
|
||||||
var encrypted = rsa.Encrypt(Encoding.UTF8.GetBytes(payload), RSAEncryptionPadding.OaepSHA256);
|
byte[] encrypted = rsa.Encrypt(Encoding.UTF8.GetBytes(payload), RSAEncryptionPadding.OaepSHA256);
|
||||||
|
|
||||||
var login = await client.PostAsJsonAsync("api/auth/login", new EncryptedLoginRequest(Convert.ToBase64String(encrypted)));
|
var login = await client.PostAsJsonAsync("api/auth/login",
|
||||||
|
new EncryptedLoginRequest(Convert.ToBase64String(encrypted)));
|
||||||
Assert.Equal(HttpStatusCode.OK, login.StatusCode);
|
Assert.Equal(HttpStatusCode.OK, login.StatusCode);
|
||||||
|
|
||||||
var me = await client.GetAsync("api/auth/me");
|
var me = await client.GetAsync("api/auth/me");
|
||||||
|
|||||||
@@ -2,16 +2,38 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Component Lot" search type (TC-020).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission with workbook upload in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class ComponentLotSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class ComponentLotSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Component Lot search form submits with an uploaded workbook filter (TC-020).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-020".</item>
|
||||||
|
/// <item>Select the "Component Lot" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Upload "single_lot.xlsx" to the "Filter By Component Lot" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task ComponentLot_SubmitsWithUploadedWorkbook() =>
|
public Task ComponentLot_SubmitsWithUploadedWorkbook()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.ComponentLot,
|
UiSearchTypes.ComponentLot,
|
||||||
"MIGRATED-TC-020",
|
"MIGRATED-TC-020",
|
||||||
uploads:
|
uploads:
|
||||||
[
|
[
|
||||||
("Filter By Component Lot", "single_lot.xlsx")
|
("Filter By Component Lot", "single_lot.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,26 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI smoke tests for the Data Sync Requests page.
|
||||||
|
/// Validates that the page loads and shows action buttons or redirects to search.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class DataSyncPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
public sealed class DataSyncPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Data Sync page loads at /data-sync/requests and displays action buttons.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps:
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the Data Sync Requests page.</item>
|
||||||
|
/// <item>Assert the URL ends with /data-sync/requests or /search (redirect).</item>
|
||||||
|
/// <item>If on the data sync page, assert "Data Sync Requests" heading is visible.</item>
|
||||||
|
/// <item>Assert "New Request" or "Reload Pipelines" button is visible.</item>
|
||||||
|
/// <item>If redirected, assert "Search Details" is visible.</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public async Task DataSync_Loads()
|
public async Task DataSync_Loads()
|
||||||
@@ -12,22 +30,26 @@ public sealed class DataSyncPageTests(PlaywrightFixture fixture) : UiTestBase(fi
|
|||||||
await RunAsync(async page =>
|
await RunAsync(async page =>
|
||||||
{
|
{
|
||||||
await UiNavigationHelper.NavigateToDataSyncAsync(page);
|
await UiNavigationHelper.NavigateToDataSyncAsync(page);
|
||||||
var url = page.Url;
|
string url = page.Url;
|
||||||
var onDataSync = url.EndsWith("/data-sync/requests", StringComparison.OrdinalIgnoreCase);
|
bool onDataSync = url.EndsWith("/data-sync/requests", StringComparison.OrdinalIgnoreCase);
|
||||||
var redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
|
bool redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
|
||||||
Assert.True(onDataSync || redirectedToSearch, $"Unexpected URL: {url}");
|
Assert.True(onDataSync || redirectedToSearch, $"Unexpected URL: {url}");
|
||||||
|
|
||||||
if (onDataSync)
|
if (onDataSync)
|
||||||
{
|
{
|
||||||
await Assertions.Expect(page.GetByText("Data Sync Requests")).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
await Assertions.Expect(page.GetByText("Data Sync Requests"))
|
||||||
var newRequestButton = page.GetByRole(Microsoft.Playwright.AriaRole.Button, new() { Name = "New Request" });
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
||||||
var reloadButton = page.GetByRole(Microsoft.Playwright.AriaRole.Button, new() { Name = "Reload Pipelines" });
|
var newRequestButton =
|
||||||
var hasAnyControl = await newRequestButton.IsVisibleAsync() || await reloadButton.IsVisibleAsync();
|
page.GetByRole(AriaRole.Button, new PageGetByRoleOptions { Name = "New Request" });
|
||||||
|
var reloadButton =
|
||||||
|
page.GetByRole(AriaRole.Button, new PageGetByRoleOptions { Name = "Reload Pipelines" });
|
||||||
|
bool hasAnyControl = await newRequestButton.IsVisibleAsync() || await reloadButton.IsVisibleAsync();
|
||||||
Assert.True(hasAnyControl, "Expected Data Sync action buttons to be visible.");
|
Assert.True(hasAnyControl, "Expected Data Sync action buttons to be visible.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
await Assertions.Expect(page.GetByText("Search Details"))
|
||||||
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using Microsoft.Playwright;
|
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests.Helpers;
|
namespace JdeScoping.Ui.Tests.Helpers;
|
||||||
|
|
||||||
internal static class UiAuthHelper
|
internal static class UiAuthHelper
|
||||||
@@ -7,11 +5,8 @@ internal static class UiAuthHelper
|
|||||||
public static async Task LoginAsync(IPage page, string username = "testuser", string password = "testpass")
|
public static async Task LoginAsync(IPage page, string username = "testuser", string password = "testpass")
|
||||||
{
|
{
|
||||||
var loginForm = page.GetByText("Authentication Required");
|
var loginForm = page.GetByText("Authentication Required");
|
||||||
var formVisible = await loginForm.IsVisibleAsync();
|
bool formVisible = await loginForm.IsVisibleAsync();
|
||||||
if (!formVisible)
|
if (!formVisible) return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
await page.Locator("input[name='Username']").FillAsync(username);
|
await page.Locator("input[name='Username']").FillAsync(username);
|
||||||
await page.Locator("input[name='Password']").FillAsync(password);
|
await page.Locator("input[name='Password']").FillAsync(password);
|
||||||
@@ -25,15 +20,12 @@ internal static class UiAuthHelper
|
|||||||
if (await loginForm.IsVisibleAsync())
|
if (await loginForm.IsVisibleAsync())
|
||||||
{
|
{
|
||||||
var notifications = page.Locator(".rz-notification");
|
var notifications = page.Locator(".rz-notification");
|
||||||
var count = await notifications.CountAsync();
|
int count = await notifications.CountAsync();
|
||||||
var details = new List<string>();
|
var details = new List<string>();
|
||||||
for (var i = 0; i < count; i++)
|
for (var i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
var text = (await notifications.Nth(i).InnerTextAsync()).Trim();
|
string text = (await notifications.Nth(i).InnerTextAsync()).Trim();
|
||||||
if (!string.IsNullOrWhiteSpace(text))
|
if (!string.IsNullOrWhiteSpace(text)) details.Add(text);
|
||||||
{
|
|
||||||
details.Add(text);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new InvalidOperationException(
|
throw new InvalidOperationException(
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using Microsoft.Playwright;
|
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests.Helpers;
|
namespace JdeScoping.Ui.Tests.Helpers;
|
||||||
|
|
||||||
internal static class UiNavigationHelper
|
internal static class UiNavigationHelper
|
||||||
@@ -98,9 +96,7 @@ internal static class UiNavigationHelper
|
|||||||
{
|
{
|
||||||
var meResponse = await page.Context.APIRequest.GetAsync("/api/auth/me");
|
var meResponse = await page.Context.APIRequest.GetAsync("/api/auth/me");
|
||||||
if (meResponse.Status != 200)
|
if (meResponse.Status != 200)
|
||||||
{
|
|
||||||
throw new InvalidOperationException(
|
throw new InvalidOperationException(
|
||||||
$"UI test host did not establish authenticated session after login. /api/auth/me status={meResponse.Status}.");
|
$"UI test host did not establish authenticated session after login. /api/auth/me status={meResponse.Status}.");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
using Microsoft.Playwright;
|
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests.Helpers;
|
namespace JdeScoping.Ui.Tests.Helpers;
|
||||||
|
|
||||||
internal static class UiSearchFormHelper
|
internal static class UiSearchFormHelper
|
||||||
@@ -7,12 +5,15 @@ internal static class UiSearchFormHelper
|
|||||||
public static async Task SelectSearchTypeAsync(IPage page, string searchType)
|
public static async Task SelectSearchTypeAsync(IPage page, string searchType)
|
||||||
{
|
{
|
||||||
await page.Locator(".rz-dropdown").First.ClickAsync();
|
await page.Locator(".rz-dropdown").First.ClickAsync();
|
||||||
await page.GetByRole(AriaRole.Option, new PageGetByRoleOptions { Name = searchType, Exact = true }).ClickAsync();
|
await page.GetByRole(AriaRole.Option, new PageGetByRoleOptions { Name = searchType, Exact = true })
|
||||||
|
.ClickAsync();
|
||||||
await page.WaitForTimeoutAsync(500);
|
await page.WaitForTimeoutAsync(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Task EnterSearchNameAsync(IPage page, string name) =>
|
public static Task EnterSearchNameAsync(IPage page, string name)
|
||||||
page.Locator("input[placeholder=' ']").First.FillAsync(name);
|
{
|
||||||
|
return page.Locator("input[placeholder=' ']").First.FillAsync(name);
|
||||||
|
}
|
||||||
|
|
||||||
public static async Task SetDateRangeAsync(IPage page, string minimumMmDdYyyy, string maximumMmDdYyyy)
|
public static async Task SetDateRangeAsync(IPage page, string minimumMmDdYyyy, string maximumMmDdYyyy)
|
||||||
{
|
{
|
||||||
@@ -27,10 +28,7 @@ internal static class UiSearchFormHelper
|
|||||||
await page.WaitForTimeoutAsync(500);
|
await page.WaitForTimeoutAsync(500);
|
||||||
|
|
||||||
var listItem = page.Locator(".rz-autocomplete-list .rz-autocomplete-list-item").First;
|
var listItem = page.Locator(".rz-autocomplete-list .rz-autocomplete-list-item").First;
|
||||||
if (await listItem.IsVisibleAsync())
|
if (await listItem.IsVisibleAsync()) await listItem.ClickAsync();
|
||||||
{
|
|
||||||
await listItem.ClickAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
await panel.GetByRole(AriaRole.Button, new LocatorGetByRoleOptions { Name = "Add" }).ClickAsync();
|
await panel.GetByRole(AriaRole.Button, new LocatorGetByRoleOptions { Name = "Add" }).ClickAsync();
|
||||||
await page.WaitForTimeoutAsync(250);
|
await page.WaitForTimeoutAsync(250);
|
||||||
@@ -51,13 +49,15 @@ internal static class UiSearchFormHelper
|
|||||||
State = WaitForSelectorState.Visible,
|
State = WaitForSelectorState.Visible,
|
||||||
Timeout = 10_000
|
Timeout = 10_000
|
||||||
});
|
});
|
||||||
await page.Locator(".rz-dialog-wrapper button").GetByText("Submit", new LocatorGetByTextOptions { Exact = true }).ClickAsync();
|
await page.Locator(".rz-dialog-wrapper button")
|
||||||
|
.GetByText("Submit", new LocatorGetByTextOptions { Exact = true }).ClickAsync();
|
||||||
await page.WaitForTimeoutAsync(1_000);
|
await page.WaitForTimeoutAsync(1_000);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async Task AssertNoErrorNotificationAsync(IPage page)
|
public static async Task AssertNoErrorNotificationAsync(IPage page)
|
||||||
{
|
{
|
||||||
var error = page.Locator(".rz-notification-error");
|
var error = page.Locator(".rz-notification-error");
|
||||||
await Assertions.Expect(error).Not.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 5_000 });
|
await Assertions.Expect(error).Not
|
||||||
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 5_000 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
<IsTestProject>true</IsTestProject>
|
<IsTestProject>true</IsTestProject>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="coverlet.collector" />
|
<PackageReference Include="coverlet.collector"/>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
|
||||||
<PackageReference Include="Microsoft.Playwright" />
|
<PackageReference Include="Microsoft.Playwright"/>
|
||||||
<PackageReference Include="Shouldly" />
|
<PackageReference Include="Shouldly"/>
|
||||||
<PackageReference Include="xunit" />
|
<PackageReference Include="xunit"/>
|
||||||
<PackageReference Include="xunit.runner.visualstudio" />
|
<PackageReference Include="xunit.runner.visualstudio"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Using Include="Xunit" />
|
<Using Include="Xunit"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\..\src\JdeScoping.Core\JdeScoping.Core.csproj" />
|
<ProjectReference Include="..\..\src\JdeScoping.Core\JdeScoping.Core.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="TestData/**/*" CopyToOutputDirectory="PreserveNewest" />
|
<None Include="TestData/**/*" CopyToOutputDirectory="PreserveNewest"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,11 +1,30 @@
|
|||||||
|
using System.Text.RegularExpressions;
|
||||||
using JdeScoping.Ui.Tests.Helpers;
|
using JdeScoping.Ui.Tests.Helpers;
|
||||||
using JdeScoping.Ui.Tests.Support;
|
using JdeScoping.Ui.Tests.Support;
|
||||||
using System.Text.RegularExpressions;
|
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the Login page.
|
||||||
|
/// Validates that the login form renders, credentials are accepted, and logout revokes the session.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class LoginPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
public sealed class LoginPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the login page renders, credentials authenticate the user, and logout revokes the session.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps:
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the login page.</item>
|
||||||
|
/// <item>Assert the page title contains "Login - JDE Scoping Tool".</item>
|
||||||
|
/// <item>Submit test credentials via UiAuthHelper.LoginAsync.</item>
|
||||||
|
/// <item>Assert the user sees the Logout button or remains on the login view.</item>
|
||||||
|
/// <item>Invoke UiAuthHelper.LogoutAsync.</item>
|
||||||
|
/// <item>GET /api/auth/me and assert HTTP 401 (session revoked).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public async Task LoginPage_AllowsLoginAndLogout()
|
public async Task LoginPage_AllowsLoginAndLogout()
|
||||||
@@ -17,9 +36,9 @@ public sealed class LoginPageTests(PlaywrightFixture fixture) : UiTestBase(fixtu
|
|||||||
|
|
||||||
await UiAuthHelper.LoginAsync(page);
|
await UiAuthHelper.LoginAsync(page);
|
||||||
var loggedOutView = page.GetByText("Authentication Required");
|
var loggedOutView = page.GetByText("Authentication Required");
|
||||||
var logoutButton = page.GetByRole(Microsoft.Playwright.AriaRole.Button, new() { Name = "Logout" });
|
var logoutButton = page.GetByRole(AriaRole.Button, new PageGetByRoleOptions { Name = "Logout" });
|
||||||
var authenticated = await logoutButton.IsVisibleAsync();
|
bool authenticated = await logoutButton.IsVisibleAsync();
|
||||||
var stillOnLogin = await loggedOutView.IsVisibleAsync();
|
bool stillOnLogin = await loggedOutView.IsVisibleAsync();
|
||||||
Assert.True(authenticated || stillOnLogin);
|
Assert.True(authenticated || stillOnLogin);
|
||||||
|
|
||||||
await UiAuthHelper.LogoutAsync(page);
|
await UiAuthHelper.LogoutAsync(page);
|
||||||
|
|||||||
@@ -3,8 +3,25 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI smoke tests for the Cache Refresh Status page.
|
||||||
|
/// Validates that the page loads and shows the "Cache Refresh Status" heading or redirects to search.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class RefreshStatusPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
public sealed class RefreshStatusPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Refresh Status page loads at /refresh-status and displays the expected heading.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps:
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the Refresh Status page.</item>
|
||||||
|
/// <item>Assert the URL ends with /refresh-status or /search (redirect).</item>
|
||||||
|
/// <item>If on the refresh page, assert "Cache Refresh Status" heading is visible.</item>
|
||||||
|
/// <item>If redirected, assert "Search Details" is visible.</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public async Task RefreshStatus_Loads()
|
public async Task RefreshStatus_Loads()
|
||||||
@@ -12,19 +29,17 @@ public sealed class RefreshStatusPageTests(PlaywrightFixture fixture) : UiTestBa
|
|||||||
await RunAsync(async page =>
|
await RunAsync(async page =>
|
||||||
{
|
{
|
||||||
await UiNavigationHelper.NavigateToRefreshStatusAsync(page);
|
await UiNavigationHelper.NavigateToRefreshStatusAsync(page);
|
||||||
var url = page.Url;
|
string url = page.Url;
|
||||||
var onRefreshStatus = url.EndsWith("/refresh-status", StringComparison.OrdinalIgnoreCase);
|
bool onRefreshStatus = url.EndsWith("/refresh-status", StringComparison.OrdinalIgnoreCase);
|
||||||
var redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
|
bool redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
|
||||||
Assert.True(onRefreshStatus || redirectedToSearch, $"Unexpected URL: {url}");
|
Assert.True(onRefreshStatus || redirectedToSearch, $"Unexpected URL: {url}");
|
||||||
|
|
||||||
if (onRefreshStatus)
|
if (onRefreshStatus)
|
||||||
{
|
await Assertions.Expect(page.GetByText("Cache Refresh Status"))
|
||||||
await Assertions.Expect(page.GetByText("Cache Refresh Status")).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
await Assertions.Expect(page.GetByText("Search Details"))
|
||||||
await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,25 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI smoke tests for the Search page.
|
||||||
|
/// Validates that the search form loads with primary controls visible and no error notifications.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class SearchPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
public sealed class SearchPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the search page loads and displays the "Search Details" heading, Submit button, and no errors.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps:
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Assert the "Search Details" text is visible.</item>
|
||||||
|
/// <item>Assert the Submit button is visible.</item>
|
||||||
|
/// <item>Assert no error notification is present.</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public async Task SearchPage_LoadsAndShowsPrimaryControls()
|
public async Task SearchPage_LoadsAndShowsPrimaryControls()
|
||||||
@@ -13,7 +30,8 @@ public sealed class SearchPageTests(PlaywrightFixture fixture) : UiTestBase(fixt
|
|||||||
{
|
{
|
||||||
await UiNavigationHelper.NavigateToSearchPageAsync(page);
|
await UiNavigationHelper.NavigateToSearchPageAsync(page);
|
||||||
await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync();
|
await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync();
|
||||||
await Assertions.Expect(page.GetByRole(Microsoft.Playwright.AriaRole.Button, new() { Name = "Submit" }).First).ToBeVisibleAsync();
|
await Assertions.Expect(page.GetByRole(AriaRole.Button, new PageGetByRoleOptions { Name = "Submit" }).First)
|
||||||
|
.ToBeVisibleAsync();
|
||||||
await UiSearchFormHelper.AssertNoErrorNotificationAsync(page);
|
await UiSearchFormHelper.AssertNoErrorNotificationAsync(page);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,27 @@
|
|||||||
using JdeScoping.Ui.Tests.Helpers;
|
using JdeScoping.Ui.Tests.Helpers;
|
||||||
using JdeScoping.Ui.Tests.Support;
|
using JdeScoping.Ui.Tests.Support;
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI smoke tests for the Search Queue page.
|
||||||
|
/// Validates that the queue page loads and shows a data grid, alert, or loading indicator.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class SearchQueuePageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
public sealed class SearchQueuePageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Search Queue page loads at /search/queue and displays queue content or a redirect.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps:
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the Search Queue page.</item>
|
||||||
|
/// <item>Assert the URL ends with /search/queue or /search (redirect).</item>
|
||||||
|
/// <item>If on the queue page, assert "Search Queue" heading and grid/alert/loading indicator are visible.</item>
|
||||||
|
/// <item>If redirected, assert "Search Details" is visible.</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public async Task SearchQueue_Loads()
|
public async Task SearchQueue_Loads()
|
||||||
@@ -11,22 +29,24 @@ public sealed class SearchQueuePageTests(PlaywrightFixture fixture) : UiTestBase
|
|||||||
await RunAsync(async page =>
|
await RunAsync(async page =>
|
||||||
{
|
{
|
||||||
await UiNavigationHelper.NavigateToQueueAsync(page);
|
await UiNavigationHelper.NavigateToQueueAsync(page);
|
||||||
var url = page.Url;
|
string url = page.Url;
|
||||||
var onQueue = url.EndsWith("/search/queue", StringComparison.OrdinalIgnoreCase);
|
bool onQueue = url.EndsWith("/search/queue", StringComparison.OrdinalIgnoreCase);
|
||||||
var redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
|
bool redirectedToSearch = url.EndsWith("/search", StringComparison.OrdinalIgnoreCase);
|
||||||
Assert.True(onQueue || redirectedToSearch, $"Unexpected URL: {url}");
|
Assert.True(onQueue || redirectedToSearch, $"Unexpected URL: {url}");
|
||||||
|
|
||||||
if (onQueue)
|
if (onQueue)
|
||||||
{
|
{
|
||||||
await Assertions.Expect(page.GetByText("Search Queue")).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
await Assertions.Expect(page.GetByText("Search Queue"))
|
||||||
var hasGrid = await page.Locator(".rz-data-grid").First.IsVisibleAsync();
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
||||||
var hasAlert = await page.Locator(".rz-alert").First.IsVisibleAsync();
|
bool hasGrid = await page.Locator(".rz-data-grid").First.IsVisibleAsync();
|
||||||
var hasLoading = await page.GetByText("Loading queue").IsVisibleAsync();
|
bool hasAlert = await page.Locator(".rz-alert").First.IsVisibleAsync();
|
||||||
|
bool hasLoading = await page.GetByText("Loading queue").IsVisibleAsync();
|
||||||
Assert.True(hasGrid || hasAlert || hasLoading, "Expected queue grid, alert, or loading indicator.");
|
Assert.True(hasGrid || hasAlert || hasLoading, "Expected queue grid, alert, or loading indicator.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await Assertions.Expect(page.GetByText("Search Details")).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
await Assertions.Expect(page.GetByText("Search Details"))
|
||||||
|
.ToBeVisibleAsync(new LocatorAssertionsToBeVisibleOptions { Timeout = 15_000 });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,24 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI smoke tests for the Searches Dashboard page.
|
||||||
|
/// Validates that the dashboard loads at the expected URL and shows a heading or data grid.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class SearchesDashboardPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
public sealed class SearchesDashboardPageTests(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Searches Dashboard page loads at /searches and displays a heading or data grid.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps:
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the Searches Dashboard page.</item>
|
||||||
|
/// <item>Assert the URL ends with /searches, /search, or /.</item>
|
||||||
|
/// <item>Assert that "Searches Dashboard", "Search Details", or the Radzen data grid is visible.</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public async Task SearchesDashboard_Loads()
|
public async Task SearchesDashboard_Loads()
|
||||||
@@ -12,16 +28,16 @@ public sealed class SearchesDashboardPageTests(PlaywrightFixture fixture) : UiTe
|
|||||||
await RunAsync(async page =>
|
await RunAsync(async page =>
|
||||||
{
|
{
|
||||||
await UiNavigationHelper.NavigateToSearchesDashboardAsync(page);
|
await UiNavigationHelper.NavigateToSearchesDashboardAsync(page);
|
||||||
var url = page.Url;
|
string url = page.Url;
|
||||||
Assert.True(
|
Assert.True(
|
||||||
url.EndsWith("/searches", StringComparison.OrdinalIgnoreCase) ||
|
url.EndsWith("/searches", StringComparison.OrdinalIgnoreCase) ||
|
||||||
url.EndsWith("/search", StringComparison.OrdinalIgnoreCase) ||
|
url.EndsWith("/search", StringComparison.OrdinalIgnoreCase) ||
|
||||||
url.EndsWith("/", StringComparison.OrdinalIgnoreCase),
|
url.EndsWith("/", StringComparison.OrdinalIgnoreCase),
|
||||||
$"Unexpected URL: {url}");
|
$"Unexpected URL: {url}");
|
||||||
|
|
||||||
var hasSearchesHeading = await page.GetByText("Searches Dashboard").IsVisibleAsync();
|
bool hasSearchesHeading = await page.GetByText("Searches Dashboard").IsVisibleAsync();
|
||||||
var hasSearchDetails = await page.GetByText("Search Details").IsVisibleAsync();
|
bool hasSearchDetails = await page.GetByText("Search Details").IsVisibleAsync();
|
||||||
var hasGrid = await page.Locator(".rz-data-grid").First.IsVisibleAsync();
|
bool hasGrid = await page.Locator(".rz-data-grid").First.IsVisibleAsync();
|
||||||
Assert.True(hasSearchesHeading || hasSearchDetails || hasGrid);
|
Assert.True(hasSearchesHeading || hasSearchDetails || hasGrid);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
using Microsoft.Playwright;
|
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests.Support;
|
namespace JdeScoping.Ui.Tests.Support;
|
||||||
|
|
||||||
public sealed class PlaywrightFixture : IAsyncLifetime
|
public sealed class PlaywrightFixture : IAsyncLifetime
|
||||||
{
|
{
|
||||||
private IPlaywright? _playwright;
|
|
||||||
private IBrowser? _browser;
|
private IBrowser? _browser;
|
||||||
|
private IPlaywright? _playwright;
|
||||||
|
|
||||||
public IBrowser Browser => _browser ?? throw new InvalidOperationException("Browser is not initialized.");
|
public IBrowser Browser => _browser ?? throw new InvalidOperationException("Browser is not initialized.");
|
||||||
|
|
||||||
public async Task InitializeAsync()
|
public async Task InitializeAsync()
|
||||||
{
|
{
|
||||||
_playwright = await Microsoft.Playwright.Playwright.CreateAsync();
|
_playwright = await Playwright.CreateAsync();
|
||||||
_browser = await _playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions
|
_browser = await _playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions
|
||||||
{
|
{
|
||||||
Headless = UiTestSettings.Headless,
|
Headless = UiTestSettings.Headless,
|
||||||
@@ -21,10 +19,7 @@ public sealed class PlaywrightFixture : IAsyncLifetime
|
|||||||
|
|
||||||
public async Task DisposeAsync()
|
public async Task DisposeAsync()
|
||||||
{
|
{
|
||||||
if (_browser is not null)
|
if (_browser is not null) await _browser.CloseAsync();
|
||||||
{
|
|
||||||
await _browser.CloseAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
_playwright?.Dispose();
|
_playwright?.Dispose();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ namespace JdeScoping.Ui.Tests.Support;
|
|||||||
public abstract class SearchFlowTestBase(PlaywrightFixture fixture) : UiTestBase(fixture)
|
public abstract class SearchFlowTestBase(PlaywrightFixture fixture) : UiTestBase(fixture)
|
||||||
{
|
{
|
||||||
private static bool StrictMode =>
|
private static bool StrictMode =>
|
||||||
string.Equals(Environment.GetEnvironmentVariable("JDESCOPING_UI_STRICT"), "true", StringComparison.OrdinalIgnoreCase);
|
string.Equals(Environment.GetEnvironmentVariable("JDESCOPING_UI_STRICT"), "true",
|
||||||
|
StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
protected Task RunSearchSubmissionAsync(
|
protected Task RunSearchSubmissionAsync(
|
||||||
string searchType,
|
string searchType,
|
||||||
@@ -23,31 +24,20 @@ public abstract class SearchFlowTestBase(PlaywrightFixture fixture) : UiTestBase
|
|||||||
await Assertions.Expect(page.Locator(".rz-dropdown-label").First).ToContainTextAsync(searchType);
|
await Assertions.Expect(page.Locator(".rz-dropdown-label").First).ToContainTextAsync(searchType);
|
||||||
|
|
||||||
if (!StrictMode)
|
if (!StrictMode)
|
||||||
{
|
|
||||||
// Default mode is smoke-only against local docker where source systems can be offline.
|
// Default mode is smoke-only against local docker where source systems can be offline.
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(minDate) && !string.IsNullOrWhiteSpace(maxDate))
|
if (!string.IsNullOrWhiteSpace(minDate) && !string.IsNullOrWhiteSpace(maxDate))
|
||||||
{
|
|
||||||
await UiSearchFormHelper.SetDateRangeAsync(page, minDate, maxDate);
|
await UiSearchFormHelper.SetDateRangeAsync(page, minDate, maxDate);
|
||||||
}
|
|
||||||
|
|
||||||
if (autocompleteItems is not null)
|
if (autocompleteItems is not null)
|
||||||
{
|
|
||||||
foreach (var item in autocompleteItems)
|
foreach (var item in autocompleteItems)
|
||||||
{
|
|
||||||
await UiSearchFormHelper.AddAutocompleteItemAsync(page, item.PanelHeader, item.Value);
|
await UiSearchFormHelper.AddAutocompleteItemAsync(page, item.PanelHeader, item.Value);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uploads is not null)
|
if (uploads is not null)
|
||||||
{
|
|
||||||
foreach (var upload in uploads)
|
foreach (var upload in uploads)
|
||||||
{
|
await UiSearchFormHelper.UploadFileAsync(page, upload.PanelHeader,
|
||||||
await UiSearchFormHelper.UploadFileAsync(page, upload.PanelHeader, TestDataPaths.Get(upload.FileName));
|
TestDataPaths.Get(upload.FileName));
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await UiSearchFormHelper.SubmitSearchAsync(page);
|
await UiSearchFormHelper.SubmitSearchAsync(page);
|
||||||
await UiSearchFormHelper.AssertNoErrorNotificationAsync(page);
|
await UiSearchFormHelper.AssertNoErrorNotificationAsync(page);
|
||||||
|
|||||||
@@ -2,5 +2,8 @@ namespace JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
internal static class TestDataPaths
|
internal static class TestDataPaths
|
||||||
{
|
{
|
||||||
public static string Get(string fileName) => Path.Combine(AppContext.BaseDirectory, "TestData", fileName);
|
public static string Get(string fileName)
|
||||||
|
{
|
||||||
|
return Path.Combine(AppContext.BaseDirectory, "TestData", fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
using Microsoft.Playwright;
|
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests.Support;
|
namespace JdeScoping.Ui.Tests.Support;
|
||||||
|
|
||||||
[Collection(UiTestCollection.Name)]
|
[Collection(UiTestCollection.Name)]
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
using Xunit;
|
|
||||||
|
|
||||||
namespace JdeScoping.Ui.Tests.Support;
|
namespace JdeScoping.Ui.Tests.Support;
|
||||||
|
|
||||||
[CollectionDefinition(Name)]
|
[CollectionDefinition(Name)]
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ internal static class UiTestSettings
|
|||||||
?? "http://localhost:5294";
|
?? "http://localhost:5294";
|
||||||
|
|
||||||
public static bool Headless =>
|
public static bool Headless =>
|
||||||
!string.Equals(Environment.GetEnvironmentVariable("JDESCOPING_UI_HEADED"), "true", StringComparison.OrdinalIgnoreCase);
|
!string.Equals(Environment.GetEnvironmentVariable("JDESCOPING_UI_HEADED"), "true",
|
||||||
|
StringComparison.OrdinalIgnoreCase);
|
||||||
}
|
}
|
||||||
@@ -1,60 +1,195 @@
|
|||||||
{
|
{
|
||||||
"profitCenters": [
|
"profitCenters": [
|
||||||
{ "code": "1AM", "description": "Profit Center 1AM" },
|
{
|
||||||
{ "code": "1BM", "description": "Profit Center 1BM" },
|
"code": "1AM",
|
||||||
{ "code": "1CM", "description": "Profit Center 1CM" },
|
"description": "Profit Center 1AM"
|
||||||
{ "code": "1PM", "description": "Profit Center 1PM" },
|
},
|
||||||
{ "code": "2DM", "description": "Profit Center 2DM" },
|
{
|
||||||
{ "code": "2SM", "description": "Profit Center 2SM" },
|
"code": "1BM",
|
||||||
{ "code": "3TM", "description": "Profit Center 3TM" },
|
"description": "Profit Center 1BM"
|
||||||
{ "code": "4IM", "description": "Profit Center 4IM" },
|
},
|
||||||
{ "code": "5SM", "description": "Profit Center 5SM" }
|
{
|
||||||
|
"code": "1CM",
|
||||||
|
"description": "Profit Center 1CM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "1PM",
|
||||||
|
"description": "Profit Center 1PM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "2DM",
|
||||||
|
"description": "Profit Center 2DM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "2SM",
|
||||||
|
"description": "Profit Center 2SM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "3TM",
|
||||||
|
"description": "Profit Center 3TM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "4IM",
|
||||||
|
"description": "Profit Center 4IM"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "5SM",
|
||||||
|
"description": "Profit Center 5SM"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"workCenters": [
|
"workCenters": [
|
||||||
{ "code": "WC001", "description": "Work Center 001" },
|
{
|
||||||
{ "code": "WC002", "description": "Work Center 002" },
|
"code": "WC001",
|
||||||
{ "code": "WC003", "description": "Work Center 003" }
|
"description": "Work Center 001"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "WC002",
|
||||||
|
"description": "Work Center 002"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"code": "WC003",
|
||||||
|
"description": "Work Center 003"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"operators": [
|
"operators": [
|
||||||
{ "userId": "ADAMSSN", "fullName": "Adams, S N" },
|
{
|
||||||
{ "userId": "AGNEWA", "fullName": "Agnew, A" },
|
"userId": "ADAMSSN",
|
||||||
{ "userId": "AGNEWL", "fullName": "Agnew, L" },
|
"fullName": "Adams, S N"
|
||||||
{ "userId": "ALASMARB", "fullName": "Alasmar, B" },
|
},
|
||||||
{ "userId": "ALEXIUCG", "fullName": "Alexiuc, G" },
|
{
|
||||||
{ "userId": "ALLENHY", "fullName": "Allen, H Y" },
|
"userId": "AGNEWA",
|
||||||
{ "userId": "ALLENNI", "fullName": "Allen, N I" },
|
"fullName": "Agnew, A"
|
||||||
{ "userId": "ALURUM", "fullName": "Aluru, M" },
|
},
|
||||||
{ "userId": "ALVESM1", "fullName": "Alves, M" },
|
{
|
||||||
{ "userId": "APONTEVE", "fullName": "Aponte, V E" }
|
"userId": "AGNEWL",
|
||||||
|
"fullName": "Agnew, L"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"userId": "ALASMARB",
|
||||||
|
"fullName": "Alasmar, B"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"userId": "ALEXIUCG",
|
||||||
|
"fullName": "Alexiuc, G"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"userId": "ALLENHY",
|
||||||
|
"fullName": "Allen, H Y"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"userId": "ALLENNI",
|
||||||
|
"fullName": "Allen, N I"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"userId": "ALURUM",
|
||||||
|
"fullName": "Aluru, M"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"userId": "ALVESM1",
|
||||||
|
"fullName": "Alves, M"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"userId": "APONTEVE",
|
||||||
|
"fullName": "Aponte, V E"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"workOrders": [
|
"workOrders": [
|
||||||
{ "workOrderNumber": "99059700", "itemNumber": "00598004702" },
|
{
|
||||||
{ "workOrderNumber": "99002260", "itemNumber": "82070000028" },
|
"workOrderNumber": "99059700",
|
||||||
{ "workOrderNumber": "99002259", "itemNumber": "82070000027" },
|
"itemNumber": "00598004702"
|
||||||
{ "workOrderNumber": "99002258", "itemNumber": "82070000019" },
|
},
|
||||||
{ "workOrderNumber": "99002257", "itemNumber": "82070000018" },
|
{
|
||||||
{ "workOrderNumber": "99002256", "itemNumber": "82070000017" },
|
"workOrderNumber": "99002260",
|
||||||
{ "workOrderNumber": "99002255", "itemNumber": "00855140333" },
|
"itemNumber": "82070000028"
|
||||||
{ "workOrderNumber": "99002254", "itemNumber": "00855480834" },
|
},
|
||||||
{ "workOrderNumber": "99002252", "itemNumber": "82070000016" },
|
{
|
||||||
{ "workOrderNumber": "99002251", "itemNumber": "00855910448" },
|
"workOrderNumber": "99002259",
|
||||||
{ "workOrderNumber": "99002250", "itemNumber": "82070000015" },
|
"itemNumber": "82070000027"
|
||||||
{ "workOrderNumber": "99002249", "itemNumber": "00855480834" },
|
},
|
||||||
{ "workOrderNumber": "99002248", "itemNumber": "00855910446" },
|
{
|
||||||
{ "workOrderNumber": "99002247", "itemNumber": "00855910447" },
|
"workOrderNumber": "99002258",
|
||||||
{ "workOrderNumber": "99002246", "itemNumber": "82900171601" }
|
"itemNumber": "82070000019"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002257",
|
||||||
|
"itemNumber": "82070000018"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002256",
|
||||||
|
"itemNumber": "82070000017"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002255",
|
||||||
|
"itemNumber": "00855140333"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002254",
|
||||||
|
"itemNumber": "00855480834"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002252",
|
||||||
|
"itemNumber": "82070000016"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002251",
|
||||||
|
"itemNumber": "00855910448"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002250",
|
||||||
|
"itemNumber": "82070000015"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002249",
|
||||||
|
"itemNumber": "00855480834"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002248",
|
||||||
|
"itemNumber": "00855910446"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002247",
|
||||||
|
"itemNumber": "00855910447"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"workOrderNumber": "99002246",
|
||||||
|
"itemNumber": "82900171601"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"itemNumbers": [
|
"itemNumbers": [
|
||||||
{ "itemNumber": "00598004702", "description": "Item 598004702" },
|
{
|
||||||
{ "itemNumber": "82070000028", "description": "Item 82070000028" },
|
"itemNumber": "00598004702",
|
||||||
{ "itemNumber": "82070000027", "description": "Item 82070000027" },
|
"description": "Item 598004702"
|
||||||
{ "itemNumber": "00855140333", "description": "Item 855140333" },
|
},
|
||||||
{ "itemNumber": "00855480834", "description": "Item 855480834" }
|
{
|
||||||
|
"itemNumber": "82070000028",
|
||||||
|
"description": "Item 82070000028"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"itemNumber": "82070000027",
|
||||||
|
"description": "Item 82070000027"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"itemNumber": "00855140333",
|
||||||
|
"description": "Item 855140333"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"itemNumber": "00855480834",
|
||||||
|
"description": "Item 855480834"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"componentLots": [
|
"componentLots": [
|
||||||
{ "lotNumber": "LOT001", "itemNumber": "00598004702" },
|
{
|
||||||
{ "lotNumber": "LOT002", "itemNumber": "82070000028" },
|
"lotNumber": "LOT001",
|
||||||
{ "lotNumber": "LOT003", "itemNumber": "82070000027" }
|
"itemNumber": "00598004702"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lotNumber": "LOT002",
|
||||||
|
"itemNumber": "82070000028"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lotNumber": "LOT003",
|
||||||
|
"itemNumber": "82070000027"
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"partOperations": [
|
"partOperations": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,12 +2,34 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Item Number" search type (TC-140).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission with workbook upload in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanItemNumberSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanItemNumberSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Item Number search form submits with an uploaded workbook filter (TC-140).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-140".</item>
|
||||||
|
/// <item>Select the "Time Span + Item Number" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Upload "single_item.xlsx" to the "Filter by Item Number" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanItemNumber_Submits() =>
|
public Task TimeSpanItemNumber_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanItem,
|
UiSearchTypes.TimeSpanItem,
|
||||||
"MIGRATED-TC-140",
|
"MIGRATED-TC-140",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -16,4 +38,5 @@ public sealed class TimeSpanItemNumberSearchTests(PlaywrightFixture fixture) : S
|
|||||||
[
|
[
|
||||||
("Filter by Item Number", "single_item.xlsx")
|
("Filter by Item Number", "single_item.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,34 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Operator" search type (TC-050).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanOperatorSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanOperatorSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Operator search form submits with autocomplete filter (TC-050).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-050".</item>
|
||||||
|
/// <item>Select the "Time Span + Operator" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "ADAMSSN" to the "Filter by Operator" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanOperator_Submits() =>
|
public Task TimeSpanOperator_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanOperator,
|
UiSearchTypes.TimeSpanOperator,
|
||||||
"MIGRATED-TC-050",
|
"MIGRATED-TC-050",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -15,4 +37,5 @@ public sealed class TimeSpanOperatorSearchTests(PlaywrightFixture fixture) : Sea
|
|||||||
[
|
[
|
||||||
("Filter by Operator", "ADAMSSN")
|
("Filter by Operator", "ADAMSSN")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,34 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Profit Center + Extract MIS" search type (TC-090).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanPcExtractMisSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanPcExtractMisSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Profit Center + Extract MIS search form submits with autocomplete filter (TC-090).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-090".</item>
|
||||||
|
/// <item>Select the "Time Span + Profit Center + Extract MIS" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "1AM" to the "Filter by Profit Center" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanPcExtractMis_Submits() =>
|
public Task TimeSpanPcExtractMis_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanPcExtractMis,
|
UiSearchTypes.TimeSpanPcExtractMis,
|
||||||
"MIGRATED-TC-090",
|
"MIGRATED-TC-090",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -15,4 +37,5 @@ public sealed class TimeSpanPcExtractMisSearchTests(PlaywrightFixture fixture) :
|
|||||||
[
|
[
|
||||||
("Filter by Profit Center", "1AM")
|
("Filter by Profit Center", "1AM")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,35 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Profit Center + Item Number" search type (TC-060).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanPcItemSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanPcItemSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Profit Center + Item Number search form submits with autocomplete and upload (TC-060).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-060".</item>
|
||||||
|
/// <item>Select the "Time Span + Profit Center + Item Number" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "1AM" to the "Filter by Profit Center" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_item.xlsx" to the "Filter by Item Number" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanPcItem_Submits() =>
|
public Task TimeSpanPcItem_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanPcItem,
|
UiSearchTypes.TimeSpanPcItem,
|
||||||
"MIGRATED-TC-060",
|
"MIGRATED-TC-060",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -18,4 +41,5 @@ public sealed class TimeSpanPcItemSearchTests(PlaywrightFixture fixture) : Searc
|
|||||||
[
|
[
|
||||||
("Filter by Item Number", "single_item.xlsx")
|
("Filter by Item Number", "single_item.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,35 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Profit Center + Operator" search type (TC-160).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanPcOperatorSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanPcOperatorSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Profit Center + Operator search form submits with autocomplete filters (TC-160).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-160".</item>
|
||||||
|
/// <item>Select the "Time Span + Profit Center + Operator" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "1AM" to the "Filter by Profit Center" panel (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "ADAMSSN" to the "Filter by Operator" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanPcOperator_Submits() =>
|
public Task TimeSpanPcOperator_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanPcOperator,
|
UiSearchTypes.TimeSpanPcOperator,
|
||||||
"MIGRATED-TC-160",
|
"MIGRATED-TC-160",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -16,4 +39,5 @@ public sealed class TimeSpanPcOperatorSearchTests(PlaywrightFixture fixture) : S
|
|||||||
("Filter by Profit Center", "1AM"),
|
("Filter by Profit Center", "1AM"),
|
||||||
("Filter by Operator", "ADAMSSN")
|
("Filter by Operator", "ADAMSSN")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,35 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Profit Center + Item/Operation/MIS" search type (TC-070).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanPcPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanPcPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Profit Center + Item/Operation/MIS search form submits with autocomplete and upload (TC-070).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-070".</item>
|
||||||
|
/// <item>Select the "Time Span + Profit Center + Item/Operation/MIS" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "1AM" to the "Filter by Profit Center" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_operation.xlsx" to the "Filter By Item/Operation/MIS" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanPcPartOp_Submits() =>
|
public Task TimeSpanPcPartOp_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanPcPartOp,
|
UiSearchTypes.TimeSpanPcPartOp,
|
||||||
"MIGRATED-TC-070",
|
"MIGRATED-TC-070",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -18,4 +41,5 @@ public sealed class TimeSpanPcPartOpSearchTests(PlaywrightFixture fixture) : Sea
|
|||||||
[
|
[
|
||||||
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,36 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Profit Center + Work Order + Item/Operation/MIS" search type (TC-080).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanPcWoPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanPcWoPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + PC + Work Order + Item/Op/MIS search form submits with autocomplete and uploads (TC-080).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-080".</item>
|
||||||
|
/// <item>Select the "Time Span + Profit Center + Work Order + Item/Operation/MIS" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "1AM" to the "Filter by Profit Center" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_workorder.xlsx" to the "Filter by Work Order" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_operation.xlsx" to the "Filter By Item/Operation/MIS" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanPcWoPartOp_Submits() =>
|
public Task TimeSpanPcWoPartOp_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanPcWoPartOp,
|
UiSearchTypes.TimeSpanPcWoPartOp,
|
||||||
"MIGRATED-TC-080",
|
"MIGRATED-TC-080",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -19,4 +43,5 @@ public sealed class TimeSpanPcWoPartOpSearchTests(PlaywrightFixture fixture) : S
|
|||||||
("Filter by Work Order", "single_workorder.xlsx"),
|
("Filter by Work Order", "single_workorder.xlsx"),
|
||||||
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,34 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Profit Center" search type (TC-030).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanProfitCenterSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanProfitCenterSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Profit Center search form submits with autocomplete filter (TC-030).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-030".</item>
|
||||||
|
/// <item>Select the "Time Span + Profit Center" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "1AM" to the "Filter by Profit Center" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanProfitCenter_Submits() =>
|
public Task TimeSpanProfitCenter_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanProfitCenter,
|
UiSearchTypes.TimeSpanProfitCenter,
|
||||||
"MIGRATED-TC-030",
|
"MIGRATED-TC-030",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -15,4 +37,5 @@ public sealed class TimeSpanProfitCenterSearchTests(PlaywrightFixture fixture) :
|
|||||||
[
|
[
|
||||||
("Filter by Profit Center", "1AM")
|
("Filter by Profit Center", "1AM")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,34 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Work Center + Extract MIS" search type (TC-110).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanWcExtractMisSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanWcExtractMisSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Work Center + Extract MIS search form submits with autocomplete filter (TC-110).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-110".</item>
|
||||||
|
/// <item>Select the "Time Span + Work Center + Extract MIS" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "0083AS" to the "Filter by Work Center" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanWcExtractMis_Submits() =>
|
public Task TimeSpanWcExtractMis_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanWcExtractMis,
|
UiSearchTypes.TimeSpanWcExtractMis,
|
||||||
"MIGRATED-TC-110",
|
"MIGRATED-TC-110",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -15,4 +37,5 @@ public sealed class TimeSpanWcExtractMisSearchTests(PlaywrightFixture fixture) :
|
|||||||
[
|
[
|
||||||
("Filter by Work Center", "0083AS")
|
("Filter by Work Center", "0083AS")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,35 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Work Center + Item Number" search type (TC-100).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanWcItemSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanWcItemSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Work Center + Item Number search form submits with autocomplete and upload (TC-100).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-100".</item>
|
||||||
|
/// <item>Select the "Time Span + Work Center + Item Number" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "0083AS" to the "Filter by Work Center" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_item.xlsx" to the "Filter by Item Number" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanWcItem_Submits() =>
|
public Task TimeSpanWcItem_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanWcItem,
|
UiSearchTypes.TimeSpanWcItem,
|
||||||
"MIGRATED-TC-100",
|
"MIGRATED-TC-100",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -18,4 +41,5 @@ public sealed class TimeSpanWcItemSearchTests(PlaywrightFixture fixture) : Searc
|
|||||||
[
|
[
|
||||||
("Filter by Item Number", "single_item.xlsx")
|
("Filter by Item Number", "single_item.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,35 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Work Center + Operator" search type (TC-150).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanWcOperatorSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanWcOperatorSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Work Center + Operator search form submits with autocomplete filters (TC-150).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-150".</item>
|
||||||
|
/// <item>Select the "Time Span + Work Center + Operator" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "0083AS" to the "Filter by Work Center" panel (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "ADAMSSN" to the "Filter by Operator" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanWcOperator_Submits() =>
|
public Task TimeSpanWcOperator_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanWcOperator,
|
UiSearchTypes.TimeSpanWcOperator,
|
||||||
"MIGRATED-TC-150",
|
"MIGRATED-TC-150",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -16,4 +39,5 @@ public sealed class TimeSpanWcOperatorSearchTests(PlaywrightFixture fixture) : S
|
|||||||
("Filter by Work Center", "0083AS"),
|
("Filter by Work Center", "0083AS"),
|
||||||
("Filter by Operator", "ADAMSSN")
|
("Filter by Operator", "ADAMSSN")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,35 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Work Center + Item/Operation/MIS" search type (TC-120).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanWcPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanWcPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Work Center + Item/Operation/MIS search form submits with autocomplete and upload (TC-120).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-120".</item>
|
||||||
|
/// <item>Select the "Time Span + Work Center + Item/Operation/MIS" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "0083AS" to the "Filter by Work Center" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_operation.xlsx" to the "Filter By Item/Operation/MIS" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanWcPartOp_Submits() =>
|
public Task TimeSpanWcPartOp_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanWcPartOp,
|
UiSearchTypes.TimeSpanWcPartOp,
|
||||||
"MIGRATED-TC-120",
|
"MIGRATED-TC-120",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -18,4 +41,5 @@ public sealed class TimeSpanWcPartOpSearchTests(PlaywrightFixture fixture) : Sea
|
|||||||
[
|
[
|
||||||
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,36 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Work Center + Work Order + Item/Operation/MIS" search type (TC-130).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanWcWoPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanWcWoPartOpSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + WC + Work Order + Item/Op/MIS search form submits with autocomplete and uploads (TC-130).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-130".</item>
|
||||||
|
/// <item>Select the "Time Span + Work Center + Work Order + Item/Operation/MIS" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "0083AS" to the "Filter by Work Center" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_workorder.xlsx" to the "Filter by Work Order" panel (strict only).</item>
|
||||||
|
/// <item>Upload "single_operation.xlsx" to the "Filter By Item/Operation/MIS" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanWcWoPartOp_Submits() =>
|
public Task TimeSpanWcWoPartOp_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanWcWoPartOp,
|
UiSearchTypes.TimeSpanWcWoPartOp,
|
||||||
"MIGRATED-TC-130",
|
"MIGRATED-TC-130",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -19,4 +43,5 @@ public sealed class TimeSpanWcWoPartOpSearchTests(PlaywrightFixture fixture) : S
|
|||||||
("Filter by Work Order", "single_workorder.xlsx"),
|
("Filter by Work Order", "single_workorder.xlsx"),
|
||||||
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
("Filter By Item/Operation/MIS", "single_operation.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,12 +2,34 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Time Span + Work Center" search type (TC-040).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class TimeSpanWorkCenterSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class TimeSpanWorkCenterSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Time Span + Work Center search form submits with autocomplete filter (TC-040).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-040".</item>
|
||||||
|
/// <item>Select the "Time Span + Work Center" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Set the date range to 01/01/2019 – 12/31/2019 (strict only).</item>
|
||||||
|
/// <item>Add autocomplete value "0083AS" to the "Filter by Work Center" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task TimeSpanWorkCenter_Submits() =>
|
public Task TimeSpanWorkCenter_Submits()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.TimeSpanWorkCenter,
|
UiSearchTypes.TimeSpanWorkCenter,
|
||||||
"MIGRATED-TC-040",
|
"MIGRATED-TC-040",
|
||||||
"01/01/2019",
|
"01/01/2019",
|
||||||
@@ -15,4 +37,5 @@ public sealed class TimeSpanWorkCenterSearchTests(PlaywrightFixture fixture) : S
|
|||||||
[
|
[
|
||||||
("Filter by Work Center", "0083AS")
|
("Filter by Work Center", "0083AS")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -2,16 +2,38 @@ using JdeScoping.Ui.Tests.Support;
|
|||||||
|
|
||||||
namespace JdeScoping.Ui.Tests;
|
namespace JdeScoping.Ui.Tests;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Playwright UI tests for the "Work Order" search type (TC-010).
|
||||||
|
/// Validates search form interaction in smoke mode and full submission with workbook upload in strict mode.
|
||||||
|
/// Requires a running Docker host (Category: RequiresDockerHost).
|
||||||
|
/// </summary>
|
||||||
public sealed class WorkOrderSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
public sealed class WorkOrderSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Verifies the Work Order search form submits with an uploaded workbook filter (TC-010).
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
|
||||||
|
/// <list type="number">
|
||||||
|
/// <item>Navigate to the search page.</item>
|
||||||
|
/// <item>Enter the search name "MIGRATED-TC-010".</item>
|
||||||
|
/// <item>Select the "Work Order" search type from the dropdown.</item>
|
||||||
|
/// <item>Verify the dropdown displays the selected type.</item>
|
||||||
|
/// <item>Upload "single_workorder.xlsx" to the "Filter by Work Order" panel (strict only).</item>
|
||||||
|
/// <item>Click Submit (strict only).</item>
|
||||||
|
/// <item>Assert no error notification is present (strict only).</item>
|
||||||
|
/// </list>
|
||||||
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
[Trait("Category", "RequiresDockerHost")]
|
[Trait("Category", "RequiresDockerHost")]
|
||||||
public Task WorkOrder_SubmitsWithUploadedWorkbook() =>
|
public Task WorkOrder_SubmitsWithUploadedWorkbook()
|
||||||
RunSearchSubmissionAsync(
|
{
|
||||||
|
return RunSearchSubmissionAsync(
|
||||||
UiSearchTypes.WorkOrder,
|
UiSearchTypes.WorkOrder,
|
||||||
"MIGRATED-TC-010",
|
"MIGRATED-TC-010",
|
||||||
uploads:
|
uploads:
|
||||||
[
|
[
|
||||||
("Filter by Work Order", "single_workorder.xlsx")
|
("Filter by Work Order", "single_workorder.xlsx")
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user