Fix elementhandle-convenience.spec.ts headful test failures#153
Open
Fix elementhandle-convenience.spec.ts headful test failures#153
Conversation
Align ElementHandleConvenienceTests with upstream Playwright to fix headful-mode failures: - Move 4 "should be atomic" tests to SelectorsRegisterTests where they belong in upstream (selectors-register.spec.ts), removing the stale create() method from selector engine definitions - Fix InnerTextShouldThrow: assert exception2.Message instead of exception1.Message (copy-paste bug) - Fix TextContentShouldWork: use #inner selector matching upstream - Fix PlaywrightTest attribute: remove erroneous leading quote in "'innerText should throw" - Add missing null-return assertions in GetAttributeShouldWork - Add missing no-such-element assertions in IsVisibleAndIsHiddenShouldWork - Remove elementhandle-convenience.spec.ts headful expected-failure entry Closes #111 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ElementHandleConvenienceTeststoSelectorsRegisterTests, matching upstream'sselectors-register.spec.ts(these tests were misplaced and used stalecreate()methods not present in upstream)InnerTextShouldThrowassertion bug: was checkingexception1.Messageinstead ofexception2.MessageTextContentShouldWorkselector to use#innermatching upstream (was#outer)PlaywrightTestattribute typo:"'innerText should throw"->"innerText should throw"GetAttributeAsync("foo")returning null, andIsVisibleAsync/IsHiddenAsyncfor non-existent elements[elementhandle-convenience.spec.ts] *headful expected-failure entry fromTestExpectations.local.jsonCloses #111
Test plan
dotnet build ./src/PlaywrightSharp.slnsucceeds (confirmed locally)🤖 Generated with Claude Code