Skip to content

Commit ef8f805

Browse files
committed
chore(release v1.22.1): remove optional attributeName from getLocatorByTestId, update dependencies
1 parent 42d1ccb commit ef8f805

4 files changed

Lines changed: 72 additions & 64 deletions

File tree

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [1.22.1] - 2026-02-09
4+
5+
### Breaking changes
6+
7+
- **`getLocatorByTestId` (locator-utils) update:** The optional `attributeName` parameter has been removed. The method now always uses Playwright’s default test id attribute (configured in `playwright.config.ts`). If you relied on a custom attribute name by passing attributeName, replace it with an alternate Playwright locator or use a CSS selector (e.g.
8+
`[data-testid="id"]`) or XPath as needed.
9+
10+
### Updated Dependencies
11+
12+
- Updated `@typescript-eslint/eslint-plugin` and`@typescript-eslint/parser` from `^8.54.0` to `^8.55.0`.
13+
314
## [1.22.0] - 2026-02-09
415

516
### Release

package-lock.json

Lines changed: 56 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vasu-playwright-utils",
3-
"version": "1.22.0",
3+
"version": "1.22.1",
44
"description": "Playwright Typescript Library with reusable utilities",
55
"main": "./dist/src/vasu-playwright-lib/index.js",
66
"types": "./dist/src/vasu-playwright-lib/index.d.ts",
@@ -48,8 +48,8 @@
4848
"dependencies": {
4949
"@eslint/js": "^9.39.2",
5050
"@types/node": "^25.2.2",
51-
"@typescript-eslint/eslint-plugin": "^8.54.0",
52-
"@typescript-eslint/parser": "^8.54.0",
51+
"@typescript-eslint/eslint-plugin": "^8.55.0",
52+
"@typescript-eslint/parser": "^8.55.0",
5353
"cross-env": "^10.1.0",
5454
"dotenv": "^17.2.4",
5555
"eslint": "^9.39.2",

src/vasu-playwright-lib/utils/locator-utils.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* These utilities make it easier to interact with elements on the page, providing a layer of abstraction over Playwright's built-in locator methods.
44
*/
55

6-
import { Frame, FrameLocator, Locator, selectors } from '@playwright/test';
6+
import { Frame, FrameLocator, Locator } from '@playwright/test';
77
import { getPage } from './page-utils';
88
import {
99
FrameOptions,
@@ -54,10 +54,7 @@ export function getVisibleLocator(input: string | Locator, options?: LocatorOpti
5454
* @param {string} [attributeName] - Optional attribute name for the testId. If provided, this will override the default 'testId' attribute value set in the playwright.config.ts file only for this instance.
5555
* @returns {Locator} - The created Locator object.
5656
*/
57-
export function getLocatorByTestId(testId: string | RegExp, attributeName?: string): Locator {
58-
if (attributeName) {
59-
selectors.setTestIdAttribute(attributeName);
60-
}
57+
export function getLocatorByTestId(testId: string | RegExp): Locator {
6158
return getPage().getByTestId(testId);
6259
}
6360

0 commit comments

Comments
 (0)