@atomic-testing/playwright 0.50.0 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ # @atomic-testing/playwright
2
+
1
3
  [![NPM version](https://img.shields.io/npm/v/@atomic-testing/playwright.svg?style=flat)](https://www.npmjs.com/package/@atomic-testing/playwright) ![NPM license](https://img.shields.io/npm/l/@atomic-testing/playwright.svg?style=flat)
2
4
 
3
- # @atomic-testing/playwright
5
+ Playwright integration for atomic-testing.
6
+
7
+ Learn more at [https://atomic-testing.dev/](https://atomic-testing.dev/)
@@ -27,17 +27,15 @@ function playwrightGetTestEngine(scenePart, fixture) {
27
27
  }
28
28
  exports.playWrightTestFrameworkMapper = {
29
29
  assertEqual: (a, b) => (0, test_1.expect)(a).toEqual(b),
30
- // @ts-ignore
30
+ // @ts-expect-error - expect type is not compatible with the type of the test framework
31
31
  describe: test_1.test.describe,
32
- /* eslint-disable @typescript-eslint/unbound-method */
33
32
  beforeEach: test_1.test.beforeEach,
34
33
  afterEach: test_1.test.afterEach,
35
34
  beforeAll: test_1.test.beforeAll,
36
35
  afterAll: test_1.test.afterAll,
37
- /* eslint-enable @typescript-eslint/unbound-method */
38
- // @ts-ignore
36
+ // @ts-expect-error - expect type is not compatible with the type of the test framework
39
37
  test: test_1.test,
40
- // @ts-ignore
38
+ // @ts-expect-error - expect type is not compatible with the type of the test framework
41
39
  it: test_1.test,
42
40
  };
43
41
  function getTestRunnerInterface() {
@@ -1 +1 @@
1
- {"version":3,"file":"testRunnerAdapter.js","sourceRoot":"","sources":["../src/testRunnerAdapter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAQA,oBAGC;AAED,0DAMC;AAqBD,wDAKC;AA3CD,2CAAsD;AAEtD,yDAAsD;AAItD,SAAsB,IAAI,CAAC,GAAW,EAAE,OAAsC;;QAC5E,MAAM,IAAI,GAAG,OAAQ,CAAC,IAAY,CAAC;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O,IAAA,mCAAgB,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC3C,CAAC;AAEY,QAAA,6BAA6B,GAAwB;IAChE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,IAAA,aAAM,EAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3C,uFAAuF;IACvF,QAAQ,EAAE,WAAI,CAAC,QAAQ;IAEvB,UAAU,EAAE,WAAI,CAAC,UAAU;IAC3B,SAAS,EAAE,WAAI,CAAC,SAAS;IACzB,SAAS,EAAE,WAAI,CAAC,SAAS;IACzB,QAAQ,EAAE,WAAI,CAAC,QAAQ;IAEvB,uFAAuF;IACvF,IAAI,EAAE,WAAI;IAEV,uFAAuF;IACvF,EAAE,EAAE,WAAI;CACT,CAAC;AAEF,SAAgB,sBAAsB;IACpC,OAAO;QACL,aAAa,EAAE,uBAAuB;QACtC,IAAI;KACL,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atomic-testing/playwright",
3
- "version": "0.50.0",
3
+ "version": "0.51.0",
4
4
  "description": "Atomic Testing Playwright Adapter",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,12 +17,12 @@
17
17
  "directory": "packages/playwright"
18
18
  },
19
19
  "dependencies": {
20
- "@atomic-testing/core": "0.50.0",
21
- "@atomic-testing/test-runner": "0.50.0"
20
+ "@atomic-testing/test-runner": "0.51.0",
21
+ "@atomic-testing/core": "0.51.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@playwright/test": "^1.51.0",
25
- "@types/node": "^22.13.9",
25
+ "@types/node": "^22.13.10",
26
26
  "jest": "^29.7.0",
27
27
  "typescript": "^5.8.2"
28
28
  },
@@ -85,7 +85,7 @@ export class PlaywrightInteractor implements Interactor {
85
85
  const result = dateUtil.validateHtmlDateInput(type, text);
86
86
  if (!result.valid) {
87
87
  throw new Error(
88
- `Invalid date format for type: ${type}, expected format: ${result.format}, example: ${result.example}`,
88
+ `Invalid date format for type: ${type}, expected format: ${result.format}, example: ${result.example}`
89
89
  );
90
90
  }
91
91
  }
@@ -157,7 +157,7 @@ export class PlaywrightInteractor implements Interactor {
157
157
 
158
158
  async waitUntilComponentState(
159
159
  locator: PartLocator,
160
- option: Partial<Readonly<WaitForOption>> = defaultWaitForOption,
160
+ option: Partial<Readonly<WaitForOption>> = defaultWaitForOption
161
161
  ): Promise<void> {
162
162
  return interactorUtil.interactorWaitUtil(locator, this, option);
163
163
  }
@@ -166,7 +166,7 @@ export class PlaywrightInteractor implements Interactor {
166
166
  probeFn: () => Promise<T> | T,
167
167
  terminateCondition: T | ((currentValue: T) => boolean),
168
168
  timeoutMs: number,
169
- debug: boolean = false,
169
+ debug: boolean = false
170
170
  ): Promise<T> {
171
171
  return timingUtil.waitUntil(probeFn, terminateCondition, timeoutMs, debug);
172
172
  }
@@ -178,7 +178,7 @@ export class PlaywrightInteractor implements Interactor {
178
178
  async getAttribute(
179
179
  locator: PartLocator,
180
180
  name: string,
181
- isMultiple?: boolean,
181
+ isMultiple?: boolean
182
182
  ): Promise<Optional<string> | readonly string[]> {
183
183
  const cssLocator = await locatorUtil.toCssSelector(locator, this);
184
184
  const elLocator = this.page.locator(cssLocator);
@@ -235,7 +235,7 @@ export class PlaywrightInteractor implements Interactor {
235
235
  async function checkCssVisibility(
236
236
  prop: CssProperty,
237
237
  invisibleValue: string,
238
- interactor: PlaywrightInteractor,
238
+ interactor: PlaywrightInteractor
239
239
  ): Promise<boolean> {
240
240
  try {
241
241
  const value = await interactor.getStyleValue(locator, prop);
@@ -13,7 +13,7 @@ export async function goto(url: string, fixture?: E2eTestRunEnvironmentFixture):
13
13
 
14
14
  export function playwrightGetTestEngine<T extends ScenePart>(
15
15
  scenePart: T,
16
- fixture: E2eTestRunEnvironmentFixture,
16
+ fixture: E2eTestRunEnvironmentFixture
17
17
  ): TestEngine<T> {
18
18
  const page = fixture.page as Page;
19
19
  return createTestEngine(page, scenePart);
@@ -21,20 +21,18 @@ export function playwrightGetTestEngine<T extends ScenePart>(
21
21
 
22
22
  export const playWrightTestFrameworkMapper: TestFrameworkMapper = {
23
23
  assertEqual: (a, b) => expect(a).toEqual(b),
24
- // @ts-ignore
24
+ // @ts-expect-error - expect type is not compatible with the type of the test framework
25
25
  describe: test.describe,
26
26
 
27
- /* eslint-disable @typescript-eslint/unbound-method */
28
27
  beforeEach: test.beforeEach,
29
28
  afterEach: test.afterEach,
30
29
  beforeAll: test.beforeAll,
31
30
  afterAll: test.afterAll,
32
- /* eslint-enable @typescript-eslint/unbound-method */
33
31
 
34
- // @ts-ignore
32
+ // @ts-expect-error - expect type is not compatible with the type of the test framework
35
33
  test: test,
36
34
 
37
- // @ts-ignore
35
+ // @ts-expect-error - expect type is not compatible with the type of the test framework
38
36
  it: test,
39
37
  };
40
38