diff --git a/Directory.Packages.props b/Directory.Packages.props index 2307d262..e3ac90fe 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,42 +6,43 @@ - - - + + + - - + + - - - - - - - + + + + + + + - - - + + + - - - - - - - + + + + + + + + - + - \ No newline at end of file + diff --git a/EstateManagementUI.BlazorFastIntegrationTests/Common/DashboardPageHelper.cs b/EstateManagementUI.BlazorFastIntegrationTests/Common/DashboardPageHelper.cs index 0b135a47..e7762c89 100644 --- a/EstateManagementUI.BlazorFastIntegrationTests/Common/DashboardPageHelper.cs +++ b/EstateManagementUI.BlazorFastIntegrationTests/Common/DashboardPageHelper.cs @@ -962,6 +962,11 @@ await RunWithFailureArtifactsAsync(async () => } await _page.WaitForLoadStateAsync(LoadState.DOMContentLoaded); + await _page.WaitForFunctionAsync(@"() => { + const merchantNameInput = document.querySelector(""input[placeholder='Enter merchant name']""); + return merchantNameInput && Array.from(merchantNameInput.attributes) + .some(attribute => attribute.name.startsWith('_bl_')); + }"); await _page.Locator("input[placeholder='Enter merchant name']").FillAsync(merchant.MerchantName); await _page.Locator(SettlementScheduleSelector).SelectOptionAsync(merchant.SettlementSchedule); @@ -1742,16 +1747,30 @@ private async Task WaitForAnyVisibleAsync(params string[] selectors) private async Task WaitForEstateOverviewAsync() { - await _page.Locator(".animate-spin").WaitForAsync(new LocatorWaitForOptions + await _page.GetByRole(AriaRole.Heading, new() { Name = EstateManagementHeading }).WaitForAsync(new LocatorWaitForOptions { - State = WaitForSelectorState.Hidden, + State = WaitForSelectorState.Visible, + Timeout = 30000 + }); + await _page.GetByText("Total Merchants").WaitForAsync(new LocatorWaitForOptions + { + State = WaitForSelectorState.Visible, Timeout = 30000 }); } private async Task WaitForDashboardContentAsync() { - await WaitForEstateOverviewAsync(); + await _page.GetByRole(AriaRole.Heading, new() { Name = "Dashboard" }).WaitForAsync(new LocatorWaitForOptions + { + State = WaitForSelectorState.Visible, + Timeout = 30000 + }); + await _page.GetByText("Welcome to Estate Management System").WaitForAsync(new LocatorWaitForOptions + { + State = WaitForSelectorState.Visible, + Timeout = 30000 + }); await _page.WaitForLoadStateAsync(LoadState.NetworkIdle); } diff --git a/EstateManagementUI.BlazorFastIntegrationTests/EstateManagementUI.BlazorFastIntegrationTests.csproj b/EstateManagementUI.BlazorFastIntegrationTests/EstateManagementUI.BlazorFastIntegrationTests.csproj index bdda16e0..956bbee9 100644 --- a/EstateManagementUI.BlazorFastIntegrationTests/EstateManagementUI.BlazorFastIntegrationTests.csproj +++ b/EstateManagementUI.BlazorFastIntegrationTests/EstateManagementUI.BlazorFastIntegrationTests.csproj @@ -22,6 +22,7 @@ +