using JdeScoping.Ui.Tests.Support;
namespace JdeScoping.Ui.Tests;
///
/// 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).
///
public sealed class ComponentLotSearchTests(PlaywrightFixture fixture) : SearchFlowTestBase(fixture)
{
///
/// Verifies the Component Lot search form submits with an uploaded workbook filter (TC-020).
///
///
/// Steps (smoke mode stops after step 4; strict mode runs all steps):
/// 1. Navigate to the search page.
/// 2. Enter the search name "MIGRATED-TC-020".
/// 3. Select the "Component Lot" search type from the dropdown.
/// 4. Verify the dropdown displays the selected type.
/// 5. Upload "single_lot.xlsx" to the "Filter By Component Lot" panel (strict only).
/// 6. Click Submit (strict only).
/// 7. Assert no error notification is present (strict only).
///
[Fact]
[Trait("Category", "RequiresDockerHost")]
public Task ComponentLot_SubmitsWithUploadedWorkbook()
{
return RunSearchSubmissionAsync(
UiSearchTypes.ComponentLot,
"MIGRATED-TC-020",
uploads:
[
("Filter By Component Lot", "single_lot.xlsx")
]);
}
}