Skip to content

Commit d74257e

Browse files
csharpfritzCopilot
andcommitted
fix: correct Playwright test locators for WebFormsFormTests
The test locators were matching the always-visible migration guidance card instead of the actual results card. Updated to use the exact data-audit-control attribute 'webforms-form-results'. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 498c497 commit d74257e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

samples/AfterBlazorServerSide.Tests/Migration/WebFormsFormTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public async Task WebFormsForm_InitialLoad_ShowsFormWithoutResults()
8888
await Assertions.Expect(submitButton).ToBeVisibleAsync();
8989

9090
// Results section should NOT be visible before submission
91-
var results = page.Locator("[data-audit-control='form-results'], .results-section, .card:has-text('Request.Form')").First;
91+
var results = page.Locator("[data-audit-control='webforms-form-results']").First;
9292
await Assertions.Expect(results).Not.ToBeVisibleAsync(new() { Timeout = 3000 });
9393
}
9494
finally
@@ -134,7 +134,7 @@ public async Task WebFormsForm_SubmitForm_ShowsRequestFormValues()
134134
await submitButton.ClickAsync();
135135

136136
// Wait for re-render — the results section should appear after SignalR round-trip
137-
var resultsLocator = page.Locator("text=Request.Form").First;
137+
var resultsLocator = page.Locator("[data-audit-control='webforms-form-results']").First;
138138
await resultsLocator.WaitForAsync(new() { State = WaitForSelectorState.Visible, Timeout = 10000 });
139139

140140
// Verify submitted name value appears in results

0 commit comments

Comments
 (0)