From 0f125a91f70d6b42ec424bd5823ed68d50180650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Sat, 28 Mar 2026 15:21:35 -0300 Subject: [PATCH] Fix elementhandle-misc.spec.ts headful test failures The ShouldUncheckTheBox test was missing the `checked` attribute on the input element, diverging from upstream. Without it, Playwright's uncheck is a no-op on an already-unchecked checkbox, but in headful mode the click-based uncheck path could hang waiting for state change. Update the test HTML to match upstream (``) and remove the overly-broad headful expected-failure entry. Closes #113 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../TestExpectations/TestExpectations.local.json | 6 ------ src/PlaywrightSharp.Tests/ElementHandleMiscTests.cs | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/PlaywrightSharp.Nunit/TestExpectations/TestExpectations.local.json b/src/PlaywrightSharp.Nunit/TestExpectations/TestExpectations.local.json index 42a60d767..d4cc8f922 100644 --- a/src/PlaywrightSharp.Nunit/TestExpectations/TestExpectations.local.json +++ b/src/PlaywrightSharp.Nunit/TestExpectations/TestExpectations.local.json @@ -161,12 +161,6 @@ "parameters": ["headful"], "expectations": ["FAIL"] }, - { - "testIdPattern": "[elementhandle-misc.spec.ts] *", - "platforms": ["darwin", "linux", "win32"], - "parameters": ["headful"], - "expectations": ["FAIL"] - }, { "testIdPattern": "[elementhandle-owner-frame.spec.ts] *", "platforms": ["darwin", "linux", "win32"], diff --git a/src/PlaywrightSharp.Tests/ElementHandleMiscTests.cs b/src/PlaywrightSharp.Tests/ElementHandleMiscTests.cs index 90b812c9d..e6ed49378 100644 --- a/src/PlaywrightSharp.Tests/ElementHandleMiscTests.cs +++ b/src/PlaywrightSharp.Tests/ElementHandleMiscTests.cs @@ -63,7 +63,7 @@ public async Task ShouldCheckTheBox() [Test, Timeout(TestConstants.DefaultTestTimeout)] public async Task ShouldUncheckTheBox() { - await Page.SetContentAsync(""); + await Page.SetContentAsync(""); var input = await Page.QuerySelectorAsync("input"); await input.UncheckAsync(); Assert.That(await Page.EvaluateAsync("() => checkbox.checked"), Is.False);