Skip to content

feat: expect(locator).toHaveAttribute to assert attribute presence#16767

Merged
aslushnikov merged 3 commits into
microsoft:mainfrom
aslushnikov:optional-to-have-attribute
Aug 25, 2022
Merged

feat: expect(locator).toHaveAttribute to assert attribute presence#16767
aslushnikov merged 3 commits into
microsoft:mainfrom
aslushnikov:optional-to-have-attribute

Conversation

@aslushnikov
Copy link
Copy Markdown
Contributor

This patch changes expect(locator).toHaveAttribute() so that the
value argument can be omitted. When done so, the method will
assert attribute existance.

Fixes #16517

This patch changes `expect(locator).toHaveAttribute()` so that the
`value` argument can be omitted. When done so, the method will
assert attribute existance.

Fixes microsoft#16517
Comment thread docs/src/api/class-locatorassertions.md
@aslushnikov aslushnikov merged commit 622c73c into microsoft:main Aug 25, 2022
@aslushnikov aslushnikov deleted the optional-to-have-attribute branch August 25, 2022 12:28
rwoll added a commit to rwoll/playwright that referenced this pull request Sep 16, 2022
Revert "docs(python): add missing NotToHaveAttribute overloads (microsoft#17371)"

This reverts commit 2e1ea29.

Revert "docs(release-notes): add 1.26 release notes for language ports (microsoft#17345)"

This reverts commit 4b8a85e.

Revert "test: unflake "should support boolean attribute with options" (microsoft#17024)"

This reverts commit 1dc05bd.

Revert "fix: support toHaveAttribute(name, options) (microsoft#16941)"

This reverts commit f30ac1d.

Revert "feat: expect(locator).toHaveAttribute to assert attribute presence (microsoft#16767)"

This reverts commit 622c73c.
rwoll added a commit that referenced this pull request Sep 16, 2022
Relates #16517.

Revert "docs(python): add missing NotToHaveAttribute overloads (#17371)"

This reverts commit 2e1ea29.

Revert "docs(release-notes): add 1.26 release notes for language ports
(#17345)"

This reverts commit 4b8a85e.

Revert "test: unflake "should support boolean attribute with options"
(#17024)"

This reverts commit 1dc05bd.

Revert "fix: support toHaveAttribute(name, options) (#16941)"

This reverts commit f30ac1d.

Revert "feat: expect(locator).toHaveAttribute to assert attribute
presence (#16767)"

This reverts commit 622c73c.
aslushnikov added a commit that referenced this pull request Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] toHaveAttribute always passes when given a blank value string

2 participants