@futdevpro/dynamo-e2e 1.8.0 → 1.10.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.
Files changed (139) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/CONTRIBUTING.md +90 -0
  3. package/README.md +2 -2
  4. package/bin/dye2e.js +21 -0
  5. package/build/_modules/cwv/_collections/cwv-diagnose.util.d.ts +37 -0
  6. package/build/_modules/cwv/_collections/cwv-diagnose.util.d.ts.map +1 -0
  7. package/build/_modules/cwv/_collections/cwv-diagnose.util.js +108 -0
  8. package/build/_modules/cwv/_collections/cwv-diagnose.util.js.map +1 -0
  9. package/build/_modules/cwv/_collections/cwv-emission.util.d.ts.map +1 -1
  10. package/build/_modules/cwv/_collections/cwv-emission.util.js +6 -1
  11. package/build/_modules/cwv/_collections/cwv-emission.util.js.map +1 -1
  12. package/build/_modules/cwv/cwv-diagnose.spec.d.ts +2 -0
  13. package/build/_modules/cwv/cwv-diagnose.spec.d.ts.map +1 -0
  14. package/build/_modules/cwv/cwv-diagnose.spec.js +78 -0
  15. package/build/_modules/cwv/cwv-diagnose.spec.js.map +1 -0
  16. package/build/_modules/cwv/cwv-suite.generator.d.ts.map +1 -1
  17. package/build/_modules/cwv/cwv-suite.generator.js +9 -1
  18. package/build/_modules/cwv/cwv-suite.generator.js.map +1 -1
  19. package/build/_modules/cwv/index.d.ts +1 -0
  20. package/build/_modules/cwv/index.d.ts.map +1 -1
  21. package/build/_modules/cwv/index.js +1 -0
  22. package/build/_modules/cwv/index.js.map +1 -1
  23. package/build/_modules/cwv/inp-emit-integration.spec.d.ts +2 -0
  24. package/build/_modules/cwv/inp-emit-integration.spec.d.ts.map +1 -0
  25. package/build/_modules/cwv/inp-emit-integration.spec.js +43 -0
  26. package/build/_modules/cwv/inp-emit-integration.spec.js.map +1 -0
  27. package/build/_modules/generators/_collections/cli-runner.util.d.ts +23 -0
  28. package/build/_modules/generators/_collections/cli-runner.util.d.ts.map +1 -1
  29. package/build/_modules/generators/_collections/cli-runner.util.js +57 -0
  30. package/build/_modules/generators/_collections/cli-runner.util.js.map +1 -1
  31. package/build/_modules/generators/doctor.spec.d.ts +2 -0
  32. package/build/_modules/generators/doctor.spec.d.ts.map +1 -0
  33. package/build/_modules/generators/doctor.spec.js +68 -0
  34. package/build/_modules/generators/doctor.spec.js.map +1 -0
  35. package/build/_modules/runtime/fixtures.d.ts +12 -0
  36. package/build/_modules/runtime/fixtures.d.ts.map +1 -1
  37. package/build/_modules/runtime/fixtures.js +16 -0
  38. package/build/_modules/runtime/fixtures.js.map +1 -1
  39. package/coverage/contracts/_collections/index.html +1 -1
  40. package/coverage/contracts/_collections/index.ts.html +1 -1
  41. package/coverage/contracts/_collections/utils/index.html +1 -1
  42. package/coverage/contracts/_collections/utils/test-id.util.ts.html +1 -1
  43. package/coverage/contracts/_enums/cwv-metric-type.enum.ts.html +1 -1
  44. package/coverage/contracts/_enums/field-test-case-type.enum.ts.html +1 -1
  45. package/coverage/contracts/_enums/index.html +1 -1
  46. package/coverage/contracts/_enums/index.ts.html +1 -1
  47. package/coverage/contracts/_enums/standard-viewport.enum.ts.html +1 -1
  48. package/coverage/contracts/_enums/test-expectation-type.enum.ts.html +1 -1
  49. package/coverage/contracts/_enums/test-run-mode-type.enum.ts.html +1 -1
  50. package/coverage/contracts/index.html +1 -1
  51. package/coverage/contracts/index.ts.html +1 -1
  52. package/coverage/cwv/_collections/cwv-aggregator.util.ts.html +1 -1
  53. package/coverage/cwv/_collections/cwv-diagnose.util.ts.html +553 -0
  54. package/coverage/cwv/_collections/cwv-emission.util.ts.html +103 -88
  55. package/coverage/cwv/_collections/index.html +25 -10
  56. package/coverage/cwv/_collections/inp-interaction-script.const.ts.html +1 -1
  57. package/coverage/cwv/_collections/web-vitals-page-script.const.ts.html +1 -1
  58. package/coverage/cwv/cwv-suite.generator.ts.html +61 -34
  59. package/coverage/cwv/index.html +7 -7
  60. package/coverage/generators/_collections/cli-runner.util.ts.html +219 -21
  61. package/coverage/generators/_collections/field-emission.util.ts.html +1 -1
  62. package/coverage/generators/_collections/form-level-emission.util.ts.html +1 -1
  63. package/coverage/generators/_collections/index.html +13 -13
  64. package/coverage/generators/_collections/spec-emission.util.ts.html +33 -33
  65. package/coverage/generators/_collections/test-case-filter.util.ts.html +1 -1
  66. package/coverage/generators/_collections/viewport-emission.util.ts.html +1 -1
  67. package/coverage/generators/form-suite.generator.ts.html +1 -1
  68. package/coverage/generators/index.html +1 -1
  69. package/coverage/generators/viewport-suite.generator.ts.html +1 -1
  70. package/coverage/index.html +29 -29
  71. package/coverage/lcov-report/contracts/_collections/index.html +1 -1
  72. package/coverage/lcov-report/contracts/_collections/index.ts.html +1 -1
  73. package/coverage/lcov-report/contracts/_collections/utils/index.html +1 -1
  74. package/coverage/lcov-report/contracts/_collections/utils/test-id.util.ts.html +1 -1
  75. package/coverage/lcov-report/contracts/_enums/cwv-metric-type.enum.ts.html +1 -1
  76. package/coverage/lcov-report/contracts/_enums/field-test-case-type.enum.ts.html +1 -1
  77. package/coverage/lcov-report/contracts/_enums/index.html +1 -1
  78. package/coverage/lcov-report/contracts/_enums/index.ts.html +1 -1
  79. package/coverage/lcov-report/contracts/_enums/standard-viewport.enum.ts.html +1 -1
  80. package/coverage/lcov-report/contracts/_enums/test-expectation-type.enum.ts.html +1 -1
  81. package/coverage/lcov-report/contracts/_enums/test-run-mode-type.enum.ts.html +1 -1
  82. package/coverage/lcov-report/contracts/index.html +1 -1
  83. package/coverage/lcov-report/contracts/index.ts.html +1 -1
  84. package/coverage/lcov-report/cwv/_collections/cwv-aggregator.util.ts.html +1 -1
  85. package/coverage/lcov-report/cwv/_collections/cwv-diagnose.util.ts.html +553 -0
  86. package/coverage/lcov-report/cwv/_collections/cwv-emission.util.ts.html +103 -88
  87. package/coverage/lcov-report/cwv/_collections/index.html +25 -10
  88. package/coverage/lcov-report/cwv/_collections/inp-interaction-script.const.ts.html +1 -1
  89. package/coverage/lcov-report/cwv/_collections/web-vitals-page-script.const.ts.html +1 -1
  90. package/coverage/lcov-report/cwv/cwv-suite.generator.ts.html +61 -34
  91. package/coverage/lcov-report/cwv/index.html +7 -7
  92. package/coverage/lcov-report/generators/_collections/cli-runner.util.ts.html +219 -21
  93. package/coverage/lcov-report/generators/_collections/field-emission.util.ts.html +1 -1
  94. package/coverage/lcov-report/generators/_collections/form-level-emission.util.ts.html +1 -1
  95. package/coverage/lcov-report/generators/_collections/index.html +13 -13
  96. package/coverage/lcov-report/generators/_collections/spec-emission.util.ts.html +33 -33
  97. package/coverage/lcov-report/generators/_collections/test-case-filter.util.ts.html +1 -1
  98. package/coverage/lcov-report/generators/_collections/viewport-emission.util.ts.html +1 -1
  99. package/coverage/lcov-report/generators/form-suite.generator.ts.html +1 -1
  100. package/coverage/lcov-report/generators/index.html +1 -1
  101. package/coverage/lcov-report/generators/viewport-suite.generator.ts.html +1 -1
  102. package/coverage/lcov-report/index.html +29 -29
  103. package/coverage/lcov-report/runtime/_collections/assertion-helpers.util.ts.html +1 -1
  104. package/coverage/lcov-report/runtime/_collections/index.html +1 -1
  105. package/coverage/lcov-report/runtime/_collections/unique-generator.util.ts.html +1 -1
  106. package/coverage/lcov-report/runtime/_collections/wait-helpers.util.ts.html +1 -1
  107. package/coverage/lcov-report/runtime/_services/dialog-page-object.ts.html +1 -1
  108. package/coverage/lcov-report/runtime/_services/field-page-object.ts.html +1 -1
  109. package/coverage/lcov-report/runtime/_services/form-page-object.ts.html +1 -1
  110. package/coverage/lcov-report/runtime/_services/index.html +1 -1
  111. package/coverage/lcov-report/runtime/_services/loader-page-object.ts.html +1 -1
  112. package/coverage/lcov-report/runtime/_services/logger.service.ts.html +1 -1
  113. package/coverage/lcov-report/runtime/_services/login-flow-helper.base.ts.html +1 -1
  114. package/coverage/lcov-report/runtime/_services/nav-page-object.ts.html +1 -1
  115. package/coverage/lcov-report/runtime/_services/toast-page-object.ts.html +1 -1
  116. package/coverage/lcov-report/runtime/_services/wave-2b-page-objects.ts.html +1 -1
  117. package/coverage/lcov-report/runtime/index.html +1 -1
  118. package/coverage/lcov-report/runtime/index.ts.html +1 -1
  119. package/coverage/lcov.info +566 -239
  120. package/coverage/runtime/_collections/assertion-helpers.util.ts.html +1 -1
  121. package/coverage/runtime/_collections/index.html +1 -1
  122. package/coverage/runtime/_collections/unique-generator.util.ts.html +1 -1
  123. package/coverage/runtime/_collections/wait-helpers.util.ts.html +1 -1
  124. package/coverage/runtime/_services/dialog-page-object.ts.html +1 -1
  125. package/coverage/runtime/_services/field-page-object.ts.html +1 -1
  126. package/coverage/runtime/_services/form-page-object.ts.html +1 -1
  127. package/coverage/runtime/_services/index.html +1 -1
  128. package/coverage/runtime/_services/loader-page-object.ts.html +1 -1
  129. package/coverage/runtime/_services/logger.service.ts.html +1 -1
  130. package/coverage/runtime/_services/login-flow-helper.base.ts.html +1 -1
  131. package/coverage/runtime/_services/nav-page-object.ts.html +1 -1
  132. package/coverage/runtime/_services/toast-page-object.ts.html +1 -1
  133. package/coverage/runtime/_services/wave-2b-page-objects.ts.html +1 -1
  134. package/coverage/runtime/index.html +1 -1
  135. package/coverage/runtime/index.ts.html +1 -1
  136. package/coverage/tmp/{coverage-212504-1781069698881-0.json → coverage-224932-1781071393426-0.json} +1 -1
  137. package/coverage/tmp/coverage-226960-1781071394780-0.json +1 -0
  138. package/package.json +1 -1
  139. package/coverage/tmp/coverage-78800-1781069699908-0.json +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,45 @@
3
3
  Minden release a `dynamo-e2e-foundation` HYPERPLAN MP-N ütemezést követi.
4
4
  Verzióformátum: `MM.mm.p` (két-számjegyes major-minor, Dynamo-konvenció).
5
5
 
6
+ ## [01.10.0] — 2026-06-10
7
+
8
+ ### Added (Wave-3 attribution diagnose + `dye2e doctor` CLI)
9
+ - `DyE2E_CWVDiagnose_Util` (`cwv/_collections/cwv-diagnose.util.ts`):
10
+ - `diagnoseMetric()` — per-metric p75 + threshold check + attribution-target
11
+ + optimalizálási suggestion (IMG/H1/DIV LCP, CLS-dimension, INP-long-tasks,
12
+ TTFB-caching, FCP-critical-CSS)
13
+ - `diagnoseAll()` — minden metric egyszerre
14
+ - `DyE2E_CWVDiagnose_Hint` interface (metric, p75, threshold, worstTarget,
15
+ summary, suggestion)
16
+ - **`dye2e doctor`** CLI parancs:
17
+ - `pwd` flag (default cwd)
18
+ - 5 check: @futdevpro/dynamo-e2e, @playwright/test, playwright.config,
19
+ e2e/tests dir, .dynamo/pipeline.cicd.config.json
20
+ - Per-check suggestion + exit 0 (all ✓) / 1 (suggestions present)
21
+ - `DyE2E_CliRunner_Util.doctorReport()` testable factory
22
+
23
+ ### Test
24
+ - 183/0 Jasmine zöld (167 előbb + 8 CWV diagnose + 8 CLI doctor)
25
+ - Coverage: 98.2% / 86.43% / 97.36% / 98.2%
26
+
27
+ ## [01.09.0] — 2026-06-10
28
+
29
+ ### Added (Wave-3 INP integration + Wave-2b fixture + CONTRIBUTING)
30
+ - `DyE2E_CWVSuite_Generator.emit()` Wave-3 INP integration:
31
+ - `thresholds.inp_p75_ms` jelenléte triggereli az INP page-script
32
+ inline-deklarálását
33
+ - Per-iter `page.addInitScript(DYE2E_INP_PAGE_SCRIPT)` feltételes hivás
34
+ - `page.evaluate(__dye2e_inp_snapshot__)` automatikus snapshot-trigger
35
+ - `INP` az asszertion-table-ban (LCP + CLS + INP + FCP + TTFB)
36
+ - `dye2eTest` fixture bővítve Wave-2b page-object factory-kkal:
37
+ `chipSelectPO`, `autocompletePO`, `colorPickerPO`, `filePO`, `richTextPO`
38
+ - `CONTRIBUTING.md` — hozzájárulási útmutató (setup, checklist, branch-strat,
39
+ verziózás, test-case-mátrix-bővítés, code-style, CICD)
40
+
41
+ ### Test
42
+ - 167/0 Jasmine zöld (162 előbb + 5 INP integration spec)
43
+ - Coverage: 98.3% statements / 86.28% branches / 97.24% functions / 98.3% lines
44
+
6
45
  ## [01.08.0] — 2026-06-10
7
46
 
8
47
  ### Added (Wave-3 INP + Wave-2b page-objects)
@@ -0,0 +1,90 @@
1
+ # Contributing — `@futdevpro/dynamo-e2e`
2
+
3
+ Köszönjük, hogy hozzájárulsz! Ez egy bedrock-package a Dynamo + FDP
4
+ ecosystem-hez. A módosítások N-szeresen fan-out-elnek a consumer-projekteken,
5
+ így minimális defensiveness elvárt.
6
+
7
+ ## Setup
8
+
9
+ ```bash
10
+ git clone git@github.com:futdevpro/dynamo-e2e.git
11
+ cd dynamo-e2e
12
+ pnpm run prep
13
+ ```
14
+
15
+ ## Develop
16
+
17
+ ```bash
18
+ pnpm run build-base # tsc → ./build
19
+ pnpm test # build + jasmine
20
+ pnpm run test:coverage # build + c8 jasmine — 75/65/75/75 küszöb
21
+ ```
22
+
23
+ ## Hozzájárulási checklist
24
+
25
+ A PR-előtt:
26
+
27
+ - [ ] `pnpm test` zöld lokálisan
28
+ - [ ] `pnpm run test:coverage` zöld (mindenhol >75% statements / functions / lines, >65% branches)
29
+ - [ ] Új feature → spec + getting-started + per-fieldtype-test-matrix update
30
+ - [ ] Deterministic emission — `STAMP_BUILT_AT` const, semmilyen `Date.now()` a generator-ban
31
+ - [ ] Pure JavaScript a page-script-ekben (NEM TS — a browser direkt futtatja)
32
+ - [ ] JSDoc minden új public export-on
33
+ - [ ] CHANGELOG.md új section a release-version-nel
34
+
35
+ ## Branch-strategy
36
+
37
+ - `master` — kötelező-zöld; CICD-publish-eli
38
+ - `feat/*` — feature branches; PR-rel mergel
39
+ - `fix/*` — bug-fix branches
40
+ - `chore/*` — non-functional changes (docs, deps)
41
+
42
+ ## Verziózás
43
+
44
+ - **Major (`MM.x.x`)**: API-break. **NINCS automatikus** — emberi
45
+ decision (lásd MP-07 SP-F példa)
46
+ - **Minor (`MM.mm.0`)**: új feature, additive
47
+ - **Patch (`MM.mm.p`)**: bug-fix, doc-only
48
+
49
+ A `dynamo-cli` `dc bump-version` husky-pre-commit auto-bumpolja a
50
+ patch-szegmenset. Major/minor-bumpot manuálisan kell beállítani a
51
+ `package.json`-ban a commit előtt — ÉS a CHANGELOG-ot is.
52
+
53
+ ## A test-case-mátrix-bővítés (Wave-2+)
54
+
55
+ Új field-type-hozzáadás:
56
+
57
+ 1. `src/_modules/contracts/_collections/test-case-sets/<type>-field-test-cases.const.ts`
58
+ 2. Hozzáfűzd a `FIELD_TYPE_TEST_CASE_REGISTRY`-be
59
+ 3. `src/_modules/generators/_collections/field-emission.util.ts` `emitInteraction` + `emitAssertion` dispatch-ágat add hozzá
60
+ 4. (Opcionális) `src/_modules/runtime/_services/<type>-page-object.ts` page-object + fixture
61
+ 5. Specifikációs `__documentations/per-fieldtype-test-matrix.md` táblát bővíts
62
+ 6. Specifikáció `cwv|generators|runtime` modulon test minden új dispatch-ágra
63
+
64
+ ## Code style
65
+
66
+ - TypeScript strict-laza (lásd `tsconfig.json`)
67
+ - Hunglish dokumentáció + Hungarian inline-comment (memory: project konvenció)
68
+ - Top-of-file imports (`import` only, NEM `require()`)
69
+ - Naming: `DyE2E_*` per Dynamo-konvenció (DataModel: `_DataModel`, Service: `_Service`, stb.)
70
+ - ESLint: `pnpm lint` (`@futdevpro/dynamo-eslint` config)
71
+
72
+ ## CICD
73
+
74
+ - A push automatikusan triggereli az Overseer pipeline-t
75
+ - A `.dynamo/pipeline.cicd.config.json` 9 step-pel:
76
+ discord-start → pre-flight → install → build → test → **coverage** → npm-publish → pipeline-report → discord-result
77
+ - A `coverage` step a 75% küszöb alatti merge-et blokkolja
78
+ - A `npm-publish` step `skipIfPublished: true` — manual `npm publish` is OK
79
+
80
+ ## Memory + plan-háló
81
+
82
+ A nagyobb feature-ek a `__documentations/plans/dynamo-e2e-foundation/`
83
+ HYPERPLAN.md + MP-N file-okba kerülnek először. Az implementáció után a
84
+ CHANGELOG.md-be kerül a release-summary.
85
+
86
+ ## Kapcsolat
87
+
88
+ - Issues: github.com/futdevpro/dynamo-e2e/issues
89
+ - Maintainer: @itharen (Tahi-Toth Balazs)
90
+ - Discord: #bedrock-builds
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @futdevpro/dynamo-e2e
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@futdevpro/dynamo-e2e.svg?label=npm)](https://www.npmjs.com/package/@futdevpro/dynamo-e2e)
4
- [![coverage](https://img.shields.io/badge/coverage-98.29%25-brightgreen.svg)](./coverage/)
5
- [![specs](https://img.shields.io/badge/specs-162%2F0-brightgreen.svg)](./src/)
4
+ [![coverage](https://img.shields.io/badge/coverage-98.2%25-brightgreen.svg)](./coverage/)
5
+ [![specs](https://img.shields.io/badge/specs-183%2F0-brightgreen.svg)](./src/)
6
6
  [![hyperplan](https://img.shields.io/badge/hyperplan-109%2F112-brightgreen.svg)](./__documentations/plans/dynamo-e2e-foundation/HYPERPLAN.md)
7
7
 
8
8
  End-to-end testing engine for the Dynamo + FDP ecosystem.
package/bin/dye2e.js CHANGED
@@ -25,6 +25,27 @@ function main() {
25
25
  process.exit(0);
26
26
  }
27
27
 
28
+ if (parsed.command === 'doctor') {
29
+ const projectRoot = parsed.flags.pwd ? path.resolve(parsed.flags.pwd) : process.cwd();
30
+ const report = DyE2E_CliRunner_Util.doctorReport(projectRoot, fs);
31
+ process.stdout.write('dye2e doctor — project config check\n');
32
+ process.stdout.write(' pwd: ' + projectRoot + '\n\n');
33
+ process.stdout.write(' [' + (report.hasDynamoE2E ? '✓' : '✗') + '] @futdevpro/dynamo-e2e installed\n');
34
+ process.stdout.write(' [' + (report.hasPlaywrightTest ? '✓' : '✗') + '] @playwright/test installed\n');
35
+ process.stdout.write(' [' + (report.hasPlaywrightConfig ? '✓' : '✗') + '] playwright.config.{ts,js} present\n');
36
+ process.stdout.write(' [' + (report.hasE2EDir ? '✓' : '✗') + '] e2e/ or tests/ directory present\n');
37
+ process.stdout.write(' [' + (report.hasCicdConfig ? '✓' : '✗') + '] .dynamo/pipeline.cicd.config.json present (Overseer CICD)\n');
38
+ if (report.suggestions.length > 0) {
39
+ process.stdout.write('\n Suggestions:\n');
40
+ for (const s of report.suggestions) {
41
+ process.stdout.write(' - ' + s + '\n');
42
+ }
43
+ } else {
44
+ process.stdout.write('\n ✓ all checks passed.\n');
45
+ }
46
+ process.exit(report.suggestions.length > 0 ? 1 : 0);
47
+ }
48
+
28
49
  const generateCommands = ['generate-form-suite', 'generate-viewport-audit', 'generate-cwv-diag'];
29
50
  if (generateCommands.indexOf(parsed.command) !== -1) {
30
51
  const configPath = parsed.flags.config;
@@ -0,0 +1,37 @@
1
+ import { DyE2E_CWVMetric_Type } from '../../contracts/_enums/cwv-metric-type.enum';
2
+ import { DyE2E_CWVThresholds_Interface } from '../../contracts/_models/interfaces/cwv-thresholds.interface';
3
+ import { DyE2E_CWVMeasurement_DataModel } from '../_models/cwv-measurement.data-model';
4
+ /**
5
+ * MP-05/Wave-3 — Attribution-based diagnose util.
6
+ *
7
+ * Bemenet: measurement-tömb + thresholds. Kimenet: human-readable diagnose
8
+ * sorok — "LCP p75 = 4200ms (cél: 2500ms). A leglassabb LCP target:
9
+ * `IMG#hero-banner`. Optimalizálás: preload + dimension-set."
10
+ */
11
+ export interface DyE2E_CWVDiagnose_Hint {
12
+ metric: DyE2E_CWVMetric_Type;
13
+ /** A measured p75 érték. */
14
+ p75: number;
15
+ /** A threshold (ha definiált). */
16
+ threshold?: number;
17
+ /** A legrosszabb futás target-info (a `measurement.attribution`-ből). */
18
+ worstTarget?: string;
19
+ /** Human-readable summary. */
20
+ summary: string;
21
+ /** Optimalizálási javaslat. */
22
+ suggestion: string;
23
+ }
24
+ export declare class DyE2E_CWVDiagnose_Util {
25
+ /**
26
+ * Per-metric percentile-számolás (lásd `DyE2E_CWVAggregator_Util` is —
27
+ * itt egy-self-contained verzió a diagnose-flow-hoz).
28
+ */
29
+ private static percentile;
30
+ /** Diagnose egy metricre — visszaadja a hint-et vagy null-t ha nincs adat. */
31
+ static diagnoseMetric(measurements: DyE2E_CWVMeasurement_DataModel[], metric: DyE2E_CWVMetric_Type, thresholds: DyE2E_CWVThresholds_Interface): DyE2E_CWVDiagnose_Hint | null;
32
+ /** Diagnose minden metric-re egyszerre. */
33
+ static diagnoseAll(measurements: DyE2E_CWVMeasurement_DataModel[], thresholds: DyE2E_CWVThresholds_Interface): DyE2E_CWVDiagnose_Hint[];
34
+ /** Egy metric-szintű optimalizálási javaslat. */
35
+ private static suggest;
36
+ }
37
+ //# sourceMappingURL=cwv-diagnose.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cwv-diagnose.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/cwv/_collections/cwv-diagnose.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AAC5G,OAAO,EAAE,8BAA8B,EAAE,MAAM,uCAAuC,CAAC;AAEvF;;;;;;GAMG;AAEH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,oBAAoB,CAAC;IAC7B,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,+BAA+B;IAC/B,UAAU,EAAE,MAAM,CAAC;CACpB;AASD,qBAAa,sBAAsB;IAEjC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;IAiBzB,8EAA8E;IAC9E,MAAM,CAAC,cAAc,CACnB,YAAY,EAAE,8BAA8B,EAAE,EAC9C,MAAM,EAAE,oBAAoB,EAC5B,UAAU,EAAE,6BAA6B,GACxC,sBAAsB,GAAG,IAAI;IAkDhC,2CAA2C;IAC3C,MAAM,CAAC,WAAW,CAChB,YAAY,EAAE,8BAA8B,EAAE,EAC9C,UAAU,EAAE,6BAA6B,GACxC,sBAAsB,EAAE;IAa3B,iDAAiD;IACjD,OAAO,CAAC,MAAM,CAAC,OAAO;CA0BvB"}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyE2E_CWVDiagnose_Util = void 0;
4
+ const cwv_metric_type_enum_1 = require("../../contracts/_enums/cwv-metric-type.enum");
5
+ const LCP_SUGGESTIONS = {
6
+ IMG: 'IMG → preload + explicit width/height + responsive-srcset',
7
+ VIDEO: 'VIDEO → poster-image + preload="metadata"',
8
+ H1: 'H1 → font-display:swap + preload critical CSS',
9
+ DIV: 'DIV background-image → image preload + CSS containment',
10
+ };
11
+ class DyE2E_CWVDiagnose_Util {
12
+ /**
13
+ * Per-metric percentile-számolás (lásd `DyE2E_CWVAggregator_Util` is —
14
+ * itt egy-self-contained verzió a diagnose-flow-hoz).
15
+ */
16
+ static percentile(values, p) {
17
+ if (values.length === 0) {
18
+ return NaN;
19
+ }
20
+ const sorted = [...values].sort((a, b) => a - b);
21
+ if (sorted.length === 1) {
22
+ return sorted[0];
23
+ }
24
+ const rank = p * (sorted.length - 1);
25
+ const lo = Math.floor(rank);
26
+ const hi = Math.ceil(rank);
27
+ if (lo === hi) {
28
+ return sorted[lo];
29
+ }
30
+ return sorted[lo] * (1 - (rank - lo)) + sorted[hi] * (rank - lo);
31
+ }
32
+ /** Diagnose egy metricre — visszaadja a hint-et vagy null-t ha nincs adat. */
33
+ static diagnoseMetric(measurements, metric, thresholds) {
34
+ const filtered = measurements.filter((m) => m.metric === metric);
35
+ if (filtered.length === 0) {
36
+ return null;
37
+ }
38
+ const values = filtered.map((m) => m.value);
39
+ const p75 = DyE2E_CWVDiagnose_Util.percentile(values, 0.75);
40
+ // Az "legrosszabb" futás attribution-ja a target-info forrása.
41
+ const worst = filtered.reduce((acc, m) => m.value > acc.value ? m : acc, filtered[0]);
42
+ const worstTarget = typeof worst.attribution?.element === 'string'
43
+ ? worst.attribution.element
44
+ : typeof worst.attribution?.target === 'string'
45
+ ? worst.attribution.target
46
+ : undefined;
47
+ const thresholdKey = metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp ? 'lcp_p75_ms' :
48
+ metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls ? 'cls_p75' :
49
+ metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.inp ? 'inp_p75_ms' :
50
+ metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.ttfb ? 'ttfb_p75_ms' :
51
+ metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.fcp ? 'fcp_p75_ms' :
52
+ 'lcp_p75_ms';
53
+ const threshold = thresholds[thresholdKey];
54
+ const fails = typeof threshold === 'number' && p75 > threshold;
55
+ const suggestion = DyE2E_CWVDiagnose_Util.suggest(metric, worstTarget, fails);
56
+ const summary = `${metric.toUpperCase()} p75 = ${p75.toFixed(2)}${metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls ? '' : 'ms'}${typeof threshold === 'number' ? ` (cél: ${threshold}${metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls ? '' : 'ms'})` : ''}${fails ? ' ⚠️ FAIL' : ''}${worstTarget ? `. Legrosszabb target: \`${worstTarget}\`` : ''}.`;
57
+ return {
58
+ metric: metric,
59
+ p75: p75,
60
+ threshold: threshold,
61
+ worstTarget: worstTarget,
62
+ summary: summary,
63
+ suggestion: suggestion,
64
+ };
65
+ }
66
+ /** Diagnose minden metric-re egyszerre. */
67
+ static diagnoseAll(measurements, thresholds) {
68
+ const metrics = [
69
+ cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp,
70
+ cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls,
71
+ cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.inp,
72
+ cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.ttfb,
73
+ cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.fcp,
74
+ ];
75
+ return metrics
76
+ .map((m) => DyE2E_CWVDiagnose_Util.diagnoseMetric(measurements, m, thresholds))
77
+ .filter((h) => h !== null);
78
+ }
79
+ /** Egy metric-szintű optimalizálási javaslat. */
80
+ static suggest(metric, target, fails) {
81
+ if (!fails) {
82
+ return 'OK — threshold tartva.';
83
+ }
84
+ if (metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp && target) {
85
+ // Az IMG/H1/DIV stb. prefixet vegye ki
86
+ const tag = target.split(/[#.]/)[0].toUpperCase();
87
+ return LCP_SUGGESTIONS[tag] ?? `LCP target ${target} — optimalizálás: preload + critical CSS + lazy-load other content`;
88
+ }
89
+ if (metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp) {
90
+ return 'LCP — preload critical resources + reduce render-blocking JS + use CDN';
91
+ }
92
+ if (metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls) {
93
+ return 'CLS — set explicit dimensions on IMG/IFRAME/AD-slots + avoid font-swap layout-shift + use `font-display: optional`';
94
+ }
95
+ if (metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.inp) {
96
+ return 'INP — break up long tasks (yield to main thread) + remove unused JS + defer non-critical interactivity';
97
+ }
98
+ if (metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.ttfb) {
99
+ return 'TTFB — server-side caching + CDN + reduce DB query time + edge-deploy';
100
+ }
101
+ if (metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.fcp) {
102
+ return 'FCP — inline critical CSS + preconnect to third-party origins + reduce render-blocking JS';
103
+ }
104
+ return 'Optimalizálási javaslat — lásd web.dev metric-specific docs.';
105
+ }
106
+ }
107
+ exports.DyE2E_CWVDiagnose_Util = DyE2E_CWVDiagnose_Util;
108
+ //# sourceMappingURL=cwv-diagnose.util.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cwv-diagnose.util.js","sourceRoot":"","sources":["../../../../src/_modules/cwv/_collections/cwv-diagnose.util.ts"],"names":[],"mappings":";;;AAAA,sFAAmF;AA0BnF,MAAM,eAAe,GAA2B;IAC9C,GAAG,EAAE,2DAA2D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AE,UAAU,CAAC,CAAC;aACnI,MAAM,CAAC,CAAC,CAAgC,EAA+B,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC;IAC3F,CAAC;IAED,iDAAiD;IACzC,MAAM,CAAC,OAAO,CAAC,MAA4B,EAAE,MAA0B,EAAE,KAAc;QAC7F,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,OAAO,wBAAwB,CAAC;QAClC,CAAC;QACD,IAAI,MAAM,KAAK,2CAAoB,CAAC,GAAG,IAAI,MAAM,EAAE,CAAC;YAClD,uCAAuC;YACvC,MAAM,GAAG,GAAW,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YAC1D,OAAO,eAAe,CAAC,GAAG,CAAC,IAAI,cAAc,MAAM,oEAAoE,CAAC;QAC1H,CAAC;QACD,IAAI,MAAM,KAAK,2CAAoB,CAAC,GAAG,EAAE,CAAC;YACxC,OAAO,wEAAwE,CAAC;QAClF,CAAC;QACD,IAAI,MAAM,KAAK,2CAAoB,CAAC,GAAG,EAAE,CAAC;YACxC,OAAO,oHAAoH,CAAC;QAC9H,CAAC;QACD,IAAI,MAAM,KAAK,2CAAoB,CAAC,GAAG,EAAE,CAAC;YACxC,OAAO,wGAAwG,CAAC;QAClH,CAAC;QACD,IAAI,MAAM,KAAK,2CAAoB,CAAC,IAAI,EAAE,CAAC;YACzC,OAAO,uEAAuE,CAAC;QACjF,CAAC;QACD,IAAI,MAAM,KAAK,2CAAoB,CAAC,GAAG,EAAE,CAAC;YACxC,OAAO,2FAA2F,CAAC;QACrG,CAAC;QACD,OAAO,8DAA8D,CAAC;IACxE,CAAC;CACF;AA1HD,wDA0HC"}
@@ -1 +1 @@
1
- {"version":3,"file":"cwv-emission.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/cwv/_collections/cwv-emission.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AAC5G,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AAGtG;;;;;;;;;;;GAWG;AACH,qBAAa,sBAAsB;IAEjC,MAAM,CAAC,cAAc,CACnB,KAAK,EAAE,+BAA+B,EACtC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,6BAA6B,EACzC,SAAS,EAAE,MAAM,GAChB,MAAM;CA+EV"}
1
+ {"version":3,"file":"cwv-emission.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/cwv/_collections/cwv-emission.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6DAA6D,CAAC;AAC5G,OAAO,EAAE,+BAA+B,EAAE,MAAM,qDAAqD,CAAC;AAGtG;;;;;;;;;;;GAWG;AACH,qBAAa,sBAAsB;IAEjC,MAAM,CAAC,cAAc,CACnB,KAAK,EAAE,+BAA+B,EACtC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,6BAA6B,EACzC,SAAS,EAAE,MAAM,GAChB,MAAM;CAoFV"}
@@ -23,6 +23,7 @@ class DyE2E_CWVEmission_Util {
23
23
  const assertions = [
24
24
  ['lcp', thresholds.lcp_p75_ms, 'ms'],
25
25
  ['cls', thresholds.cls_p75, ''],
26
+ ['inp', thresholds.inp_p75_ms, 'ms'],
26
27
  ['fcp', thresholds.fcp_p75_ms, 'ms'],
27
28
  ['ttfb', thresholds.ttfb_p75_ms, 'ms'],
28
29
  ]
@@ -34,13 +35,17 @@ class DyE2E_CWVEmission_Util {
34
35
 
35
36
  for (let iter: number = 0; iter < ${iterations}; iter++) {
36
37
  await page.addInitScript({ content: DYE2E_WEB_VITALS_PAGE_SCRIPT });
38
+ if (typeof DYE2E_INP_PAGE_SCRIPT !== 'undefined') {
39
+ await page.addInitScript({ content: DYE2E_INP_PAGE_SCRIPT });
40
+ }
37
41
  const response = await page.goto(${spec_emission_util_1.DyE2E_SpecEmission_Util.valueLiteral(fullPath)});
38
42
  expect(response?.ok()).toBeTruthy();
39
43
  ${readyWait}
40
- // Force snapshot — trigger pagehide via page.evaluate
44
+ // Force snapshot — trigger pagehide via page.evaluate (LCP/CLS + opcionálisan INP)
41
45
  await page.evaluate((): void => {
42
46
  const w = window as any;
43
47
  if (typeof w.__dye2e_cwv_snapshot__ === 'function') { w.__dye2e_cwv_snapshot__(); }
48
+ if (typeof w.__dye2e_inp_snapshot__ === 'function') { w.__dye2e_inp_snapshot__(); }
44
49
  });
45
50
  const events: any[] = await page.evaluate(() => (window as any).__dye2e_cwv_events__ || []);
46
51
  for (const ev of events) {
@@ -1 +1 @@
1
- {"version":3,"file":"cwv-emission.util.js","sourceRoot":"","sources":["../../../../src/_modules/cwv/_collections/cwv-emission.util.ts"],"names":[],"mappings":";;;AAEA,yFAA2F;AAE3F;;;;;;;;;;;GAWG;AACH,MAAa,sBAAsB;IAEjC,MAAM,CAAC,cAAc,CACnB,KAAsC,EACtC,UAAkB,EAClB,UAAyC,EACzC,SAAiB;QAEjB,MAAM,QAAQ,GAAW,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;QACpF,MAAM,SAAS,GAAW,KAAK,CAAC,YAAY;YAC1C,CAAC,CAAC,sBAAsB,4CAAuB,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,0CAA0C;YAC1H,CAAC,CAAC,6CAA6C,CAAC;QAElD,MAAM,UAAU,GAAW;YACzB,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC;YACpC,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;YAC/B,CAAC,KAAK,EAAE,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC;YACpC,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,EAAE,IAAI,CAAC;SACvC;aACE,MAAM,CAAC,CAAC,CAAuC,EAAW,EAAE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AAC,KAAK,CAAC,GAAG,CAAC;;;IAGzE,UAAU;IACV,CAAC;IACH,CAAC;CACF;AA3FD,wDA2FC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cwv-diagnose.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cwv-diagnose.spec.d.ts","sourceRoot":"","sources":["../../../src/_modules/cwv/cwv-diagnose.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cwv_metric_type_enum_1 = require("../contracts/_enums/cwv-metric-type.enum");
4
+ const cwv_default_thresholds_const_1 = require("../contracts/_collections/constants/cwv-default-thresholds.const");
5
+ const cwv_measurement_data_model_1 = require("./_models/cwv-measurement.data-model");
6
+ const cwv_diagnose_util_1 = require("./_collections/cwv-diagnose.util");
7
+ describe('| dynamo-e2e | CWV Diagnose Util (Wave-3)', () => {
8
+ it('| üres measurement → null', () => {
9
+ const result = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric([], cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
10
+ expect(result).toBeNull();
11
+ });
12
+ it('| LCP p75 < threshold → OK', () => {
13
+ const ms = [
14
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, value: 1500, iteration: 0, route: '/x' }),
15
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, value: 2000, iteration: 1, route: '/x' }),
16
+ ];
17
+ const result = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric(ms, cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
18
+ expect(result).not.toBeNull();
19
+ expect(result?.suggestion).toBe('OK — threshold tartva.');
20
+ expect(result?.summary).toContain('LCP p75');
21
+ expect(result?.summary).not.toContain('FAIL');
22
+ });
23
+ it('| LCP p75 > threshold → FAIL + suggestion', () => {
24
+ const ms = [
25
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, value: 4000, iteration: 0, route: '/x' }),
26
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, value: 5500, iteration: 1, route: '/x' }),
27
+ ];
28
+ const result = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric(ms, cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
29
+ expect(result?.summary).toContain('FAIL');
30
+ expect(result?.suggestion).not.toBe('OK — threshold tartva.');
31
+ });
32
+ it('| LCP target IMG → IMG-specifikus suggestion', () => {
33
+ const ms = [
34
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({
35
+ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, value: 5000, iteration: 0, route: '/x',
36
+ attribution: { element: 'IMG#hero-banner' },
37
+ }),
38
+ ];
39
+ const result = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric(ms, cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
40
+ expect(result?.worstTarget).toBe('IMG#hero-banner');
41
+ expect(result?.suggestion).toContain('preload');
42
+ });
43
+ it('| CLS p75 > 0.1 → FAIL + dimension suggestion', () => {
44
+ const ms = [
45
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls, value: 0.2, iteration: 0, route: '/x' }),
46
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls, value: 0.3, iteration: 1, route: '/x' }),
47
+ ];
48
+ const result = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric(ms, cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
49
+ expect(result?.summary).toContain('FAIL');
50
+ expect(result?.suggestion).toContain('dimension');
51
+ });
52
+ it('| INP p75 > 200ms → FAIL + long-task suggestion', () => {
53
+ const ms = [
54
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.inp, value: 500, iteration: 0, route: '/x' }),
55
+ ];
56
+ const result = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric(ms, cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.inp, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
57
+ expect(result?.suggestion).toContain('long tasks');
58
+ });
59
+ it('| TTFB / FCP suggestion-ágak', () => {
60
+ const ttfbMs = [new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.ttfb, value: 2000, iteration: 0, route: '/x' })];
61
+ const fcpMs = [new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.fcp, value: 3000, iteration: 0, route: '/x' })];
62
+ const ttfb = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric(ttfbMs, cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.ttfb, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
63
+ const fcp = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseMetric(fcpMs, cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.fcp, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
64
+ expect(ttfb?.suggestion).toContain('caching');
65
+ expect(fcp?.suggestion).toContain('critical CSS');
66
+ });
67
+ it('| diagnoseAll több metric-re egyszerre', () => {
68
+ const ms = [
69
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp, value: 1500, iteration: 0, route: '/x' }),
70
+ new cwv_measurement_data_model_1.DyE2E_CWVMeasurement_DataModel({ metric: cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls, value: 0.05, iteration: 0, route: '/x' }),
71
+ ];
72
+ const all = cwv_diagnose_util_1.DyE2E_CWVDiagnose_Util.diagnoseAll(ms, cwv_default_thresholds_const_1.CWV_GOOD_THRESHOLDS);
73
+ expect(all.length).toBe(2); // LCP + CLS
74
+ expect(all.find(h => h.metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.lcp)).toBeDefined();
75
+ expect(all.find(h => h.metric === cwv_metric_type_enum_1.DyE2E_CWVMetric_Type.cls)).toBeDefined();
76
+ });
77
+ });
78
+ //# sourceMappingURL=cwv-diagnose.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cwv-diagnose.spec.js","sourceRoot":"","sources":["../../../src/_modules/cwv/cwv-diagnose.spec.ts"],"names":[],"mappings":";;AAAA,mFAAgF;AAChF,mHAAuG;AACvG,qFAAsF;AACtF,wEAA0E;AAE1E,QAAQ,CAAC,2CAA2C,EAAE,GAAS,EAAE;IAE/D,EAAE,CAAC,2BAA2B,EAAE,GAAS,EAAE;QACzC,MAAM,MAAM,GAAG,0CAAsB,CAAC,cAAc,CAAC,EAAE,EAAE,2CAAoB,CAAC,GAAG,EAAE,kDAAmB,CAAC,CAAC;QACxG,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,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sourceRoot":"","sources":["../../../src/_modules/cwv/cwv-suite.generator.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAEhG;;;;;;GAMG;AACH,qBAAa,wBAAwB;IAEnC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAkB;IAExD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM;CA6B7D"}
1
+ {"version":3,"file":"cwv-suite.generator.d.ts","sourceRoot":"","sources":["../../../src/_modules/cwv/cwv-suite.generator.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAEhG;;;;;;GAMG;AACH,qBAAa,wBAAwB;IAEnC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAkB;IAExD,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM;CAqC7D"}
@@ -4,6 +4,7 @@ exports.DyE2E_CWVSuite_Generator = void 0;
4
4
  const cwv_default_thresholds_const_1 = require("../contracts/_collections/constants/cwv-default-thresholds.const");
5
5
  const spec_emission_util_1 = require("../generators/_collections/spec-emission.util");
6
6
  const cwv_emission_util_1 = require("./_collections/cwv-emission.util");
7
+ const inp_interaction_script_const_1 = require("./_collections/inp-interaction-script.const");
7
8
  const web_vitals_page_script_const_1 = require("./_collections/web-vitals-page-script.const");
8
9
  /**
9
10
  * MP-05 — CWV-suite generator (synthetic measurement).
@@ -21,10 +22,17 @@ class DyE2E_CWVSuite_Generator {
21
22
  const describePrefix = options.describePrefix ?? 'CWV diagnostics';
22
23
  const header = spec_emission_util_1.DyE2E_SpecEmission_Util.headerComment('cwv-diag', options.routes.map((r) => r.path).join(', '), DyE2E_CWVSuite_Generator.STAMP_BUILT_AT, options.headerComment);
23
24
  const routeBlocks = options.routes.map((r) => cwv_emission_util_1.DyE2E_CWVEmission_Util.emitRouteBlock(r, iterations, thresholds, reportDir));
25
+ // Wave-3 — ha LCP/CLS/FCP/TTFB MELLETT INP-t is mérünk, mindkét page-scriptet
26
+ // kell injektálni. A `DyE2E_CWVSuiteGenerate_Options.thresholds.inp_p75_ms`
27
+ // jelenléte signalizálja az INP-mérés-szándékot.
28
+ const wantsInp = typeof thresholds.inp_p75_ms === 'number';
29
+ const inpScriptDecl = wantsInp
30
+ ? `\nconst DYE2E_INP_PAGE_SCRIPT: string = ${JSON.stringify(inp_interaction_script_const_1.DYE2E_INP_PAGE_SCRIPT)};`
31
+ : '';
24
32
  return `${header}
25
33
  import { test, expect } from '@playwright/test';
26
34
 
27
- const DYE2E_WEB_VITALS_PAGE_SCRIPT: string = ${JSON.stringify(web_vitals_page_script_const_1.DYE2E_WEB_VITALS_PAGE_SCRIPT)};
35
+ const DYE2E_WEB_VITALS_PAGE_SCRIPT: string = ${JSON.stringify(web_vitals_page_script_const_1.DYE2E_WEB_VITALS_PAGE_SCRIPT)};${inpScriptDecl}
28
36
 
29
37
  test.describe('${spec_emission_util_1.DyE2E_SpecEmission_Util.escapeString(describePrefix)}', (): void => {
30
38
 
@@ -1 +1 @@
1
- {"version":3,"file":"cwv-suite.generator.js","sourceRoot":"","sources":["../../../src/_modules/cwv/cwv-suite.generator.ts"],"names":[],"mappings":";;;AAAA,mHAAuG;AAGvG,sFAAwF;AACxF,wEAA0E;AAC1E,8FAA2F;AAG3F;;;;;;GAMG;AACH,MAAa,wBAAwB;IAEnC,MAAM,CAAU,cAAc,GAAW,cAAc,CAAC;IAExD,MAAM,CAAC,IAAI,CAAC,OAAuC;QACjD,MAAM,UAAU,GAAW,OAAO,CAAC,kBAAkB,IAAI,CAAC,CAAC;QAC3D,MAAM,UAAU,GAAkC,OAAO,CAAC,UAAU,IAAI,kDAAmB,CAAC;QAC5F,MAAM,SAAS,GAAW,OAAO,CAAC,SAAS,IAAI,gBAAgB,CAAC;QAChE,MAAM,cAAc,GAAW,OAAO,CAAC,cAAc,IAAI,iBAAiB,CAAC;Q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,MAAM,MAAM,GAAW,4CAAuB,CAAC,aAAa,CAC1D,UAAU,EACV,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAkC,EAAU,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EACrF,wBAAwB,CAAC,cAAc,EACvC,OAAO,CAAC,aAAa,CACtB,CAAC;QAEF,MAAM,WAAW,GAAa,OAAO,CAAC,MAAM,CAAC,GAAG,CAC9C,CAAC,CAAkC,EAAU,EAAE,CAAC,0CAAsB,CAAC,cAAc,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,CAC5H,CAAC;QAEF,8EAA8E;QAC9E,4EAA4E;QAC5E,iDAAiD;QACjD,MAAM,QAAQ,GAAY,OAAO,UAAU,CAAC,UAAU,KAAK,QAAQ,CAAC;QACpE,MAAM,aAAa,GAAW,QAAQ;YACpC,CAAC,CAAC,2CAA2C,IAAI,CAAC,SAAS,CAAC,oDAAqB,CAAC,GAAG;YACrF,CAAC,CAAC,EAAE,CAAC;QAEP,OAAO,GAAG,MAAM;;;+CAG2B,IAAI,CAAC,SAAS,CAAC,2DAA4B,CAAC,IAAI,aAAa;;iBAE3F,4CAAuB,CAAC,YAAY,CAAC,cAAc,CAAC;;EAEnE,4CAAuB,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;;;CAG5D,CAAC;IACA,CAAC;;AAxCH,4DAyCC"}
@@ -2,6 +2,7 @@
2
2
  * `@futdevpro/dynamo-e2e/cwv` — Core Web Vitals diagnostics (Wave-3).
3
3
  */
4
4
  export * from './_collections/cwv-aggregator.util';
5
+ export * from './_collections/cwv-diagnose.util';
5
6
  export * from './_collections/cwv-emission.util';
6
7
  export * from './_collections/inp-interaction-script.const';
7
8
  export * from './_collections/web-vitals-page-script.const';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/cwv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,iBAAiB,EAAE,MAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/cwv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AAEtC,eAAO,MAAM,iBAAiB,EAAE,MAAuB,CAAC"}
@@ -19,6 +19,7 @@ exports.DYE2E_CWV_VERSION = void 0;
19
19
  * `@futdevpro/dynamo-e2e/cwv` — Core Web Vitals diagnostics (Wave-3).
20
20
  */
21
21
  __exportStar(require("./_collections/cwv-aggregator.util"), exports);
22
+ __exportStar(require("./_collections/cwv-diagnose.util"), exports);
22
23
  __exportStar(require("./_collections/cwv-emission.util"), exports);
23
24
  __exportStar(require("./_collections/inp-interaction-script.const"), exports);
24
25
  __exportStar(require("./_collections/web-vitals-page-script.const"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/cwv/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,qEAAmD;AACnD,mEAAiD;AACjD,8EAA4D;AAC5D,8EAA4D;AAC5D,kDAAgC;AAChC,wDAAsC;AAEzB,QAAA,iBAAiB,GAAW,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/cwv/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;GAEG;AACH,qEAAmD;AACnD,mEAAiD;AACjD,mEAAiD;AACjD,8EAA4D;AAC5D,8EAA4D;AAC5D,kDAAgC;AAChC,wDAAsC;AAEzB,QAAA,iBAAiB,GAAW,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=inp-emit-integration.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inp-emit-integration.spec.d.ts","sourceRoot":"","sources":["../../../src/_modules/cwv/inp-emit-integration.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cwv_suite_generator_1 = require("./cwv-suite.generator");
4
+ describe('| dynamo-e2e | INP emit integration (Wave-3)', () => {
5
+ it('| inp_p75_ms threshold nélkül NEM emit-eli az INP page-script DECLARÁCIÓT', () => {
6
+ const spec = cwv_suite_generator_1.DyE2E_CWVSuite_Generator.emit({
7
+ routes: [{ key: 'x', path: '/x' }],
8
+ thresholds: { lcp_p75_ms: 2500, cls_p75: 0.1 },
9
+ });
10
+ expect(spec).not.toContain('const DYE2E_INP_PAGE_SCRIPT: string =');
11
+ expect(spec).not.toContain('__dye2e_inp_setup__');
12
+ });
13
+ it('| inp_p75_ms threshold-tal emit-eli az INP page-script DECLARÁCIÓT', () => {
14
+ const spec = cwv_suite_generator_1.DyE2E_CWVSuite_Generator.emit({
15
+ routes: [{ key: 'x', path: '/x' }],
16
+ thresholds: { lcp_p75_ms: 2500, cls_p75: 0.1, inp_p75_ms: 200 },
17
+ });
18
+ expect(spec).toContain('const DYE2E_INP_PAGE_SCRIPT: string =');
19
+ expect(spec).toContain('__dye2e_inp_setup__');
20
+ });
21
+ it('| INP-script feltételes addInitScript hivás', () => {
22
+ const spec = cwv_suite_generator_1.DyE2E_CWVSuite_Generator.emit({
23
+ routes: [{ key: 'x', path: '/x' }],
24
+ thresholds: { lcp_p75_ms: 2500, inp_p75_ms: 200 },
25
+ });
26
+ expect(spec).toContain(`typeof DYE2E_INP_PAGE_SCRIPT !== 'undefined'`);
27
+ });
28
+ it('| INP threshold-asszertelt a per-route block-ban (mindig emit-elve)', () => {
29
+ const spec = cwv_suite_generator_1.DyE2E_CWVSuite_Generator.emit({
30
+ routes: [{ key: 'x', path: '/x' }],
31
+ thresholds: { inp_p75_ms: 200 },
32
+ });
33
+ expect(spec).toContain('INP threshold 200ms');
34
+ });
35
+ it('| INP snapshot-hook a page.evaluate-ben', () => {
36
+ const spec = cwv_suite_generator_1.DyE2E_CWVSuite_Generator.emit({
37
+ routes: [{ key: 'x', path: '/x' }],
38
+ thresholds: { lcp_p75_ms: 2500 },
39
+ });
40
+ expect(spec).toContain('__dye2e_inp_snapshot__');
41
+ });
42
+ });
43
+ //# sourceMappingURL=inp-emit-integration.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inp-emit-integration.spec.js","sourceRoot":"","sources":["../../../src/_modules/cwv/inp-emit-integration.spec.ts"],"names":[],"mappings":";;AAAA,+DAAiE;AAEjE,QAAQ,CAAC,8CAA8C,EAAE,GAAS,EAAE;IAElE,EAAE,CAAC,2EAA2E,EAAE,GAAS,EAAE;QACzF,MAAM,IAAI,GAAW,8CAAwB,CAAC,IAAI,CAAC;YACjD,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;YAClC,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE;SAC/C,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,uCAAuC,CAAC,CAAC;QACpE,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oEAAoE,EAAE,GAAS,EAAE;QAClF,MAAM,IAAI,GAAW,8CAAwB,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