test(settings): wait for the .NET SDK list instead of the unpinned placeholder (#8295)

The .NET settings test waited for the SDK combo to read Not pinned, the placeholder shown before sdkDotnetStatus answers, so it read the SDK list whenever the answer happened to have rendered. It now waits for the list and checks the placeholder after.

Co-authored-by: audichuang <[email protected]>
Цей коміт міститься в:
audichuang authored and GitHub committed 2026-12-06 05:28:46 +08:00
1 джерело e811d633b9
коміт febbff46bd
1 file changed
+2 -2
+2 -2
Переглянути файл
@@ -52,12 +52,12 @@ afterEach(() => {
describe(".NET settings page", () => {
it("shows the SDK in use, every installed one, and offers each version once", async () => {
page({});
await waitFor(() => expect(combo()).toHaveTextContent("Not pinned"));
expect(screen.getAllByRole("listitem").map((item) => item.textContent)).toEqual([
expect((await screen.findAllByRole("listitem")).map((item) => item.textContent)).toEqual([
"11.0.100-rc.1.26425.101 · /usr/local/share/dotnet/sdk",
"10.0.401 · /usr/local/share/dotnet/sdk",
"10.0.401 · /work/app/.dotnet/sdk",
]);
expect(combo()).toHaveTextContent("Not pinned");
expect(alerts()).toEqual([]);
fireEvent.click(combo());
expect(await screen.findAllByRole("option")).toHaveLength(2);