Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(types): toHaveAttribute had its signature backwards (#8314)

Joel Einbinder5357b2f28054
diff --git a/types/testExpect.d.ts b/types/testExpect.d.ts
index 5dbd04d0c0..3003447e10 100644
--- a/types/testExpect.d.ts
+++ b/types/testExpect.d.ts
@@ -117,7 +117,7 @@ declare global {
/**
* Asserts element's attributes `name` matches expected value.
*/
- toHaveAttribute(expected: string | RegExp, name: string, options?: { timeout?: number }): Promise<R>;
+ toHaveAttribute(name: string, expected: string | RegExp, options?: { timeout?: number }): Promise<R>;
/**
* Asserts that DOM node has a given CSS class.