create-appraisejs 0.3.1-alpha.0 → 0.3.1-alpha.1
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 +17 -17
- package/dist/cli.e2e.test.d.ts +2 -2
- package/dist/cli.e2e.test.js +74 -72
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/config.test.d.ts +2 -2
- package/dist/config.test.js +64 -64
- package/dist/copy-template.test.d.ts +2 -2
- package/dist/copy-template.test.js +70 -70
- package/dist/download-repo.test.d.ts +2 -2
- package/dist/download-repo.test.js +15 -13
- package/dist/install.test.d.ts +2 -2
- package/dist/install.test.js +115 -114
- package/dist/prepare-template-utils.d.ts.map +1 -1
- package/dist/prepare-template-utils.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +2 -2
- package/dist/prompts.js.map +1 -1
- package/dist/prompts.test.d.ts +2 -2
- package/dist/prompts.test.js +54 -54
- package/dist/sync-templates-utils.d.ts.map +1 -1
- package/dist/sync-templates-utils.js +1 -5
- package/dist/sync-templates-utils.js.map +1 -1
- package/package.json +1 -1
- package/templates/blank/.editorconfig +11 -0
- package/templates/blank/.gitattributes +21 -0
- package/templates/blank/.gitconfig.appraise +14 -0
- package/templates/blank/.prettierrc +13 -0
- package/templates/blank/.vscode/settings.json +2 -0
- package/templates/blank/README.md +12 -12
- package/templates/blank/components.json +24 -24
- package/templates/blank/cucumber.mjs +16 -16
- package/templates/blank/e2e/README.md +56 -0
- package/templates/blank/e2e/apply-migrations.mjs +76 -0
- package/templates/blank/e2e/appraise-smoke.spec.ts +78 -0
- package/templates/blank/e2e/authoring.spec.ts +53 -0
- package/templates/blank/e2e/crud-configuration.spec.ts +138 -0
- package/templates/blank/e2e/crud-tests.spec.ts +76 -0
- package/templates/blank/e2e/helpers/forms.ts +186 -0
- package/templates/blank/e2e/helpers/navigation.ts +27 -0
- package/templates/blank/e2e/helpers/table.ts +45 -0
- package/templates/blank/e2e/helpers/test-data.ts +549 -0
- package/templates/blank/e2e/helpers/ui.ts +41 -0
- package/templates/blank/e2e/navigation.spec.ts +101 -0
- package/templates/blank/e2e/runs-and-reports.spec.ts +82 -0
- package/templates/blank/e2e/settings-sync.spec.ts +39 -0
- package/templates/blank/e2e/start-server.mjs +61 -0
- package/templates/blank/eslint.config.mjs +4 -4
- package/templates/blank/gitignore +0 -3
- package/templates/blank/next-env.d.ts +1 -1
- package/templates/blank/package-lock.json +58 -102
- package/templates/blank/package.json +10 -9
- package/templates/blank/packages/cucumber-runtime/package.json +13 -13
- package/templates/blank/packages/cucumber-runtime/src/cache.util.ts +93 -93
- package/templates/blank/packages/cucumber-runtime/src/cli.ts +77 -68
- package/templates/blank/packages/cucumber-runtime/src/environment.util.ts +21 -21
- package/templates/blank/packages/cucumber-runtime/src/executor.ts +32 -32
- package/templates/blank/packages/cucumber-runtime/src/index.ts +17 -17
- package/templates/blank/packages/cucumber-runtime/src/locator.util.ts +234 -234
- package/templates/blank/packages/cucumber-runtime/src/parameter-types.ts +7 -7
- package/templates/blank/packages/cucumber-runtime/src/random-data.util.ts +35 -35
- package/templates/blank/packages/cucumber-runtime/src/types.ts +13 -13
- package/templates/blank/packages/cucumber-runtime/src/world.ts +44 -44
- package/templates/blank/packages/cucumber-runtime/tsconfig.json +11 -11
- package/templates/blank/packages/locator-picker-companion/dist/cli.js +1 -1
- package/templates/blank/packages/locator-picker-companion/dist/index.d.ts +3 -3
- package/templates/blank/packages/locator-picker-companion/dist/index.js +3 -3
- package/templates/blank/packages/locator-picker-companion/dist/injected-picker-script.js +13 -3
- package/templates/blank/packages/locator-picker-companion/dist/selector-generator.d.ts +6 -3
- package/templates/blank/packages/locator-picker-companion/dist/selector-generator.js +233 -229
- package/templates/blank/packages/locator-picker-companion/src/cli.ts +1 -7
- package/templates/blank/packages/locator-picker-companion/src/injected-picker-script.ts +26 -5
- package/templates/blank/packages/locator-picker-companion/src/launcher.ts +1 -3
- package/templates/blank/packages/locator-picker-companion/src/session-file.ts +4 -15
- package/templates/blank/packages/locator-picker-companion/src/types.ts +1 -8
- package/templates/blank/playwright.config.ts +46 -0
- package/templates/blank/postcss.config.mjs +8 -8
- package/templates/blank/prisma/dev.db +0 -0
- package/templates/blank/scripts/configure-git-line-endings.mjs +91 -0
- package/templates/blank/scripts/install-template-step.ts +5 -1
- package/templates/blank/scripts/lib/step-matcher.test.ts +3 -3
- package/templates/blank/scripts/lib/step-matcher.ts +5 -1
- package/templates/blank/scripts/lib/template-step-installer.test.ts +4 -2
- package/templates/blank/scripts/lib/template-step-installer.ts +16 -4
- package/templates/blank/scripts/lib/template-step-registry.test.ts +1 -1
- package/templates/blank/scripts/lib/template-step-registry.ts +4 -1
- package/templates/blank/scripts/run-fallow-commit.mjs +4 -6
- package/templates/blank/scripts/sync-all.ts +7 -6
- package/templates/blank/scripts/sync-appraise-base-template.ts +84 -77
- package/templates/blank/scripts/sync-environments.ts +47 -44
- package/templates/blank/scripts/sync-locator-groups.ts +67 -76
- package/templates/blank/scripts/sync-locators.ts +50 -53
- package/templates/blank/scripts/sync-modules.ts +42 -42
- package/templates/blank/scripts/sync-tags.ts +51 -51
- package/templates/blank/scripts/sync-template-step-groups.ts +34 -32
- package/templates/blank/scripts/sync-template-steps.ts +97 -97
- package/templates/blank/scripts/sync-test-cases.ts +65 -74
- package/templates/blank/scripts/sync-test-suites.ts +85 -80
- package/templates/blank/src/actions/server-action-boundary.test.ts +1 -7
- package/templates/blank/src/actions/settings/sync-actions.ts +3 -1
- package/templates/blank/src/actions/tags/tag-actions.ts +1 -7
- package/templates/blank/src/actions/template-test-case/template-test-case-actions.ts +3 -1
- package/templates/blank/src/app/(base)/environments/create/page.tsx +28 -28
- package/templates/blank/src/app/(base)/environments/environment-form.tsx +3 -2
- package/templates/blank/src/app/(base)/environments/environment-helpers.ts +4 -1
- package/templates/blank/src/app/(base)/layout.tsx +10 -10
- package/templates/blank/src/app/(base)/locator-groups/locator-group-form.tsx +5 -3
- package/templates/blank/src/app/(base)/locator-groups/locator-group-table-columns.tsx +77 -77
- package/templates/blank/src/app/(base)/locator-groups/locator-group-table.tsx +28 -28
- package/templates/blank/src/app/(base)/locator-groups/modify/[id]/page.tsx +46 -46
- package/templates/blank/src/app/(base)/locator-groups/page.tsx +9 -19
- package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-helpers.test.ts +3 -6
- package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-response.ts +22 -5
- package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-state.ts +5 -1
- package/templates/blank/src/app/(base)/locators/create/use-locator-workspace.ts +7 -2
- package/templates/blank/src/app/(base)/locators/locator-file-sync.ts +1 -5
- package/templates/blank/src/app/(base)/locators/locator-helpers.ts +2 -12
- package/templates/blank/src/app/(base)/locators/locator-table-columns.tsx +59 -60
- package/templates/blank/src/app/(base)/modules/module-form.tsx +3 -1
- package/templates/blank/src/app/(base)/reports/overview-chart.tsx +49 -49
- package/templates/blank/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx +114 -115
- package/templates/blank/src/app/(base)/reports/test-cases/test-cases-metric-table.tsx +27 -27
- package/templates/blank/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx +80 -79
- package/templates/blank/src/app/(base)/reports/test-suites/test-suites-metric-table.tsx +29 -27
- package/templates/blank/src/app/(base)/settings/settings-sync-panel-helpers.test.tsx +4 -6
- package/templates/blank/src/app/(base)/settings/settings-sync-panel.tsx +22 -23
- package/templates/blank/src/app/(base)/tags/tag-form.test.tsx +2 -10
- package/templates/blank/src/app/(base)/tags/tag-form.tsx +5 -3
- package/templates/blank/src/app/(base)/tags/tag-table-columns.tsx +63 -63
- package/templates/blank/src/app/(base)/tags/tag-table.tsx +29 -29
- package/templates/blank/src/app/(base)/template-step-groups/create/page.tsx +28 -28
- package/templates/blank/src/app/(base)/template-step-groups/template-step-group-form.tsx +3 -1
- package/templates/blank/src/app/(base)/template-step-groups/template-step-group-helpers.ts +4 -1
- package/templates/blank/src/app/(base)/template-steps/paramChip.tsx +6 -10
- package/templates/blank/src/app/(base)/template-steps/template-step-form-helpers.ts +4 -2
- package/templates/blank/src/app/(base)/template-steps/template-step-helpers.test.ts +19 -1
- package/templates/blank/src/app/(base)/template-steps/template-step-helpers.ts +1 -5
- package/templates/blank/src/app/(base)/template-steps/template-step-row-guards.ts +1 -5
- package/templates/blank/src/app/(base)/template-steps/template-step-types.ts +1 -5
- package/templates/blank/src/app/(base)/template-test-cases/create-template-test-case-page-data.test.ts +4 -1
- package/templates/blank/src/app/(base)/template-test-cases/create-template-test-case-page-data.ts +1 -2
- package/templates/blank/src/app/(base)/template-test-cases/modify/[id]/page.tsx +1 -0
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-flow.test.tsx +0 -1
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-form.tsx +3 -1
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-table-columns.tsx +76 -76
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-table.tsx +32 -32
- package/templates/blank/src/app/(base)/test-cases/create/page.tsx +1 -5
- package/templates/blank/src/app/(base)/test-cases/create-from-template/create-from-template-selection-helpers.ts +1 -4
- package/templates/blank/src/app/(base)/test-cases/create-from-template/page.test.tsx +2 -2
- package/templates/blank/src/app/(base)/test-cases/inline-tag-creation-dialog.tsx +1 -7
- package/templates/blank/src/app/(base)/test-cases/inline-test-suite-creation-dialog.tsx +1 -7
- package/templates/blank/src/app/(base)/test-cases/modify/[id]/page.tsx +1 -5
- package/templates/blank/src/app/(base)/test-cases/test-case-form.tsx +63 -78
- package/templates/blank/src/app/(base)/test-cases/test-case-route-helpers.test.ts +2 -7
- package/templates/blank/src/app/(base)/test-suites/editable-test-suite-helpers.ts +1 -6
- package/templates/blank/src/app/(base)/test-suites/test-suite-form.test.tsx +2 -10
- package/templates/blank/src/app/(dashboard-components)/data-card-grid.tsx +10 -10
- package/templates/blank/src/app/api/test-runs/[runId]/download/route.ts +1 -4
- package/templates/blank/src/app/api/test-runs/[runId]/trace/[testCaseId]/route.test.ts +18 -9
- package/templates/blank/src/assets/icons/empty-tube.tsx +23 -23
- package/templates/blank/src/assets/icons/tube-plus.tsx +29 -29
- package/templates/blank/src/components/data-visualization/info-card.tsx +56 -70
- package/templates/blank/src/components/data-visualization/info-grid.tsx +22 -22
- package/templates/blank/src/components/diagram/add-node-prompt-node.tsx +1 -1
- package/templates/blank/src/components/diagram/dynamic-parameters-helpers.ts +4 -3
- package/templates/blank/src/components/diagram/dynamic-parameters.test.tsx +4 -1
- package/templates/blank/src/components/diagram/dynamic-parameters.tsx +0 -1
- package/templates/blank/src/components/diagram/flow-diagram-block-dialog.test.tsx +26 -0
- package/templates/blank/src/components/diagram/flow-diagram-block-dialog.tsx +3 -1
- package/templates/blank/src/components/diagram/flow-diagram-connection-guards.ts +24 -6
- package/templates/blank/src/components/diagram/flow-diagram-helpers.test.ts +27 -0
- package/templates/blank/src/components/diagram/flow-diagram-node-search.tsx +65 -65
- package/templates/blank/src/components/diagram/flow-diagram-toolbar.tsx +1 -3
- package/templates/blank/src/components/diagram/flow-diagram-view.tsx +1 -7
- package/templates/blank/src/components/diagram/flow-node-data-helpers.ts +1 -1
- package/templates/blank/src/components/diagram/node-form-fields-content.tsx +9 -2
- package/templates/blank/src/components/diagram/node-form-helpers.test.ts +3 -1
- package/templates/blank/src/components/diagram/node-form-helpers.ts +1 -4
- package/templates/blank/src/components/diagram/node-form-template-step-selection.ts +1 -4
- package/templates/blank/src/components/diagram/node-form.test.tsx +25 -0
- package/templates/blank/src/components/diagram/node-form.tsx +2 -12
- package/templates/blank/src/components/diagram/options-header-node.test.tsx +4 -1
- package/templates/blank/src/components/diagram/options-header-node.tsx +140 -130
- package/templates/blank/src/components/diagram/use-flow-diagram.ts +1 -2
- package/templates/blank/src/components/form/error-message.tsx +7 -7
- package/templates/blank/src/components/loading-skeleton/form/button-skeleton.tsx +8 -8
- package/templates/blank/src/components/loading-skeleton/form/text-input-skeleton.tsx +8 -8
- package/templates/blank/src/components/loading-skeleton/visualization/table-skeleton.tsx +14 -14
- package/templates/blank/src/components/navigation/entity-search-command.tsx +3 -9
- package/templates/blank/src/components/navigation/nav-link.tsx +60 -60
- package/templates/blank/src/components/test-case/test-case-form-helpers.test.ts +1 -5
- package/templates/blank/src/components/test-case/test-case-form-helpers.ts +1 -5
- package/templates/blank/src/components/test-case/test-case-picker-helpers.ts +8 -7
- package/templates/blank/src/components/test-case/test-case-picker.tsx +2 -6
- package/templates/blank/src/components/test-run/log-viewer.test.tsx +25 -0
- package/templates/blank/src/components/test-run/log-viewer.tsx +2 -2
- package/templates/blank/src/components/test-run/test-run-details-guards.ts +10 -1
- package/templates/blank/src/components/test-run/test-run-details.test.tsx +9 -19
- package/templates/blank/src/components/test-run/use-log-viewer.ts +2 -8
- package/templates/blank/src/components/test-run/use-test-run-header.ts +1 -4
- package/templates/blank/src/components/test-suite/test-suite-picker.tsx +1 -1
- package/templates/blank/src/components/theme/theme-provider.tsx +7 -1
- package/templates/blank/src/components/typography/page-header-subtitle.tsx +7 -7
- package/templates/blank/src/components/typography/page-header.tsx +7 -7
- package/templates/blank/src/components/ui/chart.tsx +2 -8
- package/templates/blank/src/components/ui/command.tsx +2 -5
- package/templates/blank/src/components/ui/data-table-column-header.tsx +3 -3
- package/templates/blank/src/components/ui/data-table.test.tsx +1 -8
- package/templates/blank/src/components/ui/dialog.tsx +1 -4
- package/templates/blank/src/components/ui/select.tsx +2 -2
- package/templates/blank/src/components/ui/separator.tsx +5 -1
- package/templates/blank/src/components/ui/skeleton.tsx +7 -7
- package/templates/blank/src/components/ui/table.tsx +1 -1
- package/templates/blank/src/components/ui/toaster.tsx +26 -26
- package/templates/blank/src/components/ui/tooltip.tsx +1 -1
- package/templates/blank/src/constants/form-opts/locator-group-form-opts.ts +1 -1
- package/templates/blank/src/lib/locator-group-file-utils.ts +5 -1
- package/templates/blank/src/lib/locator-picker/session-manager.ts +1 -2
- package/templates/blank/src/lib/metrics/metric-calculator.test.ts +105 -6
- package/templates/blank/src/lib/metrics/metric-calculator.ts +39 -40
- package/templates/blank/src/lib/sync/sync-executor.ts +1 -4
- package/templates/blank/src/lib/sync/sync-pending-counts.test.ts +201 -7
- package/templates/blank/src/lib/sync/sync-pending-counts.ts +81 -13
- package/templates/blank/src/lib/template-automation-paths.ts +1 -1
- package/templates/blank/src/lib/template-sync-utils.d.ts +14 -7
- package/templates/blank/src/lib/test-case-utils.ts +6 -6
- package/templates/blank/src/lib/test-run/log-formatter.ts +82 -83
- package/templates/blank/src/lib/test-run/report-parser.ts +352 -352
- package/templates/blank/src/lib/transformers/gherkin-converter.ts +42 -42
- package/templates/blank/src/lib/transformers/key-to-icon-transformer.tsx +95 -95
- package/templates/blank/src/lib/utils/node-param-validation.ts +81 -81
- package/templates/blank/src/lib/utils/template-step-file-generator.ts +5 -3
- package/templates/blank/src/lib/utils/template-step-file-manager-intelligent.ts +11 -1
- package/templates/blank/src/services/dashboard/dashboard-service.test.ts +28 -1
- package/templates/blank/src/services/dashboard/dashboard-service.ts +2 -0
- package/templates/blank/src/services/locator/locator-service.test.ts +1 -3
- package/templates/blank/src/services/locator/locator-service.ts +3 -1
- package/templates/blank/src/services/locator/locator-sync-utils.test.ts +1 -4
- package/templates/blank/src/services/module/module-service.ts +1 -4
- package/templates/blank/src/services/report/report-service.test.ts +70 -6
- package/templates/blank/src/services/report/report-service.ts +52 -9
- package/templates/blank/src/services/shared/errors.ts +2 -4
- package/templates/blank/src/services/template-step/template-step-service.ts +3 -1
- package/templates/blank/src/services/template-step-group/template-step-group-service.ts +3 -1
- package/templates/blank/src/services/test-case/test-case-service.ts +0 -5
- package/templates/blank/src/services/test-run/test-run-service.test.ts +3 -6
- package/templates/blank/src/services/test-run/test-run-service.ts +12 -7
- package/templates/blank/src/services/test-suite/test-suite-service.test.ts +1 -5
- package/templates/blank/src/services/test-suite/test-suite-service.ts +2 -4
- package/templates/blank/src/types/form/actionHandler.ts +1 -5
- package/templates/blank/tsconfig.json +8 -8
- package/templates/default/packages/locator-picker-companion/dist/cli.d.ts +1 -1
- package/templates/default/packages/locator-picker-companion/dist/cli.js +313 -279
- package/templates/default/packages/locator-picker-companion/dist/index.d.ts +3 -3
- package/templates/default/packages/locator-picker-companion/dist/index.js +3 -3
- package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.d.ts +1 -1
- package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.js +526 -481
- package/templates/default/packages/locator-picker-companion/dist/launcher.d.ts +13 -10
- package/templates/default/packages/locator-picker-companion/dist/launcher.js +47 -48
- package/templates/default/packages/locator-picker-companion/dist/selector-generator.d.ts +6 -3
- package/templates/default/packages/locator-picker-companion/dist/selector-generator.js +233 -229
- package/templates/default/packages/locator-picker-companion/dist/session-file.d.ts +30 -22
- package/templates/default/packages/locator-picker-companion/dist/session-file.js +116 -104
- package/templates/default/packages/locator-picker-companion/dist/types.d.ts +25 -25
- package/templates/default/packages/locator-picker-companion/dist/types.js +1 -1
- package/templates/starter/.editorconfig +11 -0
- package/templates/starter/.gitattributes +21 -0
- package/templates/starter/.gitconfig.appraise +14 -0
- package/templates/starter/.prettierrc +13 -0
- package/templates/starter/.vscode/settings.json +2 -0
- package/templates/starter/README.md +12 -12
- package/templates/starter/automation/steps/actions/click.step.ts +56 -58
- package/templates/starter/automation/steps/actions/hover.step.ts +25 -27
- package/templates/starter/automation/steps/actions/input.step.ts +85 -108
- package/templates/starter/automation/steps/actions/navigation.step.ts +67 -70
- package/templates/starter/automation/steps/actions/random_data.step.ts +149 -143
- package/templates/starter/automation/steps/actions/store.step.ts +69 -1
- package/templates/starter/automation/steps/actions/wait.step.ts +84 -1
- package/templates/starter/automation/steps/validations/active_state_assertion.step.ts +28 -30
- package/templates/starter/automation/steps/validations/navigation_assertion.step.ts +20 -22
- package/templates/starter/automation/steps/validations/text_assertion.step.ts +67 -107
- package/templates/starter/automation/steps/validations/visibility_assertion.step.ts +24 -26
- package/templates/starter/components.json +24 -24
- package/templates/starter/cucumber.mjs +16 -16
- package/templates/starter/e2e/README.md +56 -0
- package/templates/starter/e2e/apply-migrations.mjs +76 -0
- package/templates/starter/e2e/appraise-smoke.spec.ts +78 -0
- package/templates/starter/e2e/authoring.spec.ts +53 -0
- package/templates/starter/e2e/crud-configuration.spec.ts +138 -0
- package/templates/starter/e2e/crud-tests.spec.ts +76 -0
- package/templates/starter/e2e/helpers/forms.ts +186 -0
- package/templates/starter/e2e/helpers/navigation.ts +27 -0
- package/templates/starter/e2e/helpers/table.ts +45 -0
- package/templates/starter/e2e/helpers/test-data.ts +549 -0
- package/templates/starter/e2e/helpers/ui.ts +41 -0
- package/templates/starter/e2e/navigation.spec.ts +101 -0
- package/templates/starter/e2e/runs-and-reports.spec.ts +82 -0
- package/templates/starter/e2e/settings-sync.spec.ts +39 -0
- package/templates/starter/e2e/start-server.mjs +61 -0
- package/templates/starter/eslint.config.mjs +4 -4
- package/templates/starter/gitignore +0 -3
- package/templates/starter/next-env.d.ts +1 -1
- package/templates/starter/package-lock.json +58 -102
- package/templates/starter/package.json +10 -9
- package/templates/starter/packages/cucumber-runtime/package.json +13 -13
- package/templates/starter/packages/cucumber-runtime/src/cache.util.ts +93 -93
- package/templates/starter/packages/cucumber-runtime/src/cli.ts +77 -68
- package/templates/starter/packages/cucumber-runtime/src/environment.util.ts +21 -21
- package/templates/starter/packages/cucumber-runtime/src/executor.ts +32 -32
- package/templates/starter/packages/cucumber-runtime/src/index.ts +17 -17
- package/templates/starter/packages/cucumber-runtime/src/locator.util.ts +234 -234
- package/templates/starter/packages/cucumber-runtime/src/parameter-types.ts +7 -7
- package/templates/starter/packages/cucumber-runtime/src/random-data.util.ts +35 -35
- package/templates/starter/packages/cucumber-runtime/src/types.ts +13 -13
- package/templates/starter/packages/cucumber-runtime/src/world.ts +44 -44
- package/templates/starter/packages/cucumber-runtime/tsconfig.json +11 -11
- package/templates/starter/packages/locator-picker-companion/dist/cli.js +1 -1
- package/templates/starter/packages/locator-picker-companion/dist/index.d.ts +3 -3
- package/templates/starter/packages/locator-picker-companion/dist/index.js +3 -3
- package/templates/starter/packages/locator-picker-companion/dist/injected-picker-script.js +13 -3
- package/templates/starter/packages/locator-picker-companion/dist/selector-generator.d.ts +6 -3
- package/templates/starter/packages/locator-picker-companion/dist/selector-generator.js +233 -229
- package/templates/starter/packages/locator-picker-companion/src/cli.ts +1 -7
- package/templates/starter/packages/locator-picker-companion/src/injected-picker-script.ts +26 -5
- package/templates/starter/packages/locator-picker-companion/src/launcher.ts +1 -3
- package/templates/starter/packages/locator-picker-companion/src/session-file.ts +4 -15
- package/templates/starter/packages/locator-picker-companion/src/types.ts +1 -8
- package/templates/starter/playwright.config.ts +46 -0
- package/templates/starter/postcss.config.mjs +8 -8
- package/templates/starter/prisma/dev.db +0 -0
- package/templates/starter/scripts/configure-git-line-endings.mjs +91 -0
- package/templates/starter/scripts/install-template-step.ts +5 -1
- package/templates/starter/scripts/lib/step-matcher.test.ts +3 -3
- package/templates/starter/scripts/lib/step-matcher.ts +5 -1
- package/templates/starter/scripts/lib/template-step-installer.test.ts +4 -2
- package/templates/starter/scripts/lib/template-step-installer.ts +16 -4
- package/templates/starter/scripts/lib/template-step-registry.test.ts +1 -1
- package/templates/starter/scripts/lib/template-step-registry.ts +4 -1
- package/templates/starter/scripts/run-fallow-commit.mjs +4 -6
- package/templates/starter/scripts/sync-all.ts +7 -6
- package/templates/starter/scripts/sync-appraise-base-template.ts +84 -77
- package/templates/starter/scripts/sync-environments.ts +47 -44
- package/templates/starter/scripts/sync-locator-groups.ts +67 -76
- package/templates/starter/scripts/sync-locators.ts +50 -53
- package/templates/starter/scripts/sync-modules.ts +42 -42
- package/templates/starter/scripts/sync-tags.ts +51 -51
- package/templates/starter/scripts/sync-template-step-groups.ts +34 -32
- package/templates/starter/scripts/sync-template-steps.ts +97 -97
- package/templates/starter/scripts/sync-test-cases.ts +65 -74
- package/templates/starter/scripts/sync-test-suites.ts +85 -80
- package/templates/starter/src/actions/server-action-boundary.test.ts +1 -7
- package/templates/starter/src/actions/settings/sync-actions.ts +3 -1
- package/templates/starter/src/actions/tags/tag-actions.ts +1 -7
- package/templates/starter/src/actions/template-test-case/template-test-case-actions.ts +3 -1
- package/templates/starter/src/app/(base)/environments/create/page.tsx +28 -28
- package/templates/starter/src/app/(base)/environments/environment-form.tsx +3 -2
- package/templates/starter/src/app/(base)/environments/environment-helpers.ts +4 -1
- package/templates/starter/src/app/(base)/layout.tsx +10 -10
- package/templates/starter/src/app/(base)/locator-groups/locator-group-form.tsx +5 -3
- package/templates/starter/src/app/(base)/locator-groups/locator-group-table-columns.tsx +77 -77
- package/templates/starter/src/app/(base)/locator-groups/locator-group-table.tsx +28 -28
- package/templates/starter/src/app/(base)/locator-groups/modify/[id]/page.tsx +46 -46
- package/templates/starter/src/app/(base)/locator-groups/page.tsx +9 -19
- package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-helpers.test.ts +3 -6
- package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-response.ts +22 -5
- package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-state.ts +5 -1
- package/templates/starter/src/app/(base)/locators/create/use-locator-workspace.ts +7 -2
- package/templates/starter/src/app/(base)/locators/locator-file-sync.ts +1 -5
- package/templates/starter/src/app/(base)/locators/locator-helpers.ts +2 -12
- package/templates/starter/src/app/(base)/locators/locator-table-columns.tsx +59 -60
- package/templates/starter/src/app/(base)/modules/module-form.tsx +3 -1
- package/templates/starter/src/app/(base)/reports/overview-chart.tsx +49 -49
- package/templates/starter/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx +114 -115
- package/templates/starter/src/app/(base)/reports/test-cases/test-cases-metric-table.tsx +27 -27
- package/templates/starter/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx +80 -79
- package/templates/starter/src/app/(base)/reports/test-suites/test-suites-metric-table.tsx +29 -27
- package/templates/starter/src/app/(base)/settings/settings-sync-panel-helpers.test.tsx +4 -6
- package/templates/starter/src/app/(base)/settings/settings-sync-panel.tsx +22 -23
- package/templates/starter/src/app/(base)/tags/tag-form.test.tsx +2 -10
- package/templates/starter/src/app/(base)/tags/tag-form.tsx +5 -3
- package/templates/starter/src/app/(base)/tags/tag-table-columns.tsx +63 -63
- package/templates/starter/src/app/(base)/tags/tag-table.tsx +29 -29
- package/templates/starter/src/app/(base)/template-step-groups/create/page.tsx +28 -28
- package/templates/starter/src/app/(base)/template-step-groups/template-step-group-form.tsx +3 -1
- package/templates/starter/src/app/(base)/template-step-groups/template-step-group-helpers.ts +4 -1
- package/templates/starter/src/app/(base)/template-steps/paramChip.tsx +6 -10
- package/templates/starter/src/app/(base)/template-steps/template-step-form-helpers.ts +4 -2
- package/templates/starter/src/app/(base)/template-steps/template-step-helpers.test.ts +19 -1
- package/templates/starter/src/app/(base)/template-steps/template-step-helpers.ts +1 -5
- package/templates/starter/src/app/(base)/template-steps/template-step-row-guards.ts +1 -5
- package/templates/starter/src/app/(base)/template-steps/template-step-types.ts +1 -5
- package/templates/starter/src/app/(base)/template-test-cases/create-template-test-case-page-data.test.ts +4 -1
- package/templates/starter/src/app/(base)/template-test-cases/create-template-test-case-page-data.ts +1 -2
- package/templates/starter/src/app/(base)/template-test-cases/modify/[id]/page.tsx +1 -0
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-flow.test.tsx +0 -1
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-form.tsx +3 -1
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-table-columns.tsx +76 -76
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-table.tsx +32 -32
- package/templates/starter/src/app/(base)/test-cases/create/page.tsx +1 -5
- package/templates/starter/src/app/(base)/test-cases/create-from-template/create-from-template-selection-helpers.ts +1 -4
- package/templates/starter/src/app/(base)/test-cases/create-from-template/page.test.tsx +2 -2
- package/templates/starter/src/app/(base)/test-cases/inline-tag-creation-dialog.tsx +1 -7
- package/templates/starter/src/app/(base)/test-cases/inline-test-suite-creation-dialog.tsx +1 -7
- package/templates/starter/src/app/(base)/test-cases/modify/[id]/page.tsx +1 -5
- package/templates/starter/src/app/(base)/test-cases/test-case-form.tsx +63 -78
- package/templates/starter/src/app/(base)/test-cases/test-case-route-helpers.test.ts +2 -7
- package/templates/starter/src/app/(base)/test-suites/editable-test-suite-helpers.ts +1 -6
- package/templates/starter/src/app/(base)/test-suites/test-suite-form.test.tsx +2 -10
- package/templates/starter/src/app/(dashboard-components)/data-card-grid.tsx +10 -10
- package/templates/starter/src/app/api/test-runs/[runId]/download/route.ts +1 -4
- package/templates/starter/src/app/api/test-runs/[runId]/trace/[testCaseId]/route.test.ts +18 -9
- package/templates/starter/src/assets/icons/empty-tube.tsx +23 -23
- package/templates/starter/src/assets/icons/tube-plus.tsx +29 -29
- package/templates/starter/src/components/data-visualization/info-card.tsx +56 -70
- package/templates/starter/src/components/data-visualization/info-grid.tsx +22 -22
- package/templates/starter/src/components/diagram/add-node-prompt-node.tsx +1 -1
- package/templates/starter/src/components/diagram/dynamic-parameters-helpers.ts +4 -3
- package/templates/starter/src/components/diagram/dynamic-parameters.test.tsx +4 -1
- package/templates/starter/src/components/diagram/dynamic-parameters.tsx +0 -1
- package/templates/starter/src/components/diagram/flow-diagram-block-dialog.test.tsx +26 -0
- package/templates/starter/src/components/diagram/flow-diagram-block-dialog.tsx +3 -1
- package/templates/starter/src/components/diagram/flow-diagram-connection-guards.ts +24 -6
- package/templates/starter/src/components/diagram/flow-diagram-helpers.test.ts +27 -0
- package/templates/starter/src/components/diagram/flow-diagram-node-search.tsx +65 -65
- package/templates/starter/src/components/diagram/flow-diagram-toolbar.tsx +1 -3
- package/templates/starter/src/components/diagram/flow-diagram-view.tsx +1 -7
- package/templates/starter/src/components/diagram/flow-node-data-helpers.ts +1 -1
- package/templates/starter/src/components/diagram/node-form-fields-content.tsx +9 -2
- package/templates/starter/src/components/diagram/node-form-helpers.test.ts +3 -1
- package/templates/starter/src/components/diagram/node-form-helpers.ts +1 -4
- package/templates/starter/src/components/diagram/node-form-template-step-selection.ts +1 -4
- package/templates/starter/src/components/diagram/node-form.test.tsx +25 -0
- package/templates/starter/src/components/diagram/node-form.tsx +2 -12
- package/templates/starter/src/components/diagram/options-header-node.test.tsx +4 -1
- package/templates/starter/src/components/diagram/options-header-node.tsx +140 -130
- package/templates/starter/src/components/diagram/use-flow-diagram.ts +1 -2
- package/templates/starter/src/components/form/error-message.tsx +7 -7
- package/templates/starter/src/components/loading-skeleton/form/button-skeleton.tsx +8 -8
- package/templates/starter/src/components/loading-skeleton/form/text-input-skeleton.tsx +8 -8
- package/templates/starter/src/components/loading-skeleton/visualization/table-skeleton.tsx +14 -14
- package/templates/starter/src/components/navigation/entity-search-command.tsx +3 -9
- package/templates/starter/src/components/navigation/nav-link.tsx +60 -60
- package/templates/starter/src/components/test-case/test-case-form-helpers.test.ts +1 -5
- package/templates/starter/src/components/test-case/test-case-form-helpers.ts +1 -5
- package/templates/starter/src/components/test-case/test-case-picker-helpers.ts +8 -7
- package/templates/starter/src/components/test-case/test-case-picker.tsx +2 -6
- package/templates/starter/src/components/test-run/log-viewer.test.tsx +25 -0
- package/templates/starter/src/components/test-run/log-viewer.tsx +2 -2
- package/templates/starter/src/components/test-run/test-run-details-guards.ts +10 -1
- package/templates/starter/src/components/test-run/test-run-details.test.tsx +9 -19
- package/templates/starter/src/components/test-run/use-log-viewer.ts +2 -8
- package/templates/starter/src/components/test-run/use-test-run-header.ts +1 -4
- package/templates/starter/src/components/test-suite/test-suite-picker.tsx +1 -1
- package/templates/starter/src/components/theme/theme-provider.tsx +7 -1
- package/templates/starter/src/components/typography/page-header-subtitle.tsx +7 -7
- package/templates/starter/src/components/typography/page-header.tsx +7 -7
- package/templates/starter/src/components/ui/chart.tsx +2 -8
- package/templates/starter/src/components/ui/command.tsx +2 -5
- package/templates/starter/src/components/ui/data-table-column-header.tsx +3 -3
- package/templates/starter/src/components/ui/data-table.test.tsx +1 -8
- package/templates/starter/src/components/ui/dialog.tsx +1 -4
- package/templates/starter/src/components/ui/select.tsx +2 -2
- package/templates/starter/src/components/ui/separator.tsx +5 -1
- package/templates/starter/src/components/ui/skeleton.tsx +7 -7
- package/templates/starter/src/components/ui/table.tsx +1 -1
- package/templates/starter/src/components/ui/toaster.tsx +26 -26
- package/templates/starter/src/components/ui/tooltip.tsx +1 -1
- package/templates/starter/src/constants/form-opts/locator-group-form-opts.ts +1 -1
- package/templates/starter/src/lib/locator-group-file-utils.ts +5 -1
- package/templates/starter/src/lib/locator-picker/session-manager.ts +1 -2
- package/templates/starter/src/lib/metrics/metric-calculator.test.ts +105 -6
- package/templates/starter/src/lib/metrics/metric-calculator.ts +39 -40
- package/templates/starter/src/lib/sync/sync-executor.ts +1 -4
- package/templates/starter/src/lib/sync/sync-pending-counts.test.ts +201 -7
- package/templates/starter/src/lib/sync/sync-pending-counts.ts +81 -13
- package/templates/starter/src/lib/template-automation-paths.ts +1 -1
- package/templates/starter/src/lib/template-sync-utils.d.ts +14 -7
- package/templates/starter/src/lib/test-case-utils.ts +6 -6
- package/templates/starter/src/lib/test-run/log-formatter.ts +82 -83
- package/templates/starter/src/lib/test-run/report-parser.ts +352 -352
- package/templates/starter/src/lib/transformers/gherkin-converter.ts +42 -42
- package/templates/starter/src/lib/transformers/key-to-icon-transformer.tsx +95 -95
- package/templates/starter/src/lib/utils/node-param-validation.ts +81 -81
- package/templates/starter/src/lib/utils/template-step-file-generator.ts +5 -3
- package/templates/starter/src/lib/utils/template-step-file-manager-intelligent.ts +11 -1
- package/templates/starter/src/services/dashboard/dashboard-service.test.ts +28 -1
- package/templates/starter/src/services/dashboard/dashboard-service.ts +2 -0
- package/templates/starter/src/services/locator/locator-service.test.ts +1 -3
- package/templates/starter/src/services/locator/locator-service.ts +3 -1
- package/templates/starter/src/services/locator/locator-sync-utils.test.ts +1 -4
- package/templates/starter/src/services/module/module-service.ts +1 -4
- package/templates/starter/src/services/report/report-service.test.ts +70 -6
- package/templates/starter/src/services/report/report-service.ts +52 -9
- package/templates/starter/src/services/shared/errors.ts +2 -4
- package/templates/starter/src/services/template-step/template-step-service.ts +3 -1
- package/templates/starter/src/services/template-step-group/template-step-group-service.ts +3 -1
- package/templates/starter/src/services/test-case/test-case-service.ts +0 -5
- package/templates/starter/src/services/test-run/test-run-service.test.ts +3 -6
- package/templates/starter/src/services/test-run/test-run-service.ts +12 -7
- package/templates/starter/src/services/test-suite/test-suite-service.test.ts +1 -5
- package/templates/starter/src/services/test-suite/test-suite-service.ts +2 -4
- package/templates/starter/src/types/form/actionHandler.ts +1 -5
- package/templates/starter/tsconfig.json +8 -8
|
@@ -15,6 +15,7 @@ import { getSelectedTemplateIcon, type NodeFormErrors } from './node-form-helper
|
|
|
15
15
|
import { getParameterPreviewUpdates } from './node-form-template-step-selection'
|
|
16
16
|
import type { TemplateStepWithGroup } from '@/types/diagram/template-step'
|
|
17
17
|
import type { NodeFormFieldsProps } from './node-form-fields-props'
|
|
18
|
+
import { Save, X } from 'lucide-react'
|
|
18
19
|
|
|
19
20
|
type NodeFormFieldsContentProps = NodeFormFieldsProps & {
|
|
20
21
|
fieldClassName: string
|
|
@@ -111,9 +112,15 @@ export function NodeFormFieldsContent({
|
|
|
111
112
|
</div>
|
|
112
113
|
<SheetFooter className="shrink-0 border-t pt-4">
|
|
113
114
|
<SheetClose asChild>
|
|
114
|
-
<Button variant="outline">
|
|
115
|
+
<Button variant="outline">
|
|
116
|
+
<X className="size-4" aria-hidden />
|
|
117
|
+
<span>Cancel</span>
|
|
118
|
+
</Button>
|
|
115
119
|
</SheetClose>
|
|
116
|
-
<Button type="submit">
|
|
120
|
+
<Button type="submit">
|
|
121
|
+
<Save className="size-4" aria-hidden />
|
|
122
|
+
<span className="font-bold">Save</span>
|
|
123
|
+
</Button>
|
|
117
124
|
</SheetFooter>
|
|
118
125
|
</>
|
|
119
126
|
)
|
|
@@ -54,7 +54,9 @@ describe('node-form helpers', () => {
|
|
|
54
54
|
})
|
|
55
55
|
|
|
56
56
|
it('creates initial parameters and gherkin previews', () => {
|
|
57
|
-
const parameters = createInitialParametersForTemplateStep(
|
|
57
|
+
const parameters = createInitialParametersForTemplateStep(
|
|
58
|
+
getSelectedTemplateStepParams(templateStepParams, 'step-1'),
|
|
59
|
+
)
|
|
58
60
|
|
|
59
61
|
expect(parameters).toEqual([
|
|
60
62
|
{
|
|
@@ -69,10 +69,7 @@ export function createInitialParametersForTemplateStep(templateStepParams: Templ
|
|
|
69
69
|
}))
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export function getGherkinPreview(
|
|
73
|
-
templateStep: TemplateStep | null,
|
|
74
|
-
parameters: NodeFormData['parameters'],
|
|
75
|
-
) {
|
|
72
|
+
export function getGherkinPreview(templateStep: TemplateStep | null, parameters: NodeFormData['parameters']) {
|
|
76
73
|
if (!templateStep?.signature) {
|
|
77
74
|
return ''
|
|
78
75
|
}
|
|
@@ -29,10 +29,7 @@ export function getTemplateStepSelectionUpdates(
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
export function getParameterPreviewUpdates(
|
|
33
|
-
templateStep: TemplateStep | null,
|
|
34
|
-
values: NodeFormData['parameters'],
|
|
35
|
-
) {
|
|
32
|
+
export function getParameterPreviewUpdates(templateStep: TemplateStep | null, values: NodeFormData['parameters']) {
|
|
36
33
|
return {
|
|
37
34
|
parameters: [...values],
|
|
38
35
|
gherkinStep: getGherkinPreview(templateStep, values),
|
|
@@ -145,6 +145,31 @@ describe('NodeForm', () => {
|
|
|
145
145
|
})
|
|
146
146
|
})
|
|
147
147
|
|
|
148
|
+
it('renders footer actions with icons', () => {
|
|
149
|
+
render(
|
|
150
|
+
<NodeForm
|
|
151
|
+
onSubmitAction={vi.fn()}
|
|
152
|
+
initialValues={{
|
|
153
|
+
label: '',
|
|
154
|
+
gherkinStep: '',
|
|
155
|
+
templateStepId: '',
|
|
156
|
+
parameters: [],
|
|
157
|
+
}}
|
|
158
|
+
templateSteps={templateSteps}
|
|
159
|
+
templateStepParams={templateStepParams}
|
|
160
|
+
showAddNodeDialog
|
|
161
|
+
locators={[]}
|
|
162
|
+
locatorGroups={[]}
|
|
163
|
+
environments={[]}
|
|
164
|
+
modules={[]}
|
|
165
|
+
setShowAddNodeDialog={vi.fn()}
|
|
166
|
+
/>,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
expect(screen.getByRole('button', { name: 'Cancel' }).querySelector('svg')).toBeInTheDocument()
|
|
170
|
+
expect(screen.getByRole('button', { name: 'Save' }).querySelector('svg')).toBeInTheDocument()
|
|
171
|
+
})
|
|
172
|
+
|
|
148
173
|
it('blocks submit when dynamic parameter validation fails', async () => {
|
|
149
174
|
const user = userEvent.setup()
|
|
150
175
|
const onSubmitAction = vi.fn()
|
|
@@ -9,11 +9,7 @@ import type { DynamicFormFieldsRef } from './dynamic-parameters'
|
|
|
9
9
|
import { NodeFormFieldsContent } from './node-form-fields-content'
|
|
10
10
|
import type { NodeFormFieldsProps } from './node-form-fields-props'
|
|
11
11
|
import { handleNodeFormSubmit } from './node-form-submit'
|
|
12
|
-
import {
|
|
13
|
-
getSelectedTemplateStep,
|
|
14
|
-
getSelectedTemplateStepParams,
|
|
15
|
-
type NodeFormProps,
|
|
16
|
-
} from './node-form-helpers'
|
|
12
|
+
import { getSelectedTemplateStep, getSelectedTemplateStepParams, type NodeFormProps } from './node-form-helpers'
|
|
17
13
|
import { getTemplateStepSelectionUpdates } from './node-form-template-step-selection'
|
|
18
14
|
|
|
19
15
|
function buildFormResetKey(
|
|
@@ -128,13 +124,7 @@ function NodeFormFields({
|
|
|
128
124
|
)
|
|
129
125
|
}
|
|
130
126
|
|
|
131
|
-
function NodeForm({
|
|
132
|
-
showAddNodeDialog,
|
|
133
|
-
setShowAddNodeDialog,
|
|
134
|
-
initialValues,
|
|
135
|
-
mode,
|
|
136
|
-
...fieldsProps
|
|
137
|
-
}: NodeFormProps) {
|
|
127
|
+
function NodeForm({ showAddNodeDialog, setShowAddNodeDialog, initialValues, mode, ...fieldsProps }: NodeFormProps) {
|
|
138
128
|
const formResetKey = buildFormResetKey(initialValues, mode ?? 'add', showAddNodeDialog)
|
|
139
129
|
|
|
140
130
|
return (
|
|
@@ -178,6 +178,9 @@ describe('OptionsHeaderNode', () => {
|
|
|
178
178
|
})
|
|
179
179
|
|
|
180
180
|
expect(screen.getByTestId('options-header-node')).toHaveAttribute('data-missing-params', 'true')
|
|
181
|
+
expect(screen.getByTestId('options-header-node')).toHaveClass('bg-red-600')
|
|
182
|
+
expect(screen.getByTestId('options-header-node')).toHaveClass('text-white')
|
|
183
|
+
expect(screen.getByTestId('node-step-icon')).toHaveClass('text-white')
|
|
181
184
|
expect(screen.getByRole('heading', { name: 'Click submit' })).toBeInTheDocument()
|
|
182
185
|
await user.hover(screen.getByTestId('options-header-node'))
|
|
183
186
|
expect(screen.getByText('When click "Submit"')).toBeInTheDocument()
|
|
@@ -204,7 +207,7 @@ describe('OptionsHeaderNode', () => {
|
|
|
204
207
|
expect(screen.getByTestId('options-header-node')).toHaveAttribute('data-missing-params', 'true')
|
|
205
208
|
expect(screen.getByTestId('options-header-node')).toHaveAttribute('data-first-node', 'true')
|
|
206
209
|
expect(screen.getByTestId('options-header-node')).toHaveClass('ring-emerald-500/70')
|
|
207
|
-
expect(screen.getByTestId('options-header-node')).toHaveClass('border-
|
|
210
|
+
expect(screen.getByTestId('options-header-node')).toHaveClass('border-red-700')
|
|
208
211
|
expect(screen.getByTestId('options-header-node')).toHaveClass('rounded-l-3xl')
|
|
209
212
|
})
|
|
210
213
|
})
|
|
@@ -106,142 +106,152 @@ const OptionsHeaderNode = memo(({ selected, data, onEdit, onAddConnectedNode }:
|
|
|
106
106
|
|
|
107
107
|
return (
|
|
108
108
|
<LazyMotion features={domAnimation} strict>
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
)}
|
|
129
|
-
>
|
|
130
|
-
{!isFirstNode && (
|
|
131
|
-
<Handle type="target" position={Position.Left} className="!z-30 !h-2.5 !w-2.5 !border-0 !bg-zinc-400" />
|
|
132
|
-
)}
|
|
133
|
-
<AnimatePresence>
|
|
134
|
-
{showToolbar && (
|
|
135
|
-
<div className="absolute -top-12 left-1/2 z-10 -translate-x-1/2">
|
|
136
|
-
<motion.div
|
|
137
|
-
className="border-border/70 bg-muted/80 flex items-center gap-1 rounded-md border p-1 shadow-md backdrop-blur"
|
|
138
|
-
onMouseEnter={showToolbarNow}
|
|
139
|
-
onMouseLeave={hideToolbarWithDelay}
|
|
140
|
-
initial={{ opacity: 0, y: 10 }}
|
|
141
|
-
animate={{ opacity: 1, y: 0 }}
|
|
142
|
-
exit={{ opacity: 0, y: 10, transition: { duration: 0.4, ease: 'easeOut' } }}
|
|
143
|
-
transition={{ duration: 0.22, ease: 'easeOut' }}
|
|
144
|
-
>
|
|
145
|
-
<Button
|
|
146
|
-
type="button"
|
|
147
|
-
variant="outline"
|
|
148
|
-
size="icon"
|
|
149
|
-
className="nodrag size-7"
|
|
150
|
-
aria-label="Edit"
|
|
151
|
-
onClick={handleEdit}
|
|
152
|
-
>
|
|
153
|
-
<Pencil aria-hidden="true" />
|
|
154
|
-
</Button>
|
|
155
|
-
<Button
|
|
156
|
-
type="button"
|
|
157
|
-
variant="outline"
|
|
158
|
-
size="icon"
|
|
159
|
-
className="nodrag size-7"
|
|
160
|
-
aria-label="Delete"
|
|
161
|
-
onClick={handleDelete}
|
|
162
|
-
disabled={isDeleteDisabled}
|
|
163
|
-
>
|
|
164
|
-
<Trash aria-hidden="true" />
|
|
165
|
-
</Button>
|
|
166
|
-
</motion.div>
|
|
167
|
-
</div>
|
|
109
|
+
<BaseNode
|
|
110
|
+
selected={selected}
|
|
111
|
+
data-testid="options-header-node"
|
|
112
|
+
data-missing-params={isMissingParams ? 'true' : undefined}
|
|
113
|
+
data-first-node={isFirstNode ? 'true' : undefined}
|
|
114
|
+
data-search-highlighted={isSearchHighlighted ? 'true' : undefined}
|
|
115
|
+
onMouseEnter={showToolbarNow}
|
|
116
|
+
onMouseLeave={hideToolbarWithDelay}
|
|
117
|
+
onFocus={showToolbarNow}
|
|
118
|
+
onBlur={event => {
|
|
119
|
+
if (!event.currentTarget.contains(event.relatedTarget as Node | null)) {
|
|
120
|
+
hideToolbarWithDelay()
|
|
121
|
+
}
|
|
122
|
+
}}
|
|
123
|
+
className={cn(
|
|
124
|
+
'shadow-background/30 w-36 overflow-visible p-0 pt-4 shadow-lg transition-[border-radius,box-shadow] duration-300 ease-out',
|
|
125
|
+
isMissingParams ? 'border-red-700 bg-red-600 text-white ring-1 ring-red-800/60' : 'border-border/70 bg-card',
|
|
126
|
+
isFirstNode && 'rounded-l-3xl rounded-r-md',
|
|
127
|
+
isSearchHighlighted && 'shadow-[0_0_28px_rgba(16,185,129,0.34)] ring-2 ring-emerald-500/70',
|
|
168
128
|
)}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<div className="absolute left-full top-1/2 z-20 -translate-y-1/2">
|
|
173
|
-
<motion.div
|
|
174
|
-
className="flex items-center"
|
|
175
|
-
initial={{ opacity: 0, x: -6, scale: 0.96 }}
|
|
176
|
-
animate={{ opacity: 1, x: 0, scale: 1 }}
|
|
177
|
-
exit={{ opacity: 0, x: -6, scale: 0.96 }}
|
|
178
|
-
transition={{ duration: 0.18, ease: 'easeOut' }}
|
|
179
|
-
>
|
|
180
|
-
<motion.span
|
|
181
|
-
aria-hidden="true"
|
|
182
|
-
className="h-px w-12 bg-emerald-500/70 shadow-[0_0_8px_rgba(16,185,129,0.4)]"
|
|
183
|
-
initial={{ scaleX: 0, transformOrigin: 'left' }}
|
|
184
|
-
animate={{ scaleX: 1 }}
|
|
185
|
-
exit={{ scaleX: 0 }}
|
|
186
|
-
transition={{ duration: 0.2, ease: 'easeOut' }}
|
|
187
|
-
/>
|
|
188
|
-
<motion.button
|
|
189
|
-
type="button"
|
|
190
|
-
className="nodrag nopan border-border/70 bg-muted/95 -ml-px flex size-5 items-center justify-center rounded border text-muted-foreground shadow-md transition-colors hover:border-emerald-400/70 hover:bg-emerald-500/20 hover:text-emerald-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-400/60"
|
|
191
|
-
aria-label="Add connected node"
|
|
192
|
-
onClick={handleAddConnectedNode}
|
|
193
|
-
whileHover={{ scale: 1.12 }}
|
|
194
|
-
whileTap={{ scale: 0.92 }}
|
|
195
|
-
animate={{
|
|
196
|
-
boxShadow: [
|
|
197
|
-
'0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)',
|
|
198
|
-
'0 0 0 4px rgba(16,185,129,0.12), 0 0 14px rgba(16,185,129,0.26)',
|
|
199
|
-
'0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)',
|
|
200
|
-
],
|
|
201
|
-
}}
|
|
202
|
-
transition={{
|
|
203
|
-
boxShadow: {
|
|
204
|
-
duration: 2.4,
|
|
205
|
-
repeat: Infinity,
|
|
206
|
-
ease: 'easeInOut',
|
|
207
|
-
},
|
|
208
|
-
}}
|
|
209
|
-
>
|
|
210
|
-
<Plus aria-hidden="true" className="size-3" />
|
|
211
|
-
</motion.button>
|
|
212
|
-
</motion.div>
|
|
213
|
-
</div>
|
|
129
|
+
>
|
|
130
|
+
{!isFirstNode && (
|
|
131
|
+
<Handle type="target" position={Position.Left} className="!z-30 !h-2.5 !w-2.5 !border-0 !bg-zinc-400" />
|
|
214
132
|
)}
|
|
215
|
-
</AnimatePresence>
|
|
216
|
-
<div className="flex flex-col items-center gap-3 px-4 py-5 text-center">
|
|
217
|
-
<div
|
|
218
|
-
data-testid="node-step-icon"
|
|
219
|
-
className="bg-primary/15 shadow-primary/20 flex size-20 shrink-0 items-center justify-center rounded-2xl text-primary shadow-lg [&>svg]:size-10"
|
|
220
|
-
>
|
|
221
|
-
{KeyToIconTransformer(getTemplateStepIcon(icon))}
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
<div className="absolute left-1/2 top-full z-[5] mt-2 min-w-72 -translate-x-[47%]">
|
|
225
|
-
<h3 className="relative -left-2 w-full text-center text-lg font-bold leading-tight text-card-foreground">
|
|
226
|
-
{label}
|
|
227
|
-
</h3>
|
|
228
133
|
<AnimatePresence>
|
|
229
134
|
{showToolbar && (
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
135
|
+
<div className="absolute -top-12 left-1/2 z-10 -translate-x-1/2">
|
|
136
|
+
<motion.div
|
|
137
|
+
className="border-border/70 bg-muted/80 flex items-center gap-1 rounded-md border p-1 shadow-md backdrop-blur"
|
|
138
|
+
onMouseEnter={showToolbarNow}
|
|
139
|
+
onMouseLeave={hideToolbarWithDelay}
|
|
140
|
+
initial={{ opacity: 0, y: 10 }}
|
|
141
|
+
animate={{ opacity: 1, y: 0 }}
|
|
142
|
+
exit={{ opacity: 0, y: 10, transition: { duration: 0.4, ease: 'easeOut' } }}
|
|
143
|
+
transition={{ duration: 0.22, ease: 'easeOut' }}
|
|
144
|
+
>
|
|
145
|
+
<Button
|
|
146
|
+
type="button"
|
|
147
|
+
variant="outline"
|
|
148
|
+
size="icon"
|
|
149
|
+
className="nodrag size-7"
|
|
150
|
+
aria-label="Edit"
|
|
151
|
+
onClick={handleEdit}
|
|
152
|
+
>
|
|
153
|
+
<Pencil aria-hidden="true" />
|
|
154
|
+
</Button>
|
|
155
|
+
<Button
|
|
156
|
+
type="button"
|
|
157
|
+
variant="outline"
|
|
158
|
+
size="icon"
|
|
159
|
+
className="nodrag size-7"
|
|
160
|
+
aria-label="Delete"
|
|
161
|
+
onClick={handleDelete}
|
|
162
|
+
disabled={isDeleteDisabled}
|
|
163
|
+
>
|
|
164
|
+
<Trash aria-hidden="true" />
|
|
165
|
+
</Button>
|
|
166
|
+
</motion.div>
|
|
167
|
+
</div>
|
|
240
168
|
)}
|
|
241
169
|
</AnimatePresence>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
170
|
+
<AnimatePresence>
|
|
171
|
+
{!hasOutgoingConnection && !isConnectionInProgress && (
|
|
172
|
+
<div className="absolute left-full top-1/2 z-20 -translate-y-1/2">
|
|
173
|
+
<motion.div
|
|
174
|
+
className="flex items-center"
|
|
175
|
+
initial={{ opacity: 0, x: -6, scale: 0.96 }}
|
|
176
|
+
animate={{ opacity: 1, x: 0, scale: 1 }}
|
|
177
|
+
exit={{ opacity: 0, x: -6, scale: 0.96 }}
|
|
178
|
+
transition={{ duration: 0.18, ease: 'easeOut' }}
|
|
179
|
+
>
|
|
180
|
+
<motion.span
|
|
181
|
+
aria-hidden="true"
|
|
182
|
+
className="h-px w-12 bg-emerald-500/70 shadow-[0_0_8px_rgba(16,185,129,0.4)]"
|
|
183
|
+
initial={{ scaleX: 0, transformOrigin: 'left' }}
|
|
184
|
+
animate={{ scaleX: 1 }}
|
|
185
|
+
exit={{ scaleX: 0 }}
|
|
186
|
+
transition={{ duration: 0.2, ease: 'easeOut' }}
|
|
187
|
+
/>
|
|
188
|
+
<motion.button
|
|
189
|
+
type="button"
|
|
190
|
+
className="nodrag nopan border-border/70 bg-muted/95 -ml-px flex size-5 items-center justify-center rounded border text-muted-foreground shadow-md transition-colors hover:border-emerald-400/70 hover:bg-emerald-500/20 hover:text-emerald-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-400/60"
|
|
191
|
+
aria-label="Add connected node"
|
|
192
|
+
onClick={handleAddConnectedNode}
|
|
193
|
+
whileHover={{ scale: 1.12 }}
|
|
194
|
+
whileTap={{ scale: 0.92 }}
|
|
195
|
+
animate={{
|
|
196
|
+
boxShadow: [
|
|
197
|
+
'0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)',
|
|
198
|
+
'0 0 0 4px rgba(16,185,129,0.12), 0 0 14px rgba(16,185,129,0.26)',
|
|
199
|
+
'0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)',
|
|
200
|
+
],
|
|
201
|
+
}}
|
|
202
|
+
transition={{
|
|
203
|
+
boxShadow: {
|
|
204
|
+
duration: 2.4,
|
|
205
|
+
repeat: Infinity,
|
|
206
|
+
ease: 'easeInOut',
|
|
207
|
+
},
|
|
208
|
+
}}
|
|
209
|
+
>
|
|
210
|
+
<Plus aria-hidden="true" className="size-3" />
|
|
211
|
+
</motion.button>
|
|
212
|
+
</motion.div>
|
|
213
|
+
</div>
|
|
214
|
+
)}
|
|
215
|
+
</AnimatePresence>
|
|
216
|
+
<div className="flex flex-col items-center gap-3 px-4 py-5 text-center">
|
|
217
|
+
<div
|
|
218
|
+
data-testid="node-step-icon"
|
|
219
|
+
className={cn(
|
|
220
|
+
'flex size-20 shrink-0 items-center justify-center rounded-2xl shadow-lg [&>svg]:size-10',
|
|
221
|
+
isMissingParams
|
|
222
|
+
? 'bg-white/15 text-white shadow-black/20'
|
|
223
|
+
: 'bg-primary/15 shadow-primary/20 text-primary',
|
|
224
|
+
)}
|
|
225
|
+
>
|
|
226
|
+
{KeyToIconTransformer(getTemplateStepIcon(icon))}
|
|
227
|
+
</div>
|
|
228
|
+
</div>
|
|
229
|
+
<div className="absolute left-1/2 top-full z-[5] mt-2 min-w-72 -translate-x-[47%]">
|
|
230
|
+
<h3
|
|
231
|
+
className={cn(
|
|
232
|
+
'relative -left-2 w-full text-center text-lg font-bold leading-tight',
|
|
233
|
+
isMissingParams ? 'text-white' : 'text-card-foreground',
|
|
234
|
+
)}
|
|
235
|
+
>
|
|
236
|
+
{label}
|
|
237
|
+
</h3>
|
|
238
|
+
<AnimatePresence>
|
|
239
|
+
{showToolbar && (
|
|
240
|
+
<motion.div
|
|
241
|
+
data-testid="node-gherkin-row"
|
|
242
|
+
className={cn('mt-2 text-sm leading-relaxed', isMissingParams ? 'text-white' : 'text-muted-foreground')}
|
|
243
|
+
initial={{ opacity: 0, y: 6 }}
|
|
244
|
+
animate={{ opacity: 1, y: 0 }}
|
|
245
|
+
exit={{ opacity: 0, y: 6 }}
|
|
246
|
+
transition={{ duration: 0.2, ease: 'easeOut' }}
|
|
247
|
+
>
|
|
248
|
+
<OptionsHeaderGherkinStep gherkinStep={gherkinStep} parameters={parameters} />
|
|
249
|
+
</motion.div>
|
|
250
|
+
)}
|
|
251
|
+
</AnimatePresence>
|
|
252
|
+
</div>
|
|
253
|
+
<Handle type="source" position={Position.Right} className="!z-30 !h-2.5 !w-2.5 !border-0 !bg-zinc-400" />
|
|
254
|
+
</BaseNode>
|
|
245
255
|
</LazyMotion>
|
|
246
256
|
)
|
|
247
257
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
const ErrorMessage = ({ message, visible }: { message: string; visible: boolean }) => {
|
|
4
|
-
return <div className={`text-sm text-pink-600 ${visible ? 'visible' : 'invisible'}`}>{message}</div>
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default ErrorMessage
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
const ErrorMessage = ({ message, visible }: { message: string; visible: boolean }) => {
|
|
4
|
+
return <div className={`text-sm text-pink-600 ${visible ? 'visible' : 'invisible'}`}>{message}</div>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default ErrorMessage
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Skeleton } from '@/components/ui/skeleton'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
const ButtonSkeleton = () => {
|
|
5
|
-
return <Skeleton className="h-10 w-24" />
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default ButtonSkeleton
|
|
1
|
+
import { Skeleton } from '@/components/ui/skeleton'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
const ButtonSkeleton = () => {
|
|
5
|
+
return <Skeleton className="h-10 w-24" />
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default ButtonSkeleton
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Skeleton } from '@/components/ui/skeleton'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
const TextInputSkeleton = () => {
|
|
5
|
-
return <Skeleton className="h-10 w-44" />
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export default TextInputSkeleton
|
|
1
|
+
import { Skeleton } from '@/components/ui/skeleton'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
const TextInputSkeleton = () => {
|
|
5
|
+
return <Skeleton className="h-10 w-44" />
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export default TextInputSkeleton
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { Skeleton } from '@/components/ui/skeleton'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
const TableSkeleton = () => {
|
|
5
|
-
return (
|
|
6
|
-
<div className="flex flex-col gap-2">
|
|
7
|
-
<Skeleton className="h-10 w-full" />
|
|
8
|
-
<Skeleton className="h-10 w-full" />
|
|
9
|
-
<Skeleton className="h-10 w-full" />
|
|
10
|
-
</div>
|
|
11
|
-
)
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default TableSkeleton
|
|
1
|
+
import { Skeleton } from '@/components/ui/skeleton'
|
|
2
|
+
import React from 'react'
|
|
3
|
+
|
|
4
|
+
const TableSkeleton = () => {
|
|
5
|
+
return (
|
|
6
|
+
<div className="flex flex-col gap-2">
|
|
7
|
+
<Skeleton className="h-10 w-full" />
|
|
8
|
+
<Skeleton className="h-10 w-full" />
|
|
9
|
+
<Skeleton className="h-10 w-full" />
|
|
10
|
+
</div>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default TableSkeleton
|
|
@@ -15,15 +15,9 @@ export interface EntitySearchCommandProps<T extends { id: string }> {
|
|
|
15
15
|
onSelect?: (entity: T) => void
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
type LoadState<T> =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
| { status: 'ready'; entities: T[] }
|
|
22
|
-
|
|
23
|
-
type LoadAction<T> =
|
|
24
|
-
| { type: 'reset' }
|
|
25
|
-
| { type: 'ready'; entities: T[] }
|
|
26
|
-
| { type: 'error'; message: string }
|
|
18
|
+
type LoadState<T> = { status: 'loading' } | { status: 'error'; message: string } | { status: 'ready'; entities: T[] }
|
|
19
|
+
|
|
20
|
+
type LoadAction<T> = { type: 'reset' } | { type: 'ready'; entities: T[] } | { type: 'error'; message: string }
|
|
27
21
|
|
|
28
22
|
function loadReducer<T>(state: LoadState<T>, action: LoadAction<T>): LoadState<T> {
|
|
29
23
|
switch (action.type) {
|