test(playwright): fix stale selectors after UI refactor (h1 headings, collapsed Topology/Audit disclosures, ParameterValueForm ids, method-select race)
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ public class AuditConfigurationTests
|
|||||||
// Search is issued — the page only auto-fetches when arriving with a
|
// Search is issued — the page only auto-fetches when arriving with a
|
||||||
// ?bundleImportId= query param, which a bare visit lacks — so the
|
// ?bundleImportId= query param, which a bare visit lacks — so the
|
||||||
// Entity Type filter is present and ready to drive the first query.
|
// Entity Type filter is present and ready to drive the first query.
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Configuration Audit Log')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Configuration Audit Log')")).ToBeVisibleAsync();
|
||||||
await Assertions.Expect(page.Locator("#audit-filter-entity-type")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("#audit-filter-entity-type")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Filter by the unique marker so only this run's 3 rows remain, then
|
// Filter by the unique marker so only this run's 3 rows remain, then
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class AuditLogPageTests
|
|||||||
|
|
||||||
// Apply channel AND target together.
|
// Apply channel AND target together.
|
||||||
await page.Locator("[data-test='filter-channel-select']").SelectOptionAsync("ApiOutbound");
|
await page.Locator("[data-test='filter-channel-select']").SelectOptionAsync("ApiOutbound");
|
||||||
await page.FillAsync("#audit-target", targetPrefix + "match");
|
await FillAdvancedFilterAsync(page, "#audit-target", targetPrefix + "match");
|
||||||
await page.ClickAsync("[data-test='filter-apply']");
|
await page.ClickAsync("[data-test='filter-apply']");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ public class AuditLogPageTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/audit/log");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/audit/log");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await page.FillAsync("#audit-execution-id", Guid.NewGuid().ToString());
|
await FillAdvancedFilterAsync(page, "#audit-execution-id", Guid.NewGuid().ToString());
|
||||||
await page.ClickAsync("[data-test='filter-apply']");
|
await page.ClickAsync("[data-test='filter-apply']");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
@@ -719,7 +719,7 @@ public class AuditLogPageTests
|
|||||||
// Page reachable for the multi-role user; the Notification Report page
|
// Page reachable for the multi-role user; the Notification Report page
|
||||||
// is Deployment-gated, so this also covers that authorization path.
|
// is Deployment-gated, so this also covers that authorization path.
|
||||||
Assert.Contains("/notifications/report", page.Url);
|
Assert.Contains("/notifications/report", page.Url);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Notification Report')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Notification Report')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// When there are notifications visible, the "View audit history" link
|
// When there are notifications visible, the "View audit history" link
|
||||||
// is rendered. When there are none, we just confirm the empty-state.
|
// is rendered. When there are none, we just confirm the empty-state.
|
||||||
@@ -829,7 +829,7 @@ public class AuditLogPageTests
|
|||||||
|
|
||||||
// Filter to the seeded row (contains-match), then Apply to populate the
|
// Filter to the seeded row (contains-match), then Apply to populate the
|
||||||
// grid — it stays empty until the user filters.
|
// grid — it stays empty until the user filters.
|
||||||
await page.FillAsync("#audit-target", targetPrefix + "dbrow");
|
await FillAdvancedFilterAsync(page, "#audit-target", targetPrefix + "dbrow");
|
||||||
await page.ClickAsync("[data-test='filter-apply']");
|
await page.ClickAsync("[data-test='filter-apply']");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
@@ -887,7 +887,7 @@ public class AuditLogPageTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/audit/log");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/audit/log");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await page.FillAsync("#audit-target", targetPrefix + "row");
|
await FillAdvancedFilterAsync(page, "#audit-target", targetPrefix + "row");
|
||||||
await page.ClickAsync("[data-test='filter-apply']");
|
await page.ClickAsync("[data-test='filter-apply']");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
@@ -912,4 +912,16 @@ public class AuditLogPageTests
|
|||||||
await AuditDataSeeder.DeleteByTargetPrefixAsync(targetPrefix);
|
await AuditDataSeeder.DeleteByTargetPrefixAsync(targetPrefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fills a filter that lives inside the collapsed "More filters" disclosure,
|
||||||
|
/// opening it first when needed.
|
||||||
|
/// </summary>
|
||||||
|
private static async Task FillAdvancedFilterAsync(IPage page, string selector, string value)
|
||||||
|
{
|
||||||
|
var more = page.Locator("details[data-test='filter-more']");
|
||||||
|
if (!await more.EvaluateAsync<bool>("d => d.open"))
|
||||||
|
await more.Locator("summary").ClickAsync();
|
||||||
|
await page.FillAsync(selector, value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ public class DebugViewTests : IClassFixture<DeploymentFixture>
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/deployment/debug-view");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/deployment/debug-view");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Debug View')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Debug View')")).ToBeVisibleAsync();
|
||||||
// The data-test hooks must be served (proves the rebuild took).
|
// The data-test hooks must be served (proves the rebuild took).
|
||||||
await Assertions.Expect(page.Locator("[data-test='debug-site-select']")).ToHaveCountAsync(1);
|
await Assertions.Expect(page.Locator("[data-test='debug-site-select']")).ToHaveCountAsync(1);
|
||||||
await Assertions.Expect(page.Locator("[data-test='debug-instance-picker']")).ToHaveCountAsync(1);
|
await Assertions.Expect(page.Locator("[data-test='debug-instance-picker']")).ToHaveCountAsync(1);
|
||||||
|
|||||||
+2
-2
@@ -62,7 +62,7 @@ public class DeploymentsRealtimeTests : IClassFixture<DeploymentFixture>
|
|||||||
var page = await _pw.NewAuthenticatedPageAsync();
|
var page = await _pw.NewAuthenticatedPageAsync();
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/deployment/deployments");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/deployment/deployments");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Deployment Status')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Deployment Status')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Deploy over the CLI — this writes deployment records and raises StatusChanged,
|
// Deploy over the CLI — this writes deployment records and raises StatusChanged,
|
||||||
// which the page reloads on (push). No Refresh click here: the row appearing IS
|
// which the page reloads on (push). No Refresh click here: the row appearing IS
|
||||||
@@ -93,7 +93,7 @@ public class DeploymentsRealtimeTests : IClassFixture<DeploymentFixture>
|
|||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
// Confirm the page loaded before interacting (symmetric with Fact A) — a failed
|
// Confirm the page loaded before interacting (symmetric with Fact A) — a failed
|
||||||
// load then surfaces as a clear heading-miss rather than a confusing Pause timeout.
|
// load then surfaces as a clear heading-miss rather than a confusing Pause timeout.
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Deployment Status')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Deployment Status')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Pause — the click round-trips over the circuit, so _autoRefresh is committed
|
// Pause — the click round-trips over the circuit, so _autoRefresh is committed
|
||||||
// false before the deploy below. The button flipping to "Resume" proves it.
|
// false before the deploy below. The button flipping to "Resume" proves it.
|
||||||
|
|||||||
+6
-2
@@ -55,7 +55,7 @@ public class FlowDebuggerTests : IClassFixture<FlowDebuggerFixture>
|
|||||||
// to Predicted and the method's ParameterValueForm (the same typed form the script
|
// to Predicted and the method's ParameterValueForm (the same typed form the script
|
||||||
// pane uses, inputs addressed by field id) appears.
|
// pane uses, inputs addressed by field id) appears.
|
||||||
await Assertions.Expect(page.Locator("[data-test='flow-state']")).ToHaveTextAsync("Predicted", new() { Timeout = 15_000 });
|
await Assertions.Expect(page.Locator("[data-test='flow-state']")).ToHaveTextAsync("Predicted", new() { Timeout = 15_000 });
|
||||||
var input = page.Locator("#param-Text");
|
var input = page.Locator("[data-param-path='Text']");
|
||||||
await Assertions.Expect(input).ToBeVisibleAsync();
|
await Assertions.Expect(input).ToBeVisibleAsync();
|
||||||
|
|
||||||
// @bind commits on change (blur), so commit the value as its own circuit message before Run.
|
// @bind commits on change (blur), so commit the value as its own circuit message before Run.
|
||||||
@@ -136,7 +136,7 @@ public class FlowDebuggerTests : IClassFixture<FlowDebuggerFixture>
|
|||||||
await Assertions.Expect(paramsCard.Or(noParamsNote)).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
await Assertions.Expect(paramsCard.Or(noParamsNote)).ToBeVisibleAsync(new() { Timeout = 15_000 });
|
||||||
if (await paramsCard.IsVisibleAsync())
|
if (await paramsCard.IsVisibleAsync())
|
||||||
{
|
{
|
||||||
var workOrder = page.Locator("#param-WorkOrder");
|
var workOrder = page.Locator("[data-param-path='WorkOrder']");
|
||||||
if (await workOrder.CountAsync() > 0)
|
if (await workOrder.CountAsync() > 0)
|
||||||
{
|
{
|
||||||
await workOrder.FillAsync("WO-PW");
|
await workOrder.FillAsync("WO-PW");
|
||||||
@@ -299,6 +299,10 @@ public class FlowDebuggerTests : IClassFixture<FlowDebuggerFixture>
|
|||||||
await Assertions.Expect(select).ToBeVisibleAsync();
|
await Assertions.Expect(select).ToBeVisibleAsync();
|
||||||
// The option list is loaded server-side on init; wait for our method to be present.
|
// The option list is loaded server-side on init; wait for our method to be present.
|
||||||
await Assertions.Expect(select.Locator($"option[value='{MethodIdText}']")).ToHaveCountAsync(1, new() { Timeout = 15_000 });
|
await Assertions.Expect(select.Locator($"option[value='{MethodIdText}']")).ToHaveCountAsync(1, new() { Timeout = 15_000 });
|
||||||
|
// The static-rendered <select> is visible before the Blazor circuit attaches its change
|
||||||
|
// handler; a selection made in that window is silently lost (state stays "Not run").
|
||||||
|
// Wait for the circuit to settle, then select.
|
||||||
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await select.SelectOptionAsync(MethodIdText);
|
await select.SelectOptionAsync(MethodIdText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ internal static class TopologyPageHelper
|
|||||||
// newly-expanded branches (and their "Load instances" loaders) exist. Wait until no
|
// newly-expanded branches (and their "Load instances" loaders) exist. Wait until no
|
||||||
// collapsed branch remains before counting loaders — counting immediately raced the
|
// collapsed branch remains before counting loaders — counting immediately raced the
|
||||||
// render and returned an unexpanded tree whenever the round-trip lost.
|
// render and returned an unexpanded tree whenever the round-trip lost.
|
||||||
|
// The tree toolbar's secondary actions live in a collapsed "More actions" <details>.
|
||||||
|
var more = page.Locator("details.topology-actions-disclosure");
|
||||||
|
if (!await more.EvaluateAsync<bool>("d => d.open"))
|
||||||
|
await more.Locator("summary").ClickAsync();
|
||||||
var collapsed = page.Locator("li[role='treeitem'][aria-expanded='false']");
|
var collapsed = page.Locator("li[role='treeitem'][aria-expanded='false']");
|
||||||
for (var branch = 0; branch < 300; branch++)
|
for (var branch = 0; branch < 300; branch++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class ApiMethodFormTests
|
|||||||
|
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/api-methods/create");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/api-methods/create");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Add API Method')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Add API Method')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// The form has several text inputs (Name + SchemaBuilder/parameter rows that also
|
// The form has several text inputs (Name + SchemaBuilder/parameter rows that also
|
||||||
// carry .form-control), so anchor the Name input to its labelled wrapper and
|
// carry .form-control), so anchor the Name input to its labelled wrapper and
|
||||||
|
|||||||
+2
-2
@@ -39,7 +39,7 @@ public class DataConnectionCrudTests
|
|||||||
var page = await _pw.NewAuthenticatedPageAsync();
|
var page = await _pw.NewAuthenticatedPageAsync();
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Connections')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Connections')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Reveal all nodes so the new connection (a child of its site) is in the tree.
|
// Reveal all nodes so the new connection (a child of its site) is in the tree.
|
||||||
// Scope the "Expand all" click to the Bulk-actions dropdown we just opened, so it
|
// Scope the "Expand all" click to the Bulk-actions dropdown we just opened, so it
|
||||||
@@ -101,7 +101,7 @@ public class DataConnectionCrudTests
|
|||||||
var page = await _pw.NewAuthenticatedPageAsync();
|
var page = await _pw.NewAuthenticatedPageAsync();
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Connections')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Connections')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
var addButton = page.Locator("button.btn.btn-primary.btn-sm:has-text('+ Connection')");
|
var addButton = page.Locator("button.btn.btn-primary.btn-sm:has-text('+ Connection')");
|
||||||
await Assertions.Expect(addButton).ToBeDisabledAsync();
|
await Assertions.Expect(addButton).ToBeDisabledAsync();
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ public class ExternalSystemCrudTests
|
|||||||
// ── CREATE ────────────────────────────────────────────────────────────────
|
// ── CREATE ────────────────────────────────────────────────────────────────
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/external-systems/create");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/external-systems/create");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Add External System')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Add External System')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// ExternalSystemForm.razor has THREE input[type=text].form-control fields
|
// ExternalSystemForm.razor has THREE input[type=text].form-control fields
|
||||||
// (Name, Endpoint URL, and Auth Config JSON), so index-based selection is
|
// (Name, Endpoint URL, and Auth Config JSON), so index-based selection is
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public class M9SurfaceTests
|
|||||||
var page = await _pw.NewAuthenticatedPageAsync();
|
var page = await _pw.NewAuthenticatedPageAsync();
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/templates");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/templates");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Templates')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Templates')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Both templates are root nodes, so both labels are present before filtering.
|
// Both templates are root nodes, so both labels are present before filtering.
|
||||||
await Assertions.Expect(page.Locator("span.tv-label", new() { HasText = matchName }))
|
await Assertions.Expect(page.Locator("span.tv-label", new() { HasText = matchName }))
|
||||||
@@ -111,7 +111,7 @@ public class M9SurfaceTests
|
|||||||
|
|
||||||
// ── RENDER-SMOKE ──────────────────────────────────────────────────────────────
|
// ── RENDER-SMOKE ──────────────────────────────────────────────────────────────
|
||||||
// The page heading + New Schema button must render (no circuit crash on load).
|
// The page heading + New Schema button must render (no circuit crash on load).
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Schema Library')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Schema Library')")).ToBeVisibleAsync();
|
||||||
await page.ClickAsync("button.btn.btn-primary.btn-sm:has-text('New Schema')");
|
await page.ClickAsync("button.btn.btn-primary.btn-sm:has-text('New Schema')");
|
||||||
|
|
||||||
// The editor card opens with the SchemaBuilder; its Name input is now visible.
|
// The editor card opens with the SchemaBuilder; its Name input is now visible.
|
||||||
@@ -176,7 +176,7 @@ public class M9SurfaceTests
|
|||||||
var page = await _pw.NewAuthenticatedPageAsync();
|
var page = await _pw.NewAuthenticatedPageAsync();
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Connections')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Connections')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Reveal all nodes so the new connection (a child of its site) is in the tree.
|
// Reveal all nodes so the new connection (a child of its site) is in the tree.
|
||||||
var bulkDropdown = page.Locator(".dropdown")
|
var bulkDropdown = page.Locator(".dropdown")
|
||||||
|
|||||||
+2
-2
@@ -37,7 +37,7 @@ public class SharedScriptCrudTests
|
|||||||
var page = await _pw.NewAuthenticatedPageAsync();
|
var page = await _pw.NewAuthenticatedPageAsync();
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/shared-scripts");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/shared-scripts");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Shared Scripts')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Shared Scripts')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Narrow the list so the card locator stays unambiguous even with many scripts.
|
// Narrow the list so the card locator stays unambiguous even with many scripts.
|
||||||
await page.Locator("input[placeholder='Filter by name or code…']").FillAsync(name);
|
await page.Locator("input[placeholder='Filter by name or code…']").FillAsync(name);
|
||||||
@@ -85,7 +85,7 @@ public class SharedScriptCrudTests
|
|||||||
|
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/shared-scripts/create");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/shared-scripts/create");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('New Shared Script')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('New Shared Script')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
var nameInput = page.Locator("input[type=text].form-control.form-control-sm");
|
var nameInput = page.Locator("input[type=text].form-control.form-control-sm");
|
||||||
await Assertions.Expect(nameInput).ToBeVisibleAsync();
|
await Assertions.Expect(nameInput).ToBeVisibleAsync();
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class EventLogsTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{EventLogsUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{EventLogsUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Site Event Logs')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Site Event Logs')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// The site selector is populated from the cluster's known sites; the live cluster
|
// The site selector is populated from the cluster's known sites; the live cluster
|
||||||
// exposes site-a. Each option's value is the site's SiteIdentifier.
|
// exposes site-a. Each option's value is the site's SiteIdentifier.
|
||||||
@@ -89,7 +89,7 @@ public class EventLogsTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{EventLogsUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{EventLogsUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Site Event Logs')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Site Event Logs')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
await page.Locator("#filter-site").SelectOptionAsync(new SelectOptionValue { Value = "site-a" });
|
await page.Locator("#filter-site").SelectOptionAsync(new SelectOptionValue { Value = "site-a" });
|
||||||
var searchBtn = page.Locator("button.btn.btn-primary.btn-sm:has-text('Search')");
|
var searchBtn = page.Locator("button.btn.btn-primary.btn-sm:has-text('Search')");
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ public class ParkedMessagesActionTests
|
|||||||
var page = await _fixture.NewAuthenticatedPageAsync();
|
var page = await _fixture.NewAuthenticatedPageAsync();
|
||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/monitoring/parked-messages");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/monitoring/parked-messages");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Parked Messages')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Parked Messages')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
var query = page.Locator("button.btn.btn-primary.btn-sm:has-text('Query')");
|
var query = page.Locator("button.btn.btn-primary.btn-sm:has-text('Query')");
|
||||||
await Assertions.Expect(query).ToBeDisabledAsync();
|
await Assertions.Expect(query).ToBeDisabledAsync();
|
||||||
|
|||||||
+1
-1
@@ -52,7 +52,7 @@ public class ParkedMessagesTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ParkedMessagesUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ParkedMessagesUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Parked Messages')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Parked Messages')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Select site-a — the <option> value is the SiteIdentifier "site-a". The select is
|
// Select site-a — the <option> value is the SiteIdentifier "site-a". The select is
|
||||||
// an @onchange handler that, on a non-empty selection, kicks off the query itself;
|
// an @onchange handler that, on a non-empty selection, kicks off the query itself;
|
||||||
|
|||||||
@@ -130,11 +130,11 @@ public class NavigationTests
|
|||||||
|
|
||||||
// Verify the destination page actually rendered its heading (catches 500s
|
// Verify the destination page actually rendered its heading (catches 500s
|
||||||
// and blank renders that a URL-only check would miss).
|
// and blank renders that a URL-only check would miss).
|
||||||
// Every mapped route renders its heading as an <h4> — tightened from the
|
// Every mapped route renders its heading as an <h1> — tightened from the
|
||||||
// broader "h1, h4, h5" to prevent strict-mode violations if multiple
|
// broader "h1, h4, h5" to prevent strict-mode violations if multiple
|
||||||
// heading elements match.
|
// heading elements match.
|
||||||
var expectedHeading = RouteHeadings[expectedPath];
|
var expectedHeading = RouteHeadings[expectedPath];
|
||||||
await Assertions.Expect(page.Locator("h4", new() { HasText = expectedHeading })).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1", new() { HasText = expectedHeading })).ToBeVisibleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ILocatorAssertions Expect(ILocator locator) =>
|
private static ILocatorAssertions Expect(ILocator locator) =>
|
||||||
|
|||||||
+5
-5
@@ -80,7 +80,7 @@ public class NotificationActionTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Notification Report')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Notification Report')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Narrow to the seeded row: Parked status (so only Retry/Discard-bearing rows
|
// Narrow to the seeded row: Parked status (so only Retry/Discard-bearing rows
|
||||||
// render) plus the unique subject keyword. The status select is a @bind
|
// render) plus the unique subject keyword. The status select is a @bind
|
||||||
@@ -207,7 +207,7 @@ public class NotificationActionTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Notification Report')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Notification Report')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// #no-list is an exact-match text input bound @bind (commit-on-change), so
|
// #no-list is an exact-match text input bound @bind (commit-on-change), so
|
||||||
// FillAsync (which only fires `input`) must be followed by an explicit
|
// FillAsync (which only fires `input`) must be followed by an explicit
|
||||||
@@ -263,7 +263,7 @@ public class NotificationActionTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Notification Report')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Notification Report')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Narrow to the seeded row by its exact ListName marker (+ Parked status).
|
// Narrow to the seeded row by its exact ListName marker (+ Parked status).
|
||||||
await page.Locator("#no-list").FillAsync(marker);
|
await page.Locator("#no-list").FillAsync(marker);
|
||||||
@@ -341,7 +341,7 @@ public class NotificationActionTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Notification Report')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Notification Report')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Narrow to the pair by the exact ListName marker (commit the @bind value with a
|
// Narrow to the pair by the exact ListName marker (commit the @bind value with a
|
||||||
// change dispatch — FillAsync only fires `input`), then Query.
|
// change dispatch — FillAsync only fires `input`), then Query.
|
||||||
@@ -416,7 +416,7 @@ public class NotificationActionTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{NotificationReportUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Notification Report')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Notification Report')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
await page.Locator("#no-list").FillAsync(marker);
|
await page.Locator("#no-list").FillAsync(marker);
|
||||||
await page.Locator("#no-list").DispatchEventAsync("change");
|
await page.Locator("#no-list").DispatchEventAsync("change");
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ public class NotificationKpisTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{KpisUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{KpisUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Notification KPIs')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Notification KPIs')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
var tilesOk = await page.Locator("small.text-muted:has-text('Queue Depth')").IsVisibleAsync()
|
var tilesOk = await page.Locator("small.text-muted:has-text('Queue Depth')").IsVisibleAsync()
|
||||||
&& await page.Locator("small.text-muted:has-text('Oldest Pending Age')").IsVisibleAsync();
|
&& await page.Locator("small.text-muted:has-text('Oldest Pending Age')").IsVisibleAsync();
|
||||||
|
|||||||
+2
-2
@@ -52,7 +52,7 @@ public class NotificationListCrudTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ListsUrl}/create");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ListsUrl}/create");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Add Notification List')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Add Notification List')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// The create form has exactly one input (the list name); recipients are edit-only.
|
// The create form has exactly one input (the list name); recipients are edit-only.
|
||||||
await page.Locator("input.form-control").First.FillAsync(name);
|
await page.Locator("input.form-control").First.FillAsync(name);
|
||||||
@@ -78,7 +78,7 @@ public class NotificationListCrudTests
|
|||||||
// loads the edit form's data); wait for it to settle before asserting the heading.
|
// loads the edit form's data); wait for it to settle before asserting the heading.
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Edit Notification List')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Edit Notification List')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// The edit page has TWO "Name" text inputs (list name + recipient name). Scope the
|
// The edit page has TWO "Name" text inputs (list name + recipient name). Scope the
|
||||||
// recipient form to the card that contains the email input to disambiguate.
|
// recipient form to the card that contains the email input to disambiguate.
|
||||||
|
|||||||
+4
-4
@@ -91,7 +91,7 @@ public class SmsNotificationE2ETests
|
|||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
// RENDER-CRASH GATE: the heading only appears if the new page's circuit rendered cleanly.
|
// RENDER-CRASH GATE: the heading only appears if the new page's circuit rendered cleanly.
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('SMS Configuration')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('SMS Configuration')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
if (!alreadyExists)
|
if (!alreadyExists)
|
||||||
{
|
{
|
||||||
@@ -160,7 +160,7 @@ public class SmsNotificationE2ETests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ListsUrl}/create");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ListsUrl}/create");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Add Notification List')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Add Notification List')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// The create form has the list-name text input and the Type <select>. The select's
|
// The create form has the list-name text input and the Type <select>. The select's
|
||||||
// option values are the NotificationType enum names ("Email"/"Sms"); select by value.
|
// option values are the NotificationType enum names ("Email"/"Sms"); select by value.
|
||||||
@@ -182,7 +182,7 @@ public class SmsNotificationE2ETests
|
|||||||
|
|
||||||
// Blazor enhanced navigation (SignalR round-trip) loads the edit form's data.
|
// Blazor enhanced navigation (SignalR round-trip) loads the edit form's data.
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Edit Notification List')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Edit Notification List')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// CHANNEL-AWARE ASSERTION: SMS list → phone input present, email input absent.
|
// CHANNEL-AWARE ASSERTION: SMS list → phone input present, email input absent.
|
||||||
await Assertions.Expect(page.Locator("input[type=tel].form-control")).ToBeVisibleAsync(new() { Timeout = 10_000 });
|
await Assertions.Expect(page.Locator("input[type=tel].form-control")).ToBeVisibleAsync(new() { Timeout = 10_000 });
|
||||||
@@ -226,7 +226,7 @@ public class SmsNotificationE2ETests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ListsUrl}/create");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{ListsUrl}/create");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Add Notification List')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Add Notification List')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
await page.Locator("input[type=text].form-control").First.FillAsync(name);
|
await page.Locator("input[type=text].form-control").First.FillAsync(name);
|
||||||
await page.Locator("select.form-select").SelectOptionAsync(new SelectOptionValue { Value = "Sms" });
|
await page.Locator("select.form-select").SelectOptionAsync(new SelectOptionValue { Value = "Sms" });
|
||||||
|
|||||||
+4
-4
@@ -63,7 +63,7 @@ public class SmtpConfigTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{SmtpUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{SmtpUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Open the form. Prefer the empty-state Add button (Host starts empty); otherwise
|
// Open the form. Prefer the empty-state Add button (Host starts empty); otherwise
|
||||||
// edit the first existing card (Host pre-filled — we clear it below).
|
// edit the first existing card (Host pre-filled — we clear it below).
|
||||||
@@ -90,7 +90,7 @@ public class SmtpConfigTests
|
|||||||
// Cancel and confirm the form closed (Save button gone). Leaves config exactly as found.
|
// Cancel and confirm the form closed (Save button gone). Leaves config exactly as found.
|
||||||
await page.Locator("button.btn-outline-secondary:has-text('Cancel')").ClickAsync();
|
await page.Locator("button.btn-outline-secondary:has-text('Cancel')").ClickAsync();
|
||||||
await Assertions.Expect(page.Locator("button.btn-success:has-text('Save')")).ToHaveCountAsync(0);
|
await Assertions.Expect(page.Locator("button.btn-success:has-text('Save')")).ToHaveCountAsync(0);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -108,7 +108,7 @@ public class SmtpConfigTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{SmtpUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{SmtpUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Web-first: assert the page resolved to EITHER a config card (Credentials '(stored)' /
|
// Web-first: assert the page resolved to EITHER a config card (Credentials '(stored)' /
|
||||||
// '(not set)') OR the empty-state, with retry so a slow Blazor init does not spuriously
|
// '(not set)') OR the empty-state, with retry so a slow Blazor init does not spuriously
|
||||||
@@ -154,7 +154,7 @@ public class SmtpConfigTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{SmtpUrl}");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}{SmtpUrl}");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('SMTP Configuration')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// Open the first card's Edit form. StartEdit reloads EVERY field (including the stored
|
// Open the first card's Edit form. StartEdit reloads EVERY field (including the stored
|
||||||
// credential, _credentials = smtp.Credentials), so re-saving untouched rewrites the
|
// credential, _credentials = smtp.Credentials), so re-saving untouched rewrites the
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class PendingUpdatesTests
|
|||||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/admin/sites");
|
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/admin/sites");
|
||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Site Management')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Site Management')")).ToBeVisibleAsync();
|
||||||
|
|
||||||
// One card per site; the badge hangs off the card's site-identifier line, so there must be
|
// One card per site; the badge hangs off the card's site-identifier line, so there must be
|
||||||
// at least as many badges as cards.
|
// at least as many badges as cards.
|
||||||
|
|||||||
+1
-1
@@ -99,7 +99,7 @@ public class SiteCallsPageTests
|
|||||||
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
await page.WaitForLoadStateAsync(LoadState.NetworkIdle);
|
||||||
|
|
||||||
Assert.Contains(SiteCallsUrl, page.Url);
|
Assert.Contains(SiteCallsUrl, page.Url);
|
||||||
await Assertions.Expect(page.Locator("h4:has-text('Site Calls')")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("h1:has-text('Site Calls')")).ToBeVisibleAsync();
|
||||||
// The filter card's Query button is the page's primary action.
|
// The filter card's Query button is the page's primary action.
|
||||||
await Assertions.Expect(page.Locator("[data-test='site-calls-query']")).ToBeVisibleAsync();
|
await Assertions.Expect(page.Locator("[data-test='site-calls-query']")).ToBeVisibleAsync();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class SiteCrudTests
|
|||||||
|
|
||||||
// Sites.razor renders the management page as a heading plus site cards
|
// Sites.razor renders the management page as a heading plus site cards
|
||||||
// (not an HTML table) and an always-present "Add Site" action.
|
// (not an HTML table) and an always-present "Add Site" action.
|
||||||
await Expect(page.Locator("h4:has-text('Site Management')")).ToBeVisibleAsync();
|
await Expect(page.Locator("h1:has-text('Site Management')")).ToBeVisibleAsync();
|
||||||
await Expect(page.Locator("button:has-text('Add Site')")).ToBeVisibleAsync();
|
await Expect(page.Locator("button:has-text('Add Site')")).ToBeVisibleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ public class SiteCrudTests
|
|||||||
await page.ClickAsync("button:has-text('Back')");
|
await page.ClickAsync("button:has-text('Back')");
|
||||||
|
|
||||||
await PlaywrightFixture.WaitForPathAsync(page, "/admin/sites", excludePath: "/create");
|
await PlaywrightFixture.WaitForPathAsync(page, "/admin/sites", excludePath: "/create");
|
||||||
await Expect(page.Locator("h4:has-text('Site Management')")).ToBeVisibleAsync();
|
await Expect(page.Locator("h1:has-text('Site Management')")).ToBeVisibleAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Verifies that the cancel button on the create page returns to the site list.</summary>
|
/// <summary>Verifies that the cancel button on the create page returns to the site list.</summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user