@sfdc-webapps/cli 1.0.2
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 +1414 -0
- package/dist/commands/apply-patches.d.ts +23 -0
- package/dist/commands/apply-patches.d.ts.map +1 -0
- package/dist/commands/apply-patches.js +524 -0
- package/dist/commands/apply-patches.js.map +1 -0
- package/dist/commands/new-app-feature.d.ts +7 -0
- package/dist/commands/new-app-feature.d.ts.map +1 -0
- package/dist/commands/new-app-feature.js +166 -0
- package/dist/commands/new-app-feature.js.map +1 -0
- package/dist/commands/new-app.d.ts +1 -0
- package/dist/commands/new-app.d.ts.map +1 -0
- package/dist/commands/new-app.js +2 -0
- package/dist/commands/new-app.js.map +1 -0
- package/dist/commands/watch-patches.d.ts +6 -0
- package/dist/commands/watch-patches.d.ts.map +1 -0
- package/dist/commands/watch-patches.js +152 -0
- package/dist/commands/watch-patches.js.map +1 -0
- package/dist/core/dependency-resolver.d.ts +40 -0
- package/dist/core/dependency-resolver.d.ts.map +1 -0
- package/dist/core/dependency-resolver.js +122 -0
- package/dist/core/dependency-resolver.js.map +1 -0
- package/dist/core/file-operations.d.ts +37 -0
- package/dist/core/file-operations.d.ts.map +1 -0
- package/dist/core/file-operations.js +201 -0
- package/dist/core/file-operations.js.map +1 -0
- package/dist/core/package-json-merger.d.ts +30 -0
- package/dist/core/package-json-merger.d.ts.map +1 -0
- package/dist/core/package-json-merger.js +104 -0
- package/dist/core/package-json-merger.js.map +1 -0
- package/dist/core/patch-loader.d.ts +17 -0
- package/dist/core/patch-loader.d.ts.map +1 -0
- package/dist/core/patch-loader.js +100 -0
- package/dist/core/patch-loader.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +90 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +21 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/debounce.d.ts +6 -0
- package/dist/utils/debounce.d.ts.map +1 -0
- package/dist/utils/debounce.js +19 -0
- package/dist/utils/debounce.js.map +1 -0
- package/dist/utils/import-merger.d.ts +12 -0
- package/dist/utils/import-merger.d.ts.map +1 -0
- package/dist/utils/import-merger.js +240 -0
- package/dist/utils/import-merger.js.map +1 -0
- package/dist/utils/logger.d.ts +6 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +17 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/path-mappings.d.ts +88 -0
- package/dist/utils/path-mappings.d.ts.map +1 -0
- package/dist/utils/path-mappings.js +138 -0
- package/dist/utils/path-mappings.js.map +1 -0
- package/dist/utils/paths.d.ts +43 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +107 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/route-merger.d.ts +107 -0
- package/dist/utils/route-merger.d.ts.map +1 -0
- package/dist/utils/route-merger.js +303 -0
- package/dist/utils/route-merger.js.map +1 -0
- package/dist/utils/validation.d.ts +29 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +109 -0
- package/dist/utils/validation.js.map +1 -0
- package/package.json +39 -0
- package/src/commands/apply-patches.ts +594 -0
- package/src/commands/new-app-feature.ts +203 -0
- package/src/commands/new-app.ts +0 -0
- package/src/commands/watch-patches.ts +173 -0
- package/src/core/dependency-resolver.ts +175 -0
- package/src/core/file-operations.ts +265 -0
- package/src/core/package-json-merger.ts +129 -0
- package/src/core/patch-loader.ts +128 -0
- package/src/index.ts +95 -0
- package/src/types.ts +23 -0
- package/src/utils/debounce.ts +23 -0
- package/src/utils/import-merger.ts +293 -0
- package/src/utils/logger.ts +21 -0
- package/src/utils/path-mappings.ts +154 -0
- package/src/utils/paths.ts +121 -0
- package/src/utils/route-merger.ts +357 -0
- package/src/utils/validation.ts +150 -0
- package/test/e2e/E2E_TEST_FIXTURES.md +509 -0
- package/test/e2e/apply-patches.spec.ts +861 -0
- package/test/e2e/fixtures/base-app/digitalExperiences/webApplications/base-app/package.json +10 -0
- package/test/e2e/fixtures/base-app/digitalExperiences/webApplications/base-app/src/appLayout.tsx +27 -0
- package/test/e2e/fixtures/base-app/digitalExperiences/webApplications/base-app/src/home.tsx +8 -0
- package/test/e2e/fixtures/base-app/digitalExperiences/webApplications/base-app/src/index.tsx +10 -0
- package/test/e2e/fixtures/base-app/digitalExperiences/webApplications/base-app/src/old-page.tsx +8 -0
- package/test/e2e/fixtures/base-app/digitalExperiences/webApplications/base-app/src/routes.tsx +23 -0
- package/test/e2e/fixtures/base-app/digitalExperiences/webApplications/base-app/src/styles/global.css +14 -0
- package/test/e2e/fixtures/basic-operations/dep-chain-linear/feature.ts +11 -0
- package/test/e2e/fixtures/basic-operations/dep-chain-linear/template/digitalExperiences/webApplications/dep-chain-linear/src/__inherit__appLayout.tsx +27 -0
- package/test/e2e/fixtures/basic-operations/dep-chain-linear/template/digitalExperiences/webApplications/dep-chain-linear/src/contact.tsx +8 -0
- package/test/e2e/fixtures/basic-operations/dep-chain-linear/template/digitalExperiences/webApplications/dep-chain-linear/src/routes.tsx +17 -0
- package/test/e2e/fixtures/basic-operations/feature-file-inherit-route-add/feature.ts +10 -0
- package/test/e2e/fixtures/basic-operations/feature-file-inherit-route-add/template/digitalExperiences/webApplications/feature-file-inherit-route-add/src/__inherit__appLayout.tsx +27 -0
- package/test/e2e/fixtures/basic-operations/feature-file-inherit-route-add/template/digitalExperiences/webApplications/feature-file-inherit-route-add/src/__inherit__home.tsx +0 -0
- package/test/e2e/fixtures/basic-operations/feature-file-inherit-route-add/template/digitalExperiences/webApplications/feature-file-inherit-route-add/src/about.tsx +8 -0
- package/test/e2e/fixtures/basic-operations/feature-file-inherit-route-add/template/digitalExperiences/webApplications/feature-file-inherit-route-add/src/routes.tsx +17 -0
- package/test/e2e/fixtures/basic-operations/feature-file-prepend-append/feature.ts +10 -0
- package/test/e2e/fixtures/basic-operations/feature-file-prepend-append/template/digitalExperiences/webApplications/feature-file-prepend-append/src/__inherit__appLayout.tsx +27 -0
- package/test/e2e/fixtures/basic-operations/feature-file-prepend-append/template/digitalExperiences/webApplications/feature-file-prepend-append/src/__prepend__index.tsx +2 -0
- package/test/e2e/fixtures/basic-operations/feature-file-prepend-append/template/digitalExperiences/webApplications/feature-file-prepend-append/src/routes.tsx +17 -0
- package/test/e2e/fixtures/basic-operations/feature-file-prepend-append/template/digitalExperiences/webApplications/feature-file-prepend-append/src/settings.tsx +9 -0
- package/test/e2e/fixtures/basic-operations/feature-file-prepend-append/template/digitalExperiences/webApplications/feature-file-prepend-append/src/styles/__append__global.css +10 -0
- package/test/e2e/fixtures/basic-operations/feature-file-route-delete/feature.ts +10 -0
- package/test/e2e/fixtures/basic-operations/feature-file-route-delete/template/digitalExperiences/webApplications/feature-file-route-delete/src/__delete__old-page.tsx +2 -0
- package/test/e2e/fixtures/basic-operations/feature-file-route-delete/template/digitalExperiences/webApplications/feature-file-route-delete/src/__inherit__appLayout.tsx +27 -0
- package/test/e2e/fixtures/basic-operations/feature-file-route-delete/template/digitalExperiences/webApplications/feature-file-route-delete/src/routes.tsx +16 -0
- package/test/e2e/fixtures/composition-5-features/5-features-about/feature.ts +3 -0
- package/test/e2e/fixtures/composition-5-features/5-features-about/template/digitalExperiences/webApplications/5-features-about/src/about.tsx +8 -0
- package/test/e2e/fixtures/composition-5-features/5-features-about/template/digitalExperiences/webApplications/5-features-about/src/routes.tsx +17 -0
- package/test/e2e/fixtures/composition-5-features/5-features-analytics/feature.ts +3 -0
- package/test/e2e/fixtures/composition-5-features/5-features-analytics/template/digitalExperiences/webApplications/5-features-analytics/src/__prepend__index.tsx +2 -0
- package/test/e2e/fixtures/composition-5-features/5-features-footer/feature.ts +3 -0
- package/test/e2e/fixtures/composition-5-features/5-features-footer/template/digitalExperiences/webApplications/5-features-footer/src/footer.tsx +7 -0
- package/test/e2e/fixtures/composition-5-features/5-features-footer/template/digitalExperiences/webApplications/5-features-footer/src/routes.tsx +17 -0
- package/test/e2e/fixtures/composition-5-features/5-features-navigation/feature.ts +3 -0
- package/test/e2e/fixtures/composition-5-features/5-features-navigation/template/digitalExperiences/webApplications/5-features-navigation/src/navigation.tsx +7 -0
- package/test/e2e/fixtures/composition-5-features/5-features-navigation/template/digitalExperiences/webApplications/5-features-navigation/src/routes.tsx +17 -0
- package/test/e2e/fixtures/composition-5-features/5-features-theme/feature.ts +3 -0
- package/test/e2e/fixtures/composition-5-features/5-features-theme/template/digitalExperiences/webApplications/5-features-theme/src/styles/__append__global.css +5 -0
- package/test/e2e/fixtures/composition-append/composition-append-1/feature.ts +10 -0
- package/test/e2e/fixtures/composition-append/composition-append-1/template/digitalExperiences/webApplications/composition-append-1/src/styles/__append__global.css +4 -0
- package/test/e2e/fixtures/composition-append/composition-append-2/feature.ts +10 -0
- package/test/e2e/fixtures/composition-append/composition-append-2/template/digitalExperiences/webApplications/composition-append-2/src/styles/__append__global.css +4 -0
- package/test/e2e/fixtures/composition-append/composition-append-3/feature.ts +10 -0
- package/test/e2e/fixtures/composition-append/composition-append-3/template/digitalExperiences/webApplications/composition-append-3/src/styles/__append__global.css +4 -0
- package/test/e2e/fixtures/composition-inherit-modify/composition-inherit-layout/feature.ts +3 -0
- package/test/e2e/fixtures/composition-inherit-modify/composition-inherit-layout/template/digitalExperiences/webApplications/composition-inherit-layout/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/composition-inherit-modify/composition-modify-layout/feature.ts +3 -0
- package/test/e2e/fixtures/composition-inherit-modify/composition-modify-layout/template/digitalExperiences/webApplications/composition-modify-layout/src/__append__appLayout.tsx +2 -0
- package/test/e2e/fixtures/composition-prepend/composition-prepend-1/feature.ts +10 -0
- package/test/e2e/fixtures/composition-prepend/composition-prepend-1/template/digitalExperiences/webApplications/composition-prepend-1/src/__prepend__index.tsx +2 -0
- package/test/e2e/fixtures/composition-prepend/composition-prepend-2/feature.ts +10 -0
- package/test/e2e/fixtures/composition-prepend/composition-prepend-2/template/digitalExperiences/webApplications/composition-prepend-2/src/__prepend__index.tsx +2 -0
- package/test/e2e/fixtures/composition-prepend/composition-prepend-3/feature.ts +10 -0
- package/test/e2e/fixtures/composition-prepend/composition-prepend-3/template/digitalExperiences/webApplications/composition-prepend-3/src/__prepend__index.tsx +2 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-a/feature.ts +11 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-a/template/digitalExperiences/webApplications/dep-chain-a/src/page-a.tsx +8 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-a/template/digitalExperiences/webApplications/dep-chain-a/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-b/feature.ts +11 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-b/template/digitalExperiences/webApplications/dep-chain-b/src/page-b.tsx +8 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-b/template/digitalExperiences/webApplications/dep-chain-b/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-c/feature.ts +11 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-c/template/digitalExperiences/webApplications/dep-chain-c/src/page-c.tsx +8 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-c/template/digitalExperiences/webApplications/dep-chain-c/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-d/feature.ts +10 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-d/template/digitalExperiences/webApplications/dep-chain-d/src/page-d.tsx +8 -0
- package/test/e2e/fixtures/dep-chain-long/dep-chain-d/template/digitalExperiences/webApplications/dep-chain-d/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-circular/dep-circular-a/feature.ts +11 -0
- package/test/e2e/fixtures/dep-circular/dep-circular-a/template/digitalExperiences/webApplications/dep-circular-a/src/page-a.tsx +8 -0
- package/test/e2e/fixtures/dep-circular/dep-circular-b/feature.ts +11 -0
- package/test/e2e/fixtures/dep-circular/dep-circular-b/template/digitalExperiences/webApplications/dep-circular-b/src/page-b.tsx +8 -0
- package/test/e2e/fixtures/dep-complex-graph/README.md +119 -0
- package/test/e2e/fixtures/dep-complex-graph/create-placeholders.sh +25 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-auth/feature.ts +14 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-auth/template/digitalExperiences/webApplications/dep-complex-graph-auth/src/__delete__old-page.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-auth/template/digitalExperiences/webApplications/dep-complex-graph-auth/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-auth/template/digitalExperiences/webApplications/dep-complex-graph-auth/src/login.tsx +8 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-auth/template/digitalExperiences/webApplications/dep-complex-graph-auth/src/routes.tsx +29 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-auth/template/digitalExperiences/webApplications/dep-complex-graph-auth/src/signup.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-dashboard/feature.ts +14 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-dashboard/template/digitalExperiences/webApplications/dep-complex-graph-dashboard/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-dashboard/template/digitalExperiences/webApplications/dep-complex-graph-dashboard/src/analytics.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-dashboard/template/digitalExperiences/webApplications/dep-complex-graph-dashboard/src/dashboard.tsx +8 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-dashboard/template/digitalExperiences/webApplications/dep-complex-graph-dashboard/src/reports.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-dashboard/template/digitalExperiences/webApplications/dep-complex-graph-dashboard/src/routes.tsx +32 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-profile/feature.ts +14 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-profile/template/digitalExperiences/webApplications/dep-complex-graph-profile/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-profile/template/digitalExperiences/webApplications/dep-complex-graph-profile/src/profile-edit.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-profile/template/digitalExperiences/webApplications/dep-complex-graph-profile/src/profile.tsx +8 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-profile/template/digitalExperiences/webApplications/dep-complex-graph-profile/src/routes.tsx +26 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-components/feature.ts +14 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-components/template/digitalExperiences/webApplications/dep-complex-graph-shared-components/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-components/template/digitalExperiences/webApplications/dep-complex-graph-shared-components/src/components.tsx +8 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-components/template/digitalExperiences/webApplications/dep-complex-graph-shared-components/src/routes.tsx +18 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-types/feature.ts +10 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-types/template/digitalExperiences/webApplications/dep-complex-graph-shared-types/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-types/template/digitalExperiences/webApplications/dep-complex-graph-shared-types/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-types/template/digitalExperiences/webApplications/dep-complex-graph-shared-types/src/types.tsx +8 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-utils/feature.ts +10 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-utils/template/digitalExperiences/webApplications/dep-complex-graph-shared-utils/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-utils/template/digitalExperiences/webApplications/dep-complex-graph-shared-utils/src/routes.tsx +18 -0
- package/test/e2e/fixtures/dep-complex-graph/dep-complex-graph-shared-utils/template/digitalExperiences/webApplications/dep-complex-graph-shared-utils/src/tools.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/feature.ts +15 -0
- package/test/e2e/fixtures/dep-complex-graph/template/digitalExperiences/webApplications/dep-complex-graph/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/template/digitalExperiences/webApplications/dep-complex-graph/src/admin-dashboard.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/template/digitalExperiences/webApplications/dep-complex-graph/src/admin-layout.tsx +1 -0
- package/test/e2e/fixtures/dep-complex-graph/template/digitalExperiences/webApplications/dep-complex-graph/src/routes.tsx +24 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-left/feature.ts +11 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-left/template/digitalExperiences/webApplications/dep-diamond-left/src/left-page.tsx +8 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-left/template/digitalExperiences/webApplications/dep-diamond-left/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-right/feature.ts +11 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-right/template/digitalExperiences/webApplications/dep-diamond-right/src/right-page.tsx +8 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-right/template/digitalExperiences/webApplications/dep-diamond-right/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-shared/feature.ts +10 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-shared/template/digitalExperiences/webApplications/dep-diamond-shared/src/routes.tsx +17 -0
- package/test/e2e/fixtures/dep-diamond/dep-diamond-shared/template/digitalExperiences/webApplications/dep-diamond-shared/src/shared-utils.tsx +8 -0
- package/test/e2e/fixtures/edges/edge-binary-files/feature.ts +13 -0
- package/test/e2e/fixtures/edges/edge-binary-files/template/digitalExperiences/webApplications/edge-binary-files/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/edges/edge-binary-files/template/digitalExperiences/webApplications/edge-binary-files/src/assets/test-image.png +0 -0
- package/test/e2e/fixtures/edges/edge-binary-files/template/digitalExperiences/webApplications/edge-binary-files/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/edges/edge-conflicting-prefixes/feature.ts +13 -0
- package/test/e2e/fixtures/edges/edge-conflicting-prefixes/template/digitalExperiences/webApplications/edge-conflicting-prefixes/src/__inherit____delete__conflicting.tsx +5 -0
- package/test/e2e/fixtures/edges/edge-conflicting-prefixes/template/digitalExperiences/webApplications/edge-conflicting-prefixes/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/edges/edge-empty-feature/feature.ts +16 -0
- package/test/e2e/fixtures/edges/edge-empty-feature/template/digitalExperiences/webApplications/edge-empty-feature/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/edges/edge-invalid-routes/feature.ts +12 -0
- package/test/e2e/fixtures/edges/edge-invalid-routes/template/digitalExperiences/webApplications/edge-invalid-routes/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/edges/edge-invalid-routes/template/digitalExperiences/webApplications/edge-invalid-routes/src/routes.tsx +8 -0
- package/test/e2e/fixtures/edges/edge-line-endings/feature.ts +13 -0
- package/test/e2e/fixtures/edges/edge-line-endings/template/digitalExperiences/webApplications/edge-line-endings/src/__prepend__index.tsx +2 -0
- package/test/e2e/fixtures/edges/edge-line-endings/template/digitalExperiences/webApplications/edge-line-endings/src/crlf.tsx +4 -0
- package/test/e2e/fixtures/edges/edge-line-endings/template/digitalExperiences/webApplications/edge-line-endings/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/edges/edge-line-endings/template/digitalExperiences/webApplications/edge-line-endings/src/styles/__append__global.css +4 -0
- package/test/e2e/fixtures/edges/edge-missing-base-files/feature.ts +13 -0
- package/test/e2e/fixtures/edges/edge-missing-base-files/template/digitalExperiences/webApplications/edge-missing-base-files/src/__inherit__missing.tsx +1 -0
- package/test/e2e/fixtures/edges/edge-missing-base-files/template/digitalExperiences/webApplications/edge-missing-base-files/src/__prepend__nonexistent.tsx +2 -0
- package/test/e2e/fixtures/edges/edge-missing-base-files/template/digitalExperiences/webApplications/edge-missing-base-files/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/edges/edge-package-json-conflicts-a/feature.ts +14 -0
- package/test/e2e/fixtures/edges/edge-package-json-conflicts-a/template/digitalExperiences/webApplications/edge-package-json-conflicts-a/src/placeholder.tsx +1 -0
- package/test/e2e/fixtures/edges/edge-package-json-conflicts-b/feature.ts +14 -0
- package/test/e2e/fixtures/edges/edge-package-json-conflicts-b/template/digitalExperiences/webApplications/edge-package-json-conflicts-b/src/placeholder.tsx +1 -0
- package/test/e2e/fixtures/edges/edge-performance-many/feature.ts +26 -0
- package/test/e2e/fixtures/edges/edge-performance-many/template/digitalExperiences/webApplications/edge-performance-many/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/path-mappings/feature-custom-mapping/feature.ts +16 -0
- package/test/e2e/fixtures/path-mappings/feature-custom-mapping/template/web/src/custom-component.tsx +3 -0
- package/test/e2e/fixtures/path-mappings/feature-custom-mapping/template/web/src/routes.tsx +8 -0
- package/test/e2e/fixtures/path-mappings/feature-mixed-paths/feature.ts +7 -0
- package/test/e2e/fixtures/path-mappings/feature-mixed-paths/template/digitalExperiences/webApplications/feature-mixed-paths/assets/icon.svg +3 -0
- package/test/e2e/fixtures/path-mappings/feature-mixed-paths/template/webApp/src/mapped-component.tsx +3 -0
- package/test/e2e/fixtures/path-mappings/feature-mixed-paths/template/webApp/src/routes.tsx +8 -0
- package/test/e2e/fixtures/path-mappings/feature-with-webapp-mapping/feature.ts +7 -0
- package/test/e2e/fixtures/path-mappings/feature-with-webapp-mapping/template/webApp/src/app.tsx +3 -0
- package/test/e2e/fixtures/path-mappings/feature-with-webapp-mapping/template/webApp/src/routes.tsx +8 -0
- package/test/e2e/fixtures/path-mappings/feature-without-mapping/feature.ts +11 -0
- package/test/e2e/fixtures/path-mappings/feature-without-mapping/template/digitalExperiences/webApplications/feature-without-mapping/src/legacy-component.tsx +3 -0
- package/test/e2e/fixtures/path-mappings/feature-without-mapping/template/digitalExperiences/webApplications/feature-without-mapping/src/routes.tsx +8 -0
- package/test/e2e/fixtures/scenarios/scenario-authentication/feature.ts +10 -0
- package/test/e2e/fixtures/scenarios/scenario-authentication/template/digitalExperiences/webApplications/scenario-authentication/src/components/LoginForm.tsx +25 -0
- package/test/e2e/fixtures/scenarios/scenario-authentication/template/digitalExperiences/webApplications/scenario-authentication/src/context/AuthContext.tsx +28 -0
- package/test/e2e/fixtures/scenarios/scenario-authentication/template/digitalExperiences/webApplications/scenario-authentication/src/login.tsx +10 -0
- package/test/e2e/fixtures/scenarios/scenario-authentication/template/digitalExperiences/webApplications/scenario-authentication/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/scenarios/scenario-authentication/template/digitalExperiences/webApplications/scenario-authentication/src/routes.tsx +17 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/feature.ts +11 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/components/ContactDetail.tsx +54 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/components/ContactForm.tsx +146 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/components/ContactList.tsx +77 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/routes.tsx +36 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/styles/__append__global.css +176 -0
- package/test/e2e/fixtures/scenarios/scenario-crud-contacts/template/digitalExperiences/webApplications/scenario-crud-contacts/src/utils/contactsApi.ts +42 -0
- package/test/e2e/fixtures/scenarios/scenario-navigation-menu/feature.ts +10 -0
- package/test/e2e/fixtures/scenarios/scenario-navigation-menu/template/digitalExperiences/webApplications/scenario-navigation-menu/src/__append__appLayout.tsx +4 -0
- package/test/e2e/fixtures/scenarios/scenario-navigation-menu/template/digitalExperiences/webApplications/scenario-navigation-menu/src/components/NavigationMenu.tsx +17 -0
- package/test/e2e/fixtures/scenarios/scenario-navigation-menu/template/digitalExperiences/webApplications/scenario-navigation-menu/src/placeholder.tsx +0 -0
- package/test/e2e/fixtures/single-operations/feature-file-append/feature.ts +10 -0
- package/test/e2e/fixtures/single-operations/feature-file-append/template/digitalExperiences/webApplications/feature-file-append/src/styles/__append__global.css +10 -0
- package/test/e2e/fixtures/single-operations/feature-file-inherit/feature.ts +10 -0
- package/test/e2e/fixtures/single-operations/feature-file-inherit/template/digitalExperiences/webApplications/feature-file-inherit/src/__inherit__appLayout.tsx +1 -0
- package/test/e2e/fixtures/single-operations/feature-file-inherit/template/digitalExperiences/webApplications/feature-file-inherit/src/__inherit__home.tsx +1 -0
- package/test/e2e/fixtures/single-operations/feature-file-prepend/feature.ts +10 -0
- package/test/e2e/fixtures/single-operations/feature-file-prepend/template/digitalExperiences/webApplications/feature-file-prepend/src/__prepend__index.tsx +2 -0
- package/test/e2e/fixtures/single-operations/feature-import-merge/feature.ts +10 -0
- package/test/e2e/fixtures/single-operations/feature-import-merge/template/digitalExperiences/webApplications/feature-import-merge/src/routes.tsx +18 -0
- package/test/e2e/fixtures/single-operations/feature-import-merge/template/digitalExperiences/webApplications/feature-import-merge/src/settings.tsx +8 -0
- package/test/e2e/fixtures/single-operations/feature-route-add/feature.ts +10 -0
- package/test/e2e/fixtures/single-operations/feature-route-add/template/digitalExperiences/webApplications/feature-route-add/src/about.tsx +8 -0
- package/test/e2e/fixtures/single-operations/feature-route-add/template/digitalExperiences/webApplications/feature-route-add/src/routes.tsx +23 -0
- package/test/e2e/fixtures/single-operations/feature-route-add/template/digitalExperiences/webApplications/feature-route-add/src/services.tsx +8 -0
- package/test/e2e/fixtures/watch/watch-add-delete-files/feature.ts +13 -0
- package/test/e2e/fixtures/watch/watch-add-delete-files/template/digitalExperiences/webApplications/watch-add-delete-files/src/initial.tsx +4 -0
- package/test/e2e/fixtures/watch/watch-add-delete-files/template/digitalExperiences/webApplications/watch-add-delete-files/src/placeholder.tsx +4 -0
- package/test/e2e/fixtures/watch/watch-basic/feature.ts +13 -0
- package/test/e2e/fixtures/watch/watch-basic/template/digitalExperiences/webApplications/watch-basic/src/placeholder.tsx +4 -0
- package/test/e2e/fixtures/watch/watch-basic/template/digitalExperiences/webApplications/watch-basic/src/watchTest.tsx +3 -0
- package/test/e2e/fixtures/watch/watch-debounce/feature.ts +13 -0
- package/test/e2e/fixtures/watch/watch-debounce/template/digitalExperiences/webApplications/watch-debounce/src/placeholder.tsx +4 -0
- package/test/e2e/fixtures/watch/watch-multiple-files/feature.ts +13 -0
- package/test/e2e/fixtures/watch/watch-multiple-files/template/digitalExperiences/webApplications/watch-multiple-files/src/components/WatchComponent.tsx +3 -0
- package/test/e2e/fixtures/watch/watch-multiple-files/template/digitalExperiences/webApplications/watch-multiple-files/src/placeholder.tsx +4 -0
- package/test/e2e/fixtures/watch/watch-multiple-files/template/digitalExperiences/webApplications/watch-multiple-files/src/styles/theme.css +4 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/package.json +10 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/about.tsx +8 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/appLayout.tsx +27 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/contact.tsx +8 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/home.tsx +8 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/index.tsx +10 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/old-page.tsx +8 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/routes.tsx +35 -0
- package/test/e2e/gold/dep-chain-linear-apply/digitalExperiences/webApplications/dep-chain-linear/src/styles/global.css +14 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/package.json +10 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/appLayout.tsx +27 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/home.tsx +8 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/index.tsx +10 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/old-page.tsx +8 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/page-a.tsx +8 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/page-b.tsx +8 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/page-c.tsx +8 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/page-d.tsx +8 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/routes.tsx +47 -0
- package/test/e2e/gold/dep-chain-long-apply/digitalExperiences/webApplications/dep-chain-a/src/styles/global.css +14 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/package.json +10 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/admin-dashboard.tsx +1 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/admin-layout.tsx +1 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/analytics.tsx +1 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/appLayout.tsx +27 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/components.tsx +8 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/dashboard.tsx +8 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/home.tsx +8 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/index.tsx +10 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/login.tsx +8 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/profile-edit.tsx +1 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/profile.tsx +8 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/reports.tsx +1 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/routes.tsx +94 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/signup.tsx +1 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/styles/global.css +14 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/tools.tsx +1 -0
- package/test/e2e/gold/dep-complex-graph-apply/digitalExperiences/webApplications/dep-complex-graph/src/types.tsx +8 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/package.json +10 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/src/appLayout.tsx +27 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/src/custom-component.tsx +3 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/src/home.tsx +8 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/src/index.tsx +10 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/src/old-page.tsx +8 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/src/routes.tsx +28 -0
- package/test/e2e/gold/feature-custom-mapping-apply/digitalExperiences/webApplications/feature-custom-mapping/src/styles/global.css +14 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/package.json +10 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/src/about.tsx +8 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/src/appLayout.tsx +27 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/src/home.tsx +8 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/src/index.tsx +10 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/src/old-page.tsx +8 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/src/routes.tsx +29 -0
- package/test/e2e/gold/feature-file-inherit-route-add-apply/digitalExperiences/webApplications/feature-file-inherit-route-add/src/styles/global.css +14 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/package.json +10 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/src/appLayout.tsx +27 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/src/home.tsx +8 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/src/index.tsx +13 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/src/old-page.tsx +8 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/src/routes.tsx +29 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/src/settings.tsx +9 -0
- package/test/e2e/gold/feature-file-prepend-append-apply/digitalExperiences/webApplications/feature-file-prepend-append/src/styles/global.css +25 -0
- package/test/e2e/gold/feature-file-route-delete-apply/digitalExperiences/webApplications/feature-file-route-delete/package.json +10 -0
- package/test/e2e/gold/feature-file-route-delete-apply/digitalExperiences/webApplications/feature-file-route-delete/src/appLayout.tsx +27 -0
- package/test/e2e/gold/feature-file-route-delete-apply/digitalExperiences/webApplications/feature-file-route-delete/src/home.tsx +8 -0
- package/test/e2e/gold/feature-file-route-delete-apply/digitalExperiences/webApplications/feature-file-route-delete/src/index.tsx +10 -0
- package/test/e2e/gold/feature-file-route-delete-apply/digitalExperiences/webApplications/feature-file-route-delete/src/routes.tsx +17 -0
- package/test/e2e/gold/feature-file-route-delete-apply/digitalExperiences/webApplications/feature-file-route-delete/src/styles/global.css +14 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/assets/icon.svg +3 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/package.json +10 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/src/appLayout.tsx +27 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/src/home.tsx +8 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/src/index.tsx +10 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/src/mapped-component.tsx +3 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/src/old-page.tsx +8 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/src/routes.tsx +28 -0
- package/test/e2e/gold/feature-mixed-paths-apply/digitalExperiences/webApplications/feature-mixed-paths/src/styles/global.css +14 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/package.json +10 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/src/app.tsx +3 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/src/appLayout.tsx +27 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/src/home.tsx +8 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/src/index.tsx +10 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/src/old-page.tsx +8 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/src/routes.tsx +28 -0
- package/test/e2e/gold/feature-with-webapp-mapping-apply/digitalExperiences/webApplications/feature-with-webapp-mapping/src/styles/global.css +14 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/package.json +10 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/src/appLayout.tsx +27 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/src/home.tsx +8 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/src/index.tsx +10 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/src/legacy-component.tsx +3 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/src/old-page.tsx +8 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/src/routes.tsx +28 -0
- package/test/e2e/gold/feature-without-mapping-apply/digitalExperiences/webApplications/feature-without-mapping/src/styles/global.css +14 -0
- package/test/e2e/path-mappings.spec.ts +232 -0
- package/test/e2e/watch-patches.spec.ts +237 -0
- package/test/helpers/cli-runner.ts +100 -0
- package/test/helpers/compare-directories.ts +197 -0
- package/test/helpers/create-temp-dir.ts +34 -0
- package/test/helpers/fixtures.ts +67 -0
- package/test/setup.ts +6 -0
- package/test/unit/debounce.spec.ts +159 -0
- package/test/unit/dependency-resolver.spec.ts +260 -0
- package/test/unit/file-operations.spec.ts +264 -0
- package/test/unit/import-merger.spec.ts +395 -0
- package/test/unit/index.spec.ts +158 -0
- package/test/unit/new-app.spec.ts +178 -0
- package/test/unit/new-feature.spec.ts +178 -0
- package/test/unit/package-json-merger.spec.ts +275 -0
- package/test/unit/patch-loader.spec.ts +238 -0
- package/test/unit/path-mappings.spec.ts +241 -0
- package/test/unit/paths.spec.ts +247 -0
- package/test/unit/route-merger.spec.ts +265 -0
- package/test/unit/validation.spec.ts +311 -0
- package/tsconfig.json +20 -0
- package/vitest.config.ts +18 -0
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
# E2E Test Fixtures and Gold Files - Current State
|
|
2
|
+
|
|
3
|
+
**Last Updated:** 2025-12-15
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
This document provides a comprehensive, accurate summary of all E2E test fixtures, test cases, and gold files in `packages/cli/test/e2e/`.
|
|
8
|
+
|
|
9
|
+
### Quick Stats
|
|
10
|
+
|
|
11
|
+
- **Total Fixtures:** 55 feature fixtures + 1 base app = 56 total
|
|
12
|
+
- **Test Suites:** 16 describe blocks
|
|
13
|
+
- **Test Cases:** 36 individual tests
|
|
14
|
+
- **Gold File Directories:** 6
|
|
15
|
+
- **Fixture Categories:** 13
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Directory Structure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
packages/cli/test/e2e/
|
|
23
|
+
├── apply-patches.spec.ts # Main test file (36 tests)
|
|
24
|
+
├── E2E_TEST_FIXTURES.md # This file
|
|
25
|
+
├── fixtures/ # All test fixtures (56 total)
|
|
26
|
+
│ ├── base-app/ # Base React app (1)
|
|
27
|
+
│ ├── basic-operations/ # Renamed original fixtures (4)
|
|
28
|
+
│ ├── composition-5-features/ # Multi-feature composition (5)
|
|
29
|
+
│ ├── composition-append/ # Multiple append operations (3)
|
|
30
|
+
│ ├── composition-inherit-modify/# Inherit + modify pattern (2)
|
|
31
|
+
│ ├── composition-prepend/ # Multiple prepend operations (3)
|
|
32
|
+
│ ├── dep-chain-long/ # Long dependency chain (4)
|
|
33
|
+
│ ├── dep-circular/ # Circular dependency detection (2)
|
|
34
|
+
│ ├── dep-complex-graph/ # Complex multi-branch deps (7)
|
|
35
|
+
│ ├── dep-diamond/ # Diamond dependency pattern (3)
|
|
36
|
+
│ ├── edges/ # Edge cases and error handling (9)
|
|
37
|
+
│ ├── scenarios/ # Real-world feature scenarios (3)
|
|
38
|
+
│ ├── single-operations/ # Single operation tests (5)
|
|
39
|
+
│ └── watch/ # Watch mode tests (4)
|
|
40
|
+
└── gold/ # Expected output for regression tests (6)
|
|
41
|
+
├── dep-chain-linear-apply/
|
|
42
|
+
├── dep-chain-long-apply/
|
|
43
|
+
├── dep-complex-graph-apply/
|
|
44
|
+
├── feature-file-inherit-route-add-apply/
|
|
45
|
+
├── feature-file-prepend-append-apply/
|
|
46
|
+
└── feature-file-route-delete-apply/
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Fixture Categories
|
|
52
|
+
|
|
53
|
+
### 1. Base App (1 fixture)
|
|
54
|
+
|
|
55
|
+
**Location:** `fixtures/base-app/`
|
|
56
|
+
|
|
57
|
+
- **base-app** - Base React application used as the starting point for all tests
|
|
58
|
+
- Contains: `src/appLayout.tsx`, `src/home.tsx`, `src/old-page.tsx`, `src/routes.tsx`, `src/styles/global.css`, `package.json`
|
|
59
|
+
|
|
60
|
+
### 2. Basic Operations (4 fixtures)
|
|
61
|
+
|
|
62
|
+
**Location:** `fixtures/basic-operations/`
|
|
63
|
+
|
|
64
|
+
These are the original fixtures that were renamed for clarity:
|
|
65
|
+
|
|
66
|
+
- **dep-chain-linear** - Tests linear dependency resolution (depends on feature-file-inherit-route-add)
|
|
67
|
+
- Adds: `src/contact.tsx` and contact route
|
|
68
|
+
- Gold File: ✅ `dep-chain-linear-apply/`
|
|
69
|
+
|
|
70
|
+
- **feature-file-inherit-route-add** - Tests file inheritance (`__inherit__`) and route addition
|
|
71
|
+
- Adds: `src/about.tsx`, modifies `src/routes.tsx`
|
|
72
|
+
- Gold File: ✅ `feature-file-inherit-route-add-apply/`
|
|
73
|
+
|
|
74
|
+
- **feature-file-prepend-append** - Tests `__prepend__` and `__append__` operations
|
|
75
|
+
- Prepends to: `src/index.tsx`
|
|
76
|
+
- Appends to: `src/styles/global.css`
|
|
77
|
+
- Inherits: `src/appLayout.tsx`
|
|
78
|
+
- Adds: `src/settings.tsx`
|
|
79
|
+
- Gold File: ✅ `feature-file-prepend-append-apply/`
|
|
80
|
+
|
|
81
|
+
- **feature-file-route-delete** - Tests file and route deletion with `__delete__`
|
|
82
|
+
- Deletes: `src/old-page.tsx` and its route
|
|
83
|
+
- Gold File: ✅ `feature-file-route-delete-apply/`
|
|
84
|
+
|
|
85
|
+
### 3. Single Operations (5 fixtures)
|
|
86
|
+
|
|
87
|
+
**Location:** `fixtures/single-operations/`
|
|
88
|
+
|
|
89
|
+
Each fixture tests ONE specific CLI operation in isolation:
|
|
90
|
+
|
|
91
|
+
- **feature-file-append** - Only tests `__append__` prefix
|
|
92
|
+
- Appends to: `src/styles/global.css`
|
|
93
|
+
- Gold File: ❌ (test uses inline verification)
|
|
94
|
+
|
|
95
|
+
- **feature-file-inherit** - Only tests `__inherit__` prefix
|
|
96
|
+
- Inherits: `src/appLayout.tsx`, `src/home.tsx`
|
|
97
|
+
- Gold File: ❌ (test uses inline verification)
|
|
98
|
+
|
|
99
|
+
- **feature-file-prepend** - Only tests `__prepend__` prefix
|
|
100
|
+
- Prepends to: `src/index.tsx`
|
|
101
|
+
- Gold File: ❌ (test uses inline verification)
|
|
102
|
+
|
|
103
|
+
- **feature-import-merge** - Tests import statement merging
|
|
104
|
+
- Modifies: `src/routes.tsx` with merged imports
|
|
105
|
+
- Adds: `src/settings.tsx`
|
|
106
|
+
- Gold File: ❌ (test uses inline verification)
|
|
107
|
+
|
|
108
|
+
- **feature-route-add** - Only tests route addition
|
|
109
|
+
- Adds: `src/services.tsx` and service route
|
|
110
|
+
- Gold File: ❌ (test uses inline verification)
|
|
111
|
+
|
|
112
|
+
### 4. Dependency Resolution Tests
|
|
113
|
+
|
|
114
|
+
#### 4a. Long Chain (4 fixtures)
|
|
115
|
+
|
|
116
|
+
**Location:** `fixtures/dep-chain-long/`
|
|
117
|
+
|
|
118
|
+
Tests deep dependency chains: A → B → C → D
|
|
119
|
+
|
|
120
|
+
- **dep-chain-a** - Top of chain (depends on dep-chain-b)
|
|
121
|
+
- Adds: `src/page-a.tsx`
|
|
122
|
+
- **dep-chain-b** - Second level (depends on dep-chain-c)
|
|
123
|
+
- Adds: `src/page-b.tsx`
|
|
124
|
+
- **dep-chain-c** - Third level (depends on dep-chain-d)
|
|
125
|
+
- Adds: `src/page-c.tsx`
|
|
126
|
+
- **dep-chain-d** - Base of chain (no dependencies)
|
|
127
|
+
- Adds: `src/page-d.tsx`
|
|
128
|
+
- Gold File: ✅ `dep-chain-long-apply/`
|
|
129
|
+
|
|
130
|
+
#### 4b. Diamond Pattern (3 fixtures)
|
|
131
|
+
|
|
132
|
+
**Location:** `fixtures/dep-diamond/`
|
|
133
|
+
|
|
134
|
+
Tests shared dependencies: left → shared ← right
|
|
135
|
+
|
|
136
|
+
- **dep-diamond-shared** - Shared base dependency
|
|
137
|
+
- Adds: `src/shared-utils.tsx`
|
|
138
|
+
- **dep-diamond-left** - Left branch (depends on shared)
|
|
139
|
+
- Adds: `src/left-page.tsx`
|
|
140
|
+
- **dep-diamond-right** - Right branch (depends on shared)
|
|
141
|
+
- Adds: `src/right-page.tsx`
|
|
142
|
+
- Gold File: ❌ (test verifies both branches separately)
|
|
143
|
+
|
|
144
|
+
#### 4c. Circular Dependencies (2 fixtures)
|
|
145
|
+
|
|
146
|
+
**Location:** `fixtures/dep-circular/`
|
|
147
|
+
|
|
148
|
+
Tests circular dependency detection and error handling:
|
|
149
|
+
|
|
150
|
+
- **dep-circular-a** - Depends on dep-circular-b
|
|
151
|
+
- **dep-circular-b** - Depends on dep-circular-a (creates cycle)
|
|
152
|
+
- Gold File: ❌ (test expects error/rejection)
|
|
153
|
+
|
|
154
|
+
#### 4d. Complex Multi-Branch Graph (7 fixtures)
|
|
155
|
+
|
|
156
|
+
**Location:** `fixtures/dep-complex-graph/`
|
|
157
|
+
|
|
158
|
+
Tests complex dependency graph with multiple branches and transitive dependencies:
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
dep-complex-graph (parent)
|
|
162
|
+
├─→ dep-complex-graph-auth (depends on utils, types)
|
|
163
|
+
├─→ dep-complex-graph-dashboard (depends on utils, components)
|
|
164
|
+
└─→ dep-complex-graph-profile (depends on components, types)
|
|
165
|
+
|
|
166
|
+
Shared dependencies:
|
|
167
|
+
├─ dep-complex-graph-shared-utils
|
|
168
|
+
├─ dep-complex-graph-shared-types
|
|
169
|
+
└─ dep-complex-graph-shared-components (depends on utils + types)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
- **dep-complex-graph** - Parent/meta feature
|
|
173
|
+
- **dep-complex-graph-auth** - Auth feature with login, signup
|
|
174
|
+
- **dep-complex-graph-dashboard** - Dashboard with analytics, reports
|
|
175
|
+
- **dep-complex-graph-profile** - Profile with edit functionality
|
|
176
|
+
- **dep-complex-graph-shared-utils** - Shared utilities
|
|
177
|
+
- **dep-complex-graph-shared-types** - Shared types
|
|
178
|
+
- **dep-complex-graph-shared-components** - Shared components
|
|
179
|
+
- Gold File: ✅ `dep-complex-graph-apply/`
|
|
180
|
+
|
|
181
|
+
### 5. Composition Tests
|
|
182
|
+
|
|
183
|
+
Tests multiple features working together on the same codebase.
|
|
184
|
+
|
|
185
|
+
#### 5a. Multiple Appends (3 fixtures)
|
|
186
|
+
|
|
187
|
+
**Location:** `fixtures/composition-append/`
|
|
188
|
+
|
|
189
|
+
- **composition-append-1** - Appends CSS class 1 to `global.css`
|
|
190
|
+
- **composition-append-2** - Appends CSS class 2 to `global.css`
|
|
191
|
+
- **composition-append-3** - Appends CSS class 3 to `global.css`
|
|
192
|
+
- Gold File: ❌ (test applies sequentially and verifies each)
|
|
193
|
+
|
|
194
|
+
#### 5b. Multiple Prepends (3 fixtures)
|
|
195
|
+
|
|
196
|
+
**Location:** `fixtures/composition-prepend/`
|
|
197
|
+
|
|
198
|
+
- **composition-prepend-1** - Prepends code 1 to `index.tsx`
|
|
199
|
+
- **composition-prepend-2** - Prepends code 2 to `index.tsx`
|
|
200
|
+
- **composition-prepend-3** - Prepends code 3 to `index.tsx`
|
|
201
|
+
- Gold File: ❌ (test applies sequentially and verifies each)
|
|
202
|
+
|
|
203
|
+
#### 5c. Inherit Then Modify (2 fixtures)
|
|
204
|
+
|
|
205
|
+
**Location:** `fixtures/composition-inherit-modify/`
|
|
206
|
+
|
|
207
|
+
- **composition-inherit-layout** - Inherits `appLayout.tsx`
|
|
208
|
+
- **composition-modify-layout** - Appends to `appLayout.tsx`
|
|
209
|
+
- Gold File: ❌ (test verifies pattern works)
|
|
210
|
+
|
|
211
|
+
#### 5d. Five Features Together (5 fixtures)
|
|
212
|
+
|
|
213
|
+
**Location:** `fixtures/composition-5-features/`
|
|
214
|
+
|
|
215
|
+
Tests integration of 5 different features:
|
|
216
|
+
|
|
217
|
+
- **5-features-about** - Adds about page
|
|
218
|
+
- **5-features-analytics** - Adds analytics
|
|
219
|
+
- **5-features-footer** - Adds footer component
|
|
220
|
+
- **5-features-navigation** - Adds navigation
|
|
221
|
+
- **5-features-theme** - Adds theming
|
|
222
|
+
- Gold File: ❌ (test applies all and verifies existence)
|
|
223
|
+
|
|
224
|
+
### 6. Real-World Scenarios (3 fixtures)
|
|
225
|
+
|
|
226
|
+
**Location:** `fixtures/scenarios/`
|
|
227
|
+
|
|
228
|
+
Complete, production-ready feature implementations:
|
|
229
|
+
|
|
230
|
+
- **scenario-authentication** - Full authentication system
|
|
231
|
+
- Components: `AuthContext.tsx`, `LoginForm.tsx`, `login.tsx`
|
|
232
|
+
- Routes: Login route with auth context
|
|
233
|
+
- Gold File: ❌ (test verifies all components exist)
|
|
234
|
+
|
|
235
|
+
- **scenario-crud-contacts** - Complete CRUD contacts feature
|
|
236
|
+
- Components: `ContactList.tsx`, `ContactDetail.tsx`, `ContactForm.tsx`
|
|
237
|
+
- API: `contactsApi.ts` with mock CRUD operations
|
|
238
|
+
- Routes: Nested routes for `/contacts`, `/contacts/:id`, `/contacts/new`, `/contacts/:id/edit`
|
|
239
|
+
- Styles: Contact list and form styling
|
|
240
|
+
- Gold File: ❌ (test verifies all components and routes)
|
|
241
|
+
|
|
242
|
+
- **scenario-navigation-menu** - Dynamic navigation menu
|
|
243
|
+
- Components: `NavigationMenu.tsx`
|
|
244
|
+
- Modifies: `appLayout.tsx` to include navigation
|
|
245
|
+
- Gold File: ❌ (test verifies component exists and integration)
|
|
246
|
+
|
|
247
|
+
### 7. Edge Cases (9 fixtures)
|
|
248
|
+
|
|
249
|
+
**Location:** `fixtures/edges/`
|
|
250
|
+
|
|
251
|
+
Tests error handling, validation, and edge cases:
|
|
252
|
+
|
|
253
|
+
- **edge-binary-files** - Tests copying binary files (PNG images) with `__inherit__`
|
|
254
|
+
- Gold File: ❌ (test verifies binary file copied correctly)
|
|
255
|
+
|
|
256
|
+
- **edge-conflicting-prefixes** - Tests validation catches conflicting prefixes (`__inherit__` + `__delete__`)
|
|
257
|
+
- Gold File: ❌ (test expects error)
|
|
258
|
+
|
|
259
|
+
- **edge-empty-feature** - Tests "meta-feature" with only dependencies, no template files
|
|
260
|
+
- Gold File: ❌ (test verifies dependencies applied)
|
|
261
|
+
|
|
262
|
+
- **edge-invalid-routes** - Tests validation of route operations (deleting non-existent routes)
|
|
263
|
+
- Gold File: ❌ (test expects error)
|
|
264
|
+
|
|
265
|
+
- **edge-line-endings** - Tests CRLF vs LF line ending handling in prepend/append
|
|
266
|
+
- Gold File: ❌ (test verifies no content corruption)
|
|
267
|
+
|
|
268
|
+
- **edge-missing-base-files** - Tests error when trying to prepend/append/inherit non-existent files
|
|
269
|
+
- Gold File: ❌ (test expects error)
|
|
270
|
+
|
|
271
|
+
- **edge-package-json-conflicts-a** - Feature with `react@18.0.0`
|
|
272
|
+
- **edge-package-json-conflicts-b** - Feature with `react@18.2.0` (creates conflict)
|
|
273
|
+
- Gold File: ❌ (test expects version conflict error)
|
|
274
|
+
|
|
275
|
+
- **edge-performance-many** - Tests performance with 12 features applied together
|
|
276
|
+
- Gold File: ❌ (test verifies completion under 5 seconds)
|
|
277
|
+
|
|
278
|
+
### 8. Watch Mode (4 fixtures)
|
|
279
|
+
|
|
280
|
+
**Location:** `fixtures/watch/`
|
|
281
|
+
|
|
282
|
+
Fixtures for watch mode testing (tests not yet implemented in apply-patches.spec.ts):
|
|
283
|
+
|
|
284
|
+
- **watch-add-delete-files** - Tests file addition/deletion detection
|
|
285
|
+
- **watch-basic** - Basic watch mode test
|
|
286
|
+
- **watch-debounce** - Tests debouncing of rapid changes
|
|
287
|
+
- **watch-multiple-files** - Tests watching changes across multiple files
|
|
288
|
+
|
|
289
|
+
**Note:** These fixtures exist but corresponding tests are not yet implemented in `apply-patches.spec.ts`.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Test Suites (16 total)
|
|
294
|
+
|
|
295
|
+
Test suites are organized in `apply-patches.spec.ts`:
|
|
296
|
+
|
|
297
|
+
1. **Simple feature application** (2 tests)
|
|
298
|
+
- Basic feature apply
|
|
299
|
+
- File existence verification
|
|
300
|
+
|
|
301
|
+
2. **File deletion** (2 tests)
|
|
302
|
+
- Delete files with `__delete__`
|
|
303
|
+
- Clean up imports from deleted files
|
|
304
|
+
|
|
305
|
+
3. **Route deletion** (1 test)
|
|
306
|
+
- Delete routes marked with `__delete__`
|
|
307
|
+
|
|
308
|
+
4. **Dependency resolution** (1 test)
|
|
309
|
+
- Apply features in dependency order
|
|
310
|
+
|
|
311
|
+
5. **Complex operations** (2 tests)
|
|
312
|
+
- Handle `__inherit__`, `__prepend__`, `__append__`
|
|
313
|
+
- Verify inherited files
|
|
314
|
+
|
|
315
|
+
6. **Error handling** (2 tests)
|
|
316
|
+
- Non-existent feature path
|
|
317
|
+
- Delete non-existent file
|
|
318
|
+
|
|
319
|
+
7. **Idempotency** (1 test)
|
|
320
|
+
- Apply patches multiple times safely
|
|
321
|
+
|
|
322
|
+
8. **Long dependency chains** (1 test)
|
|
323
|
+
- A → B → C → D chain resolution
|
|
324
|
+
|
|
325
|
+
9. **Diamond dependencies** (1 test)
|
|
326
|
+
- Shared dependency applied once
|
|
327
|
+
|
|
328
|
+
10. **Circular dependencies** (1 test)
|
|
329
|
+
- Detect and reject circular deps
|
|
330
|
+
|
|
331
|
+
11. **Complex dependency graph** (1 test)
|
|
332
|
+
- Multi-branch with transitive deps
|
|
333
|
+
|
|
334
|
+
12. **Phase 2: Single feature tests** (5 tests)
|
|
335
|
+
- Prepend-only
|
|
336
|
+
- Append-only
|
|
337
|
+
- Route-add
|
|
338
|
+
- Inherit-only
|
|
339
|
+
- Import-merge
|
|
340
|
+
|
|
341
|
+
13. **Phase 4: Composition tests** (5 tests)
|
|
342
|
+
- Multiple appends to same file
|
|
343
|
+
- Multiple prepends to same file
|
|
344
|
+
- Five features together
|
|
345
|
+
- Inherit then modify
|
|
346
|
+
- Multiple prepends in order
|
|
347
|
+
|
|
348
|
+
14. **Phase 5: Real-world scenarios** (3 tests)
|
|
349
|
+
- Navigation menu feature
|
|
350
|
+
- Authentication feature
|
|
351
|
+
- CRUD contacts feature
|
|
352
|
+
|
|
353
|
+
15. **Phase 6: Edge cases** (9 tests)
|
|
354
|
+
- Empty feature with dependencies
|
|
355
|
+
- Conflicting prefixes
|
|
356
|
+
- Missing base files
|
|
357
|
+
- Package.json version conflicts
|
|
358
|
+
- Invalid route operations
|
|
359
|
+
- Binary files
|
|
360
|
+
- Line endings (CRLF vs LF)
|
|
361
|
+
- Performance with many features
|
|
362
|
+
|
|
363
|
+
**Total: 36 test cases**
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## Gold Files (6 directories)
|
|
368
|
+
|
|
369
|
+
Gold files provide expected output for regression testing. When tests run with `UPDATE_GOLD=1`, they regenerate these files.
|
|
370
|
+
|
|
371
|
+
### Existing Gold Files
|
|
372
|
+
|
|
373
|
+
1. **dep-chain-linear-apply/** - Expected output for linear dependency chain
|
|
374
|
+
2. **dep-chain-long-apply/** - Expected output for long dependency chain (A→B→C→D)
|
|
375
|
+
3. **dep-complex-graph-apply/** - Expected output for complex dependency graph
|
|
376
|
+
4. **feature-file-inherit-route-add-apply/** - Expected output for inherit + route add
|
|
377
|
+
5. **feature-file-prepend-append-apply/** - Expected output for prepend + append
|
|
378
|
+
6. **feature-file-route-delete-apply/** - Expected output for file/route deletion
|
|
379
|
+
|
|
380
|
+
### Gold Files Not Yet Created
|
|
381
|
+
|
|
382
|
+
The following tests could benefit from gold files but currently use inline assertions:
|
|
383
|
+
|
|
384
|
+
- Single operation tests (5 tests)
|
|
385
|
+
- Diamond dependency tests
|
|
386
|
+
- Composition tests (multiple appends, prepends, etc.)
|
|
387
|
+
- Real-world scenario tests (3 tests)
|
|
388
|
+
- Edge case tests (most use error assertions)
|
|
389
|
+
|
|
390
|
+
---
|
|
391
|
+
|
|
392
|
+
## Test Execution
|
|
393
|
+
|
|
394
|
+
### Run All Tests
|
|
395
|
+
|
|
396
|
+
```bash
|
|
397
|
+
cd packages/cli
|
|
398
|
+
npm test apply-patches.spec.ts
|
|
399
|
+
# or
|
|
400
|
+
yarn test apply-patches.spec.ts
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Update/Generate Gold Files
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
cd packages/cli
|
|
407
|
+
UPDATE_GOLD=1 npm test apply-patches.spec.ts
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### Run Specific Test Suite
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
cd packages/cli
|
|
414
|
+
npm test apply-patches.spec.ts -t "Complex dependency graph"
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Run Specific Test
|
|
418
|
+
|
|
419
|
+
```bash
|
|
420
|
+
cd packages/cli
|
|
421
|
+
npm test apply-patches.spec.ts -t "should apply a simple feature correctly"
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## Coverage Analysis
|
|
427
|
+
|
|
428
|
+
### What's Well Tested ✅
|
|
429
|
+
|
|
430
|
+
- ✅ Basic file operations (inherit, prepend, append, delete)
|
|
431
|
+
- ✅ Route operations (add, delete, merge)
|
|
432
|
+
- ✅ Import merging
|
|
433
|
+
- ✅ Linear dependency chains
|
|
434
|
+
- ✅ Long dependency chains (4 levels)
|
|
435
|
+
- ✅ Diamond dependency patterns
|
|
436
|
+
- ✅ Circular dependency detection
|
|
437
|
+
- ✅ Complex multi-branch dependencies
|
|
438
|
+
- ✅ Feature composition (multiple features together)
|
|
439
|
+
- ✅ Real-world scenarios (auth, CRUD, navigation)
|
|
440
|
+
- ✅ Edge cases (binary files, line endings, performance)
|
|
441
|
+
- ✅ Error handling and validation
|
|
442
|
+
|
|
443
|
+
### What's Not Yet Tested ❌
|
|
444
|
+
|
|
445
|
+
- ❌ Watch mode functionality (fixtures exist, tests don't)
|
|
446
|
+
- ❌ Some edge cases may need additional gold files
|
|
447
|
+
- ❌ Package.json merging edge cases
|
|
448
|
+
- ❌ Concurrent feature application
|
|
449
|
+
|
|
450
|
+
### Gold File Coverage
|
|
451
|
+
|
|
452
|
+
- **With Gold Files:** 6/36 tests (17%)
|
|
453
|
+
- **Without Gold Files:** 30/36 tests (83%) - use inline assertions
|
|
454
|
+
|
|
455
|
+
**Note:** Most tests use inline assertions rather than gold files. This is intentional for tests that verify specific behaviors (errors, validation) rather than complete output snapshots.
|
|
456
|
+
|
|
457
|
+
---
|
|
458
|
+
|
|
459
|
+
## Fixture Naming Conventions
|
|
460
|
+
|
|
461
|
+
Fixtures follow consistent naming patterns:
|
|
462
|
+
|
|
463
|
+
- `basic-operations/` - Original fixtures, renamed for clarity
|
|
464
|
+
- `single-operations/feature-*` - Single operation tests
|
|
465
|
+
- `dep-*` - Dependency resolution tests
|
|
466
|
+
- `composition-*` - Multiple feature composition tests
|
|
467
|
+
- `scenario-*` - Real-world feature scenarios
|
|
468
|
+
- `edge-*` - Edge cases and error handling
|
|
469
|
+
- `watch-*` - Watch mode tests
|
|
470
|
+
- Numbers: `5-features-*`, `composition-append-1/2/3` - Sequential/grouped fixtures
|
|
471
|
+
|
|
472
|
+
---
|
|
473
|
+
|
|
474
|
+
## Adding New Fixtures
|
|
475
|
+
|
|
476
|
+
When adding new fixtures:
|
|
477
|
+
|
|
478
|
+
1. **Create fixture directory** in appropriate category
|
|
479
|
+
2. **Add `feature.ts`** with configuration and dependencies
|
|
480
|
+
3. **Add template files** in `template/digitalExperiences/webApplications/[feature-name]/`
|
|
481
|
+
4. **Add test case** in `apply-patches.spec.ts`
|
|
482
|
+
5. **Consider gold files** if testing complete output (not just specific behaviors)
|
|
483
|
+
6. **Update this document** with new fixture details
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Maintenance Notes
|
|
488
|
+
|
|
489
|
+
### Last Major Changes
|
|
490
|
+
|
|
491
|
+
- Restructured from 5 original fixtures to 55 organized fixtures
|
|
492
|
+
- Added comprehensive dependency resolution tests
|
|
493
|
+
- Added real-world scenario fixtures
|
|
494
|
+
- Added extensive edge case coverage
|
|
495
|
+
|
|
496
|
+
### Known Issues
|
|
497
|
+
|
|
498
|
+
- Watch mode fixtures exist but tests not implemented yet
|
|
499
|
+
- Some tests could benefit from gold files for better regression testing
|
|
500
|
+
- Package.json conflict testing is basic, could be expanded
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## References
|
|
505
|
+
|
|
506
|
+
- Main test file: `packages/cli/test/e2e/apply-patches.spec.ts`
|
|
507
|
+
- Fixtures: `packages/cli/test/e2e/fixtures/`
|
|
508
|
+
- Gold files: `packages/cli/test/e2e/gold/`
|
|
509
|
+
- Test helpers: `packages/cli/test/helpers/`
|