@o3r/testing 13.0.0-prerelease.2 → 13.0.0-prerelease.3

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/collection.json CHANGED
@@ -8,13 +8,15 @@
8
8
  "aliases": ["install", "i"]
9
9
  },
10
10
  "playwright-scenario": {
11
- "description": "[o3r] Generate a Playwright scenario into the project.",
11
+ "hidden": true,
12
+ "description": "[Deprecated - Removed in v14] Generate a Playwright scenario into the project.",
12
13
  "factory": "./schematics/playwright/scenario/index#ngGeneratePlaywrightScenario",
13
14
  "schema": "./schematics/playwright/scenario/schema.json",
14
15
  "aliases": ["o3r-playwright-scenario"]
15
16
  },
16
17
  "playwright-sanity": {
17
- "description": "[o3r] Generate a Playwright sanity into the project.",
18
+ "hidden": true,
19
+ "description": "[Deprecated - Removed in v14] Generate a Playwright sanity into the project.",
18
20
  "factory": "./schematics/playwright/sanity/index#ngGeneratePlaywrightSanity",
19
21
  "schema": "./schematics/playwright/sanity/schema.json",
20
22
  "aliases": ["o3r-playwright-sanity"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/testing",
3
- "version": "13.0.0-prerelease.2",
3
+ "version": "13.0.0-prerelease.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -100,9 +100,9 @@
100
100
  "@material/slider": "^14.0.0",
101
101
  "@ngrx/store": "^20.0.0",
102
102
  "@ngx-translate/core": "^15.0.0 || ~16.0.4",
103
- "@o3r/core": "^13.0.0-prerelease.2",
104
- "@o3r/localization": "^13.0.0-prerelease.2",
105
- "@o3r/schematics": "^13.0.0-prerelease.2",
103
+ "@o3r/core": "^13.0.0-prerelease.3",
104
+ "@o3r/localization": "^13.0.0-prerelease.3",
105
+ "@o3r/schematics": "^13.0.0-prerelease.3",
106
106
  "@playwright/test": "^1.49.0",
107
107
  "@schematics/angular": "^20.0.0",
108
108
  "pixelmatch": "^7.0.0",
@@ -167,7 +167,7 @@
167
167
  }
168
168
  },
169
169
  "dependencies": {
170
- "@o3r/schematics": "^13.0.0-prerelease.2",
170
+ "@o3r/schematics": "^13.0.0-prerelease.3",
171
171
  "esbuild": "~0.25.1",
172
172
  "module-from-string": "^3.2.0",
173
173
  "tslib": "^2.6.2"
@@ -194,12 +194,12 @@
194
194
  "@ngx-translate/core": "~16.0.4",
195
195
  "@nx/eslint-plugin": "~21.3.11",
196
196
  "@nx/jest": "~21.3.11",
197
- "@o3r/build-helpers": "^13.0.0-prerelease.2",
198
- "@o3r/core": "^13.0.0-prerelease.2",
199
- "@o3r/eslint-plugin": "^13.0.0-prerelease.2",
200
- "@o3r/localization": "^13.0.0-prerelease.2",
201
- "@o3r/test-helpers": "^13.0.0-prerelease.2",
202
- "@playwright/test": "~1.54.0",
197
+ "@o3r/build-helpers": "^13.0.0-prerelease.3",
198
+ "@o3r/core": "^13.0.0-prerelease.3",
199
+ "@o3r/eslint-plugin": "^13.0.0-prerelease.3",
200
+ "@o3r/localization": "^13.0.0-prerelease.3",
201
+ "@o3r/test-helpers": "^13.0.0-prerelease.3",
202
+ "@playwright/test": "~1.55.0",
203
203
  "@schematics/angular": "~20.0.0",
204
204
  "@stylistic/eslint-plugin": "~5.2.0",
205
205
  "@swc/helpers": "~0.5.0",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/playwright/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,IAAI,EAKL,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,eAAe,EAIpB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAWzB;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,IAAI,CA6ElH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-add/playwright/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,IAAI,EAKL,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,eAAe,EAIpB,mBAAmB,EACpB,MAAM,iBAAiB,CAAC;AAWzB;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,IAAI,CAoElH"}
@@ -52,25 +52,16 @@ test-results
52
52
  const packageJson = tree.readJson(packageJsonPath);
53
53
  packageJson.scripts ||= {};
54
54
  packageJson.scripts['test:playwright'] ||= 'playwright test --config=e2e-playwright/playwright-config.ts';
55
- packageJson.scripts['test:playwright:sanity'] ||= 'playwright test --config=e2e-playwright/playwright-config.sanity.ts';
56
55
  tree.overwrite(packageJsonPath, JSON.stringify(packageJson, null, 2));
57
56
  }
58
57
  // generate files
59
58
  if (!tree.exists(path.posix.join(workingDirectory, 'e2e-playwright', 'playwright-config.ts'))) {
60
- const name = 'my-scenario';
61
- const scenarioName = core_1.strings.capitalize(core_1.strings.camelize(name));
62
- const sanity = 'my-sanity';
63
- const sanityName = core_1.strings.capitalize(core_1.strings.camelize(sanity));
64
59
  const startCommand = `${(0, schematics_2.getPackageManager)()} run start`;
65
60
  const project = options?.projectName ? (0, schematics_2.getWorkspaceConfig)(tree)?.projects[options.projectName] : undefined;
66
61
  const serverPort = project?.architect?.serve?.options?.port || '4200';
67
62
  const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./playwright/templates'), [
68
63
  (0, schematics_1.template)({
69
64
  ...core_1.strings,
70
- name,
71
- scenarioName,
72
- sanity,
73
- sanityName,
74
65
  serverPort,
75
66
  startCommand
76
67
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../schematics/ng-add/playwright/index.ts"],"names":[],"mappings":";;AAsCA,4CA6EC;AAnHD,kCAAkC;AAClC,+CAE8B;AAC9B,2DAWoC;AACpC,gDAMyB;AAKzB,MAAM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SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,IAAI,MAAM,CAAC;YAEtE,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,wBAAwB,CAAC,EAAE;gBAC1D,IAAA,qBAAQ,EAAC;oBACP,GAAG,cAAO;oBACV,UAAU;oBACV,YAAY;iBACb,CAAC;gBACF,IAAA,gCAAmB,GAAE;gBACrB,IAAA,iBAAI,EAAC,gBAAgB,CAAC;aACvB,CAAC,CAAC;YAEH,OAAO,IAAA,sBAAS,EAAC,cAAc,EAAE,0BAAa,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3E,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { expect, test } from '@playwright/test';
2
+
3
+ test('Empty test', async ({ page }) => {
4
+ await page.goto('/');
5
+ await expect(page.locator('body')).toBeAttached();
6
+ });
@@ -9,15 +9,16 @@ const FIVE_MINUTES = 1_000 * 60 * 5;
9
9
  const reportsFolder = path.join(__dirname, '..', 'playwright-reports');
10
10
 
11
11
  const config = defineConfig({
12
- testDir: path.join(__dirname, '..', 'e2e-playwright'),
13
- testMatch: /.*\.e2e-playwright-spec.ts$/,
12
+ testDir: '.',
13
+ testMatch: /.*\.e2e\.ts$/,
14
+ forbidOnly: !!process.env.CI,
15
+ retries: process.env.CI ? 3 : 0,
16
+ workers: process.env.CI ? 1 : undefined,
14
17
  reporter: [
15
18
  ['list'],
16
19
  ['junit', {outputFile: path.join(reportsFolder, 'junit', 'reporter.xml')}],
17
20
  ['html', {open: 'never', outputFolder: path.join(reportsFolder, 'html')}]
18
21
  ],
19
- retries: process.env.CI ? 3 : 0,
20
- forbidOnly: !!process.env.CI,
21
22
  timeout: FIVE_MINUTES,
22
23
  use: {
23
24
  baseURL: process.env.PLAYWRIGHT_TARGET_URL || 'http://localhost:<%= serverPort %>/',
@@ -35,7 +35,8 @@ module.exports.getJestProjectConfig = (rootDir, isAngularSetup) => {
35
35
  ],
36
36
  testPathIgnorePatterns: [
37
37
  '<rootDir>/.*/templates/.*',
38
- '\\.it\\.spec\\.ts$'
38
+ '\\.it\\.spec\\.ts$',
39
+ '\\.e2e\\.spec\\.ts$'
39
40
  ],
40
41
  fakeTimers: {
41
42
  enableGlobally: true
@@ -7,5 +7,6 @@
7
7
  "composite": true,
8
8
  "esModuleInterop": true
9
9
  },
10
- "include": []
10
+ "include": [],
11
+ "exclude": ["**/*.e2e.spec.ts"]
11
12
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "ngGeneratePlaywrightSanitySchematicsSchema",
4
4
  "title": "Generate Playwright sanity",
5
- "description": "ng generate Playwright sanity",
5
+ "description": "[Deprecated - Removed in v14] ng generate Playwright sanity",
6
6
  "properties": {
7
7
  "projectName": {
8
8
  "type": "string",
@@ -2,7 +2,7 @@
2
2
  "$schema": "http://json-schema.org/draft-07/schema",
3
3
  "$id": "ngGeneratePlaywrightScenarioSchematicsSchema",
4
4
  "title": "Generate Playwright scenario",
5
- "description": "ng generate Playwright scenario",
5
+ "description": "[Deprecated - Removed in v14] ng generate Playwright scenario",
6
6
  "properties": {
7
7
  "projectName": {
8
8
  "type": "string",
@@ -1,12 +0,0 @@
1
- import { defineConfig } from '@playwright/test';
2
- import * as path from 'node:path';
3
-
4
- import {default as defaultConfig} from './playwright-config';
5
-
6
- const config = defineConfig({
7
- ...defaultConfig,
8
- testDir: path.join(__dirname, 'sanity'),
9
- testMatch: /.*\.e2e\.ts$/
10
- });
11
-
12
- export default config;
@@ -1,8 +0,0 @@
1
- import { expect, test } from '@playwright/test';
2
-
3
- test.describe('Empty <%= classify(sanityName) %> test', () => {
4
- test('Empty test', async ({ page }) => {
5
- await page.goto('/');
6
- await expect(page.locator('body')).toBeAttached();
7
- });
8
- });
@@ -1,20 +0,0 @@
1
- import { expect, test } from '@playwright/test';
2
- import { BaseScenario } from '../utils';
3
-
4
- export class <%= classify(scenarioName) %> extends BaseScenario {
5
- protected <%= camelize(scenarioName) %>() {
6
- test.describe('Empty <%= classify(scenarioName) %> tests', () => {
7
- test('Empty test', async ({ page }) => {
8
- await page.goto('/');
9
- await expect(page.locator('body')).toBeAttached();
10
- });
11
- });
12
- }
13
-
14
- /** @inheritDoc */
15
- public performFlow() {
16
- this.<%= camelize(scenarioName) %>();
17
- }
18
- }
19
-
20
- new <%= classify(scenarioName) %>().run();
@@ -1,27 +0,0 @@
1
- import { test } from '@playwright/test';
2
-
3
- /**
4
- * Interface to define the interface of a flow test
5
- */
6
- export interface Flow {
7
- /**
8
- * Run the flow
9
- */
10
- performFlow(): void;
11
- }
12
-
13
- /**
14
- * Base scenario for e2e scenarios.
15
- * Init the fetch manager and call `performFlow` method.
16
- * E2E Booking flows should inherit from this class.
17
- */
18
- export abstract class BaseScenario implements Flow {
19
-
20
- public abstract performFlow();
21
-
22
- public run() {
23
- test.describe.serial(this.constructor.name, () => {
24
- this.performFlow();
25
- });
26
- }
27
- }
@@ -1 +0,0 @@
1
- export * from './base-scenario';