test(playwright): fix stale selectors after UI refactor (h1 headings, collapsed Topology/Audit disclosures, ParameterValueForm ids, method-select race)
This commit is contained in:
@@ -33,7 +33,7 @@ public class ApiMethodFormTests
|
||||
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/api-methods/create");
|
||||
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
|
||||
// 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();
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
||||
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.
|
||||
// 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();
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
||||
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')");
|
||||
await Assertions.Expect(addButton).ToBeDisabledAsync();
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class ExternalSystemCrudTests
|
||||
// ── CREATE ────────────────────────────────────────────────────────────────
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/external-systems/create");
|
||||
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
|
||||
// (Name, Endpoint URL, and Auth Config JSON), so index-based selection is
|
||||
|
||||
@@ -55,7 +55,7 @@ public class M9SurfaceTests
|
||||
var page = await _pw.NewAuthenticatedPageAsync();
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/templates");
|
||||
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.
|
||||
await Assertions.Expect(page.Locator("span.tv-label", new() { HasText = matchName }))
|
||||
@@ -111,7 +111,7 @@ public class M9SurfaceTests
|
||||
|
||||
// ── RENDER-SMOKE ──────────────────────────────────────────────────────────────
|
||||
// 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')");
|
||||
|
||||
// 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();
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/connections");
|
||||
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.
|
||||
var bulkDropdown = page.Locator(".dropdown")
|
||||
|
||||
+2
-2
@@ -37,7 +37,7 @@ public class SharedScriptCrudTests
|
||||
var page = await _pw.NewAuthenticatedPageAsync();
|
||||
await page.GotoAsync($"{PlaywrightFixture.BaseUrl}/design/shared-scripts");
|
||||
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.
|
||||
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.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");
|
||||
await Assertions.Expect(nameInput).ToBeVisibleAsync();
|
||||
|
||||
Reference in New Issue
Block a user