# Search Page Test Scripts Test scripts for the Submit Search page functionality. Each file covers a specific search type with positive and negative test cases. --- ## Environment Setup ### Prerequisites - .NET 10 SDK installed - Docker running (for SQL Server database) - Database container started (see `db_info.md`) ### Build the Solution ```bash # From project root dotnet build NEW/JdeScoping.slnx ``` ### Start the Host (Application Server) ```bash # Start in foreground (Ctrl+C to stop) dotnet run --project NEW/src/JdeScoping.Host/JdeScoping.Host.csproj # Or start with specific profile dotnet run --project NEW/src/JdeScoping.Host/JdeScoping.Host.csproj --launch-profile https ``` **Application URLs:** - HTTP: http://localhost:5294 - HTTPS: https://localhost:7159 ### Stop the Host - **Foreground**: Press `Ctrl+C` in the terminal running the host - **Background process**: Find and kill the process: ```bash # Find the process lsof -i :5294 # Kill by PID kill ``` ### Restart the Host ```bash # Stop (Ctrl+C) then start again dotnet run --project NEW/src/JdeScoping.Host/JdeScoping.Host.csproj ``` ### Verify Host is Running ```bash # Check if port is in use lsof -i :5294 # Or curl the health endpoint curl http://localhost:5294/health ``` ### Start Database (if not running) ```bash docker start scopingtool-sqlserver ``` --- ## Common Tasks ### CT-01: Log In to Application 1. Navigate to the application URL 2. Enter valid username in the Username field 3. Enter valid password in the Password field 4. Click the "Login" button 5. **Expected**: User is redirected to the home page, navigation menu is visible ### CT-02: Navigate to Submit Search Page **Precondition**: User is logged in (CT-01) 1. Click "Submit Search" in the navigation menu 2. **Expected**: Submit Search page loads with empty form ### CT-03: Log Out of Application **Precondition**: User is logged in (CT-01) 1. Click the user menu in the top right corner 2. Click "Logout" 3. **Expected**: User is redirected to login page, session is ended ### CT-04: Navigate to Search Results Page **Precondition**: User is logged in (CT-01) 1. Click "Search Results" in the navigation menu 2. **Expected**: Search Results page loads showing list of submitted searches ### CT-05: Verify Search in Results List **Precondition**: User is on Search Results page (CT-04) 1. Locate the search by name in the results list 2. Verify the Status column shows expected status (Queued, Processing, Complete, Error) 3. Verify the Submit Date column shows current date/time 4. **Expected**: Search appears in list with correct details ### CT-06: Clear Search Form **Precondition**: User is on Submit Search page (CT-02) 1. Click the "Clear" or "Reset" button 2. **Expected**: All form fields are cleared, search type is deselected --- ## Test Files | File | ID | Search Type | Required Filters | |------|-----|-------------|------------------| | [10_WorkOrder.md](10_WorkOrder.md) | 10 | Work Order | Work Order | | [20_ComponentLot.md](20_ComponentLot.md) | 20 | Component Lot | Component Lot | | [30_TimeSpan_ProfitCenter.md](30_TimeSpan_ProfitCenter.md) | 30 | Time Span + Profit Center | Dates, Profit Center | | [40_TimeSpan_WorkCenter.md](40_TimeSpan_WorkCenter.md) | 40 | Time Span + Work Center | Dates, Work Center | | [50_TimeSpan_Operator.md](50_TimeSpan_Operator.md) | 50 | Time Span + Operator | Dates, Operator | | [60_TimeSpan_ProfitCenter_ItemNumber.md](60_TimeSpan_ProfitCenter_ItemNumber.md) | 60 | Time Span + Profit Center + Item | Dates, Profit Center, Item | | [70_TimeSpan_ProfitCenter_ItemOperationMIS.md](70_TimeSpan_ProfitCenter_ItemOperationMIS.md) | 70 | Time Span + Profit Center + Item/Op/MIS | Dates, Profit Center, Part Operation | | [80_TimeSpan_ProfitCenter_WorkOrder_ItemOperationMIS.md](80_TimeSpan_ProfitCenter_WorkOrder_ItemOperationMIS.md) | 80 | Time Span + Profit Center + Work Order + Item/Op/MIS | Dates, Profit Center, Work Order, Part Operation | | [90_TimeSpan_ProfitCenter_ExtractMIS.md](90_TimeSpan_ProfitCenter_ExtractMIS.md) | 90 | Time Span + Profit Center + Extract MIS | Dates, Profit Center, Extract MIS | | [100_TimeSpan_WorkCenter_ItemNumber.md](100_TimeSpan_WorkCenter_ItemNumber.md) | 100 | Time Span + Work Center + Item | Dates, Work Center, Item | | [110_TimeSpan_WorkCenter_ExtractMIS.md](110_TimeSpan_WorkCenter_ExtractMIS.md) | 110 | Time Span + Work Center + Extract MIS | Dates, Work Center, Extract MIS | | [120_TimeSpan_WorkCenter_ItemOperationMIS.md](120_TimeSpan_WorkCenter_ItemOperationMIS.md) | 120 | Time Span + Work Center + Item/Op/MIS | Dates, Work Center, Part Operation | | [130_TimeSpan_WorkCenter_WorkOrder_ItemOperationMIS.md](130_TimeSpan_WorkCenter_WorkOrder_ItemOperationMIS.md) | 130 | Time Span + Work Center + Work Order + Item/Op/MIS | Dates, Work Center, Work Order, Part Operation | | [140_TimeSpan_ItemNumber.md](140_TimeSpan_ItemNumber.md) | 140 | Time Span + Item | Dates, Item | | [150_TimeSpan_WorkCenter_Operator.md](150_TimeSpan_WorkCenter_Operator.md) | 150 | Time Span + Work Center + Operator | Dates, Work Center, Operator | | [160_TimeSpan_ProfitCenter_Operator.md](160_TimeSpan_ProfitCenter_Operator.md) | 160 | Time Span + Profit Center + Operator | Dates, Profit Center, Operator | ## Test Case Structure Each file contains: - **Overview**: Search type description and enabled filters - **Valid Test Data**: Sample data from dev database for testing - **Positive Test Cases** (TC-XXX-P01, P02...): Valid scenarios that should succeed - **Negative Test Cases** (TC-XXX-N01, N02...): Invalid scenarios that should show errors ### Referencing Common Tasks Test cases reference common tasks using the format `(See CT-XX)`. For example: > **Preconditions:** > - User is logged in (See CT-01) > - User is on Submit Search page (See CT-02) --- ## Test Data Source Test data was extracted from the development database (`ScopingTool` on `localhost:1434`). See `db_info.md` in the project root for connection details.