create-appraisejs 0.3.1-alpha.0 → 0.4.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- 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/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/.env.example +2 -2
- 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 +27 -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 +559 -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 +6 -6
- package/templates/blank/package-lock.json +60 -104
- package/templates/blank/package.json +11 -10
- package/templates/blank/packages/cucumber-runtime/package.json +14 -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/paths.ts +22 -5
- 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/package.json +2 -1
- 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/prisma/migrations/20251104113456_add_type_for_template_step_groups/migration.sql +16 -16
- package/templates/blank/prisma/migrations/20251104170946_add_tags_to_test_suite_and_test_case/migration.sql +27 -27
- package/templates/blank/prisma/migrations/20251112190024_add_cascade_delete_to_test_run_test_case/migration.sql +17 -17
- package/templates/blank/prisma/migrations/20251113181100_add_test_run_log/migration.sql +12 -12
- package/templates/blank/prisma/migrations/20251119191838_add_tag_type/migration.sql +28 -28
- package/templates/blank/prisma/migrations/20251121164059_add_conflict_resolution/migration.sql +12 -12
- package/templates/blank/prisma/migrations/20251223183400_add_report_model_to_db_schema/migration.sql +10 -10
- package/templates/blank/prisma/migrations/20251223183637_add_report_test_case_entity_for_storing_test_results_for_individual_test_cases/migration.sql +10 -10
- package/templates/blank/prisma/migrations/20251224083549_add_comprehensive_report_storage/migration.sql +108 -108
- package/templates/blank/prisma/migrations/20251229194422_migrate_duration_to_string/migration.sql +55 -55
- package/templates/blank/prisma/migrations/20251230124637_add_unique_constraint_to_test_run_name/migration.sql +27 -27
- package/templates/blank/prisma/migrations/20260115094436_add_dashboard_metrics/migration.sql +59 -59
- package/templates/blank/prisma/migrations/20260127172022_add_cascade_delete_to_step_parameters/migration.sql +34 -34
- package/templates/blank/prisma/migrations/20260313093000_add_report_step_screenshot_path/migration.sql +1 -1
- 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/setup-env.ts +0 -0
- 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 +125 -84
- 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 +73 -66
- package/templates/blank/src/components/diagram/flow-diagram-toolbar.tsx +35 -3
- package/templates/blank/src/components/diagram/flow-diagram-view.tsx +1 -7
- package/templates/blank/src/components/diagram/flow-diagram.test.tsx +225 -0
- 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-search.ts +2 -0
- package/templates/blank/src/components/diagram/use-flow-diagram.ts +93 -1
- 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/appraise-test-case-metadata.test.ts +78 -0
- package/templates/blank/src/lib/appraise-test-case-metadata.ts +220 -0
- package/templates/blank/src/lib/automation/automation-path-roots.test.ts +14 -0
- package/templates/blank/src/lib/automation/automation-path-roots.ts +10 -2
- package/templates/blank/src/lib/database-sync.ts +166 -15
- package/templates/blank/src/lib/executor/local-executor-adapter.ts +6 -2
- package/templates/blank/src/lib/feature-file-generator.ts +54 -10
- package/templates/blank/src/lib/gherkin-parser.test.ts +52 -0
- package/templates/blank/src/lib/gherkin-parser.ts +39 -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/projected-feature-utils.ts +5 -1
- package/templates/blank/src/lib/sync/sync-executor.ts +1 -4
- package/templates/blank/src/lib/sync/sync-pending-counts.test.ts +316 -7
- package/templates/blank/src/lib/sync/sync-pending-counts.ts +189 -26
- 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 +13 -6
- package/templates/blank/src/services/test-run/test-run-service.ts +53 -8
- 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/starter/.editorconfig +11 -0
- package/templates/starter/.env.example +2 -2
- 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 +27 -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 +559 -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 +6 -6
- package/templates/starter/package-lock.json +60 -104
- package/templates/starter/package.json +11 -10
- package/templates/starter/packages/cucumber-runtime/package.json +14 -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/paths.ts +22 -5
- 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/package.json +2 -1
- 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/prisma/migrations/20251104113456_add_type_for_template_step_groups/migration.sql +16 -16
- package/templates/starter/prisma/migrations/20251104170946_add_tags_to_test_suite_and_test_case/migration.sql +27 -27
- package/templates/starter/prisma/migrations/20251112190024_add_cascade_delete_to_test_run_test_case/migration.sql +17 -17
- package/templates/starter/prisma/migrations/20251113181100_add_test_run_log/migration.sql +12 -12
- package/templates/starter/prisma/migrations/20251119191838_add_tag_type/migration.sql +28 -28
- package/templates/starter/prisma/migrations/20251121164059_add_conflict_resolution/migration.sql +12 -12
- package/templates/starter/prisma/migrations/20251223183400_add_report_model_to_db_schema/migration.sql +10 -10
- package/templates/starter/prisma/migrations/20251223183637_add_report_test_case_entity_for_storing_test_results_for_individual_test_cases/migration.sql +10 -10
- package/templates/starter/prisma/migrations/20251224083549_add_comprehensive_report_storage/migration.sql +108 -108
- package/templates/starter/prisma/migrations/20251229194422_migrate_duration_to_string/migration.sql +55 -55
- package/templates/starter/prisma/migrations/20251230124637_add_unique_constraint_to_test_run_name/migration.sql +27 -27
- package/templates/starter/prisma/migrations/20260115094436_add_dashboard_metrics/migration.sql +59 -59
- package/templates/starter/prisma/migrations/20260127172022_add_cascade_delete_to_step_parameters/migration.sql +34 -34
- package/templates/starter/prisma/migrations/20260313093000_add_report_step_screenshot_path/migration.sql +1 -1
- 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/setup-env.ts +0 -0
- 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 +125 -84
- 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 +73 -66
- package/templates/starter/src/components/diagram/flow-diagram-toolbar.tsx +35 -3
- package/templates/starter/src/components/diagram/flow-diagram-view.tsx +1 -7
- package/templates/starter/src/components/diagram/flow-diagram.test.tsx +225 -0
- 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-search.ts +2 -0
- package/templates/starter/src/components/diagram/use-flow-diagram.ts +93 -1
- 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/appraise-test-case-metadata.test.ts +78 -0
- package/templates/starter/src/lib/appraise-test-case-metadata.ts +220 -0
- package/templates/starter/src/lib/automation/automation-path-roots.test.ts +14 -0
- package/templates/starter/src/lib/automation/automation-path-roots.ts +10 -2
- package/templates/starter/src/lib/database-sync.ts +166 -15
- package/templates/starter/src/lib/executor/local-executor-adapter.ts +6 -2
- package/templates/starter/src/lib/feature-file-generator.ts +54 -10
- package/templates/starter/src/lib/gherkin-parser.test.ts +52 -0
- package/templates/starter/src/lib/gherkin-parser.ts +39 -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/projected-feature-utils.ts +5 -1
- package/templates/starter/src/lib/sync/sync-executor.ts +1 -4
- package/templates/starter/src/lib/sync/sync-pending-counts.test.ts +316 -7
- package/templates/starter/src/lib/sync/sync-pending-counts.ts +189 -26
- 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 +13 -6
- package/templates/starter/src/services/test-run/test-run-service.ts +53 -8
- 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
- package/dist/cli.e2e.test.d.ts +0 -2
- package/dist/cli.e2e.test.d.ts.map +0 -1
- package/dist/cli.e2e.test.js +0 -73
- package/dist/cli.e2e.test.js.map +0 -1
- package/dist/config.test.d.ts +0 -2
- package/dist/config.test.d.ts.map +0 -1
- package/dist/config.test.js +0 -65
- package/dist/config.test.js.map +0 -1
- package/dist/copy-template.test.d.ts +0 -2
- package/dist/copy-template.test.d.ts.map +0 -1
- package/dist/copy-template.test.js +0 -71
- package/dist/copy-template.test.js.map +0 -1
- package/dist/download-repo.test.d.ts +0 -2
- package/dist/download-repo.test.d.ts.map +0 -1
- package/dist/download-repo.test.js +0 -14
- package/dist/download-repo.test.js.map +0 -1
- package/dist/install.test.d.ts +0 -2
- package/dist/install.test.d.ts.map +0 -1
- package/dist/install.test.js +0 -119
- package/dist/install.test.js.map +0 -1
- package/dist/prompts.test.d.ts +0 -2
- package/dist/prompts.test.d.ts.map +0 -1
- package/dist/prompts.test.js +0 -58
- package/dist/prompts.test.js.map +0 -1
- package/templates/default/next-env.d.ts +0 -6
- package/templates/default/packages/locator-picker-companion/dist/cli.d.ts +0 -1
- package/templates/default/packages/locator-picker-companion/dist/cli.js +0 -302
- package/templates/default/packages/locator-picker-companion/dist/index.d.ts +0 -3
- package/templates/default/packages/locator-picker-companion/dist/index.js +0 -3
- package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.d.ts +0 -1
- package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.js +0 -615
- package/templates/default/packages/locator-picker-companion/dist/launcher.d.ts +0 -11
- package/templates/default/packages/locator-picker-companion/dist/launcher.js +0 -59
- package/templates/default/packages/locator-picker-companion/dist/selector-generator.d.ts +0 -3
- package/templates/default/packages/locator-picker-companion/dist/selector-generator.js +0 -257
- package/templates/default/packages/locator-picker-companion/dist/session-file.d.ts +0 -22
- package/templates/default/packages/locator-picker-companion/dist/session-file.js +0 -150
- package/templates/default/packages/locator-picker-companion/dist/types.d.ts +0 -31
- package/templates/default/packages/locator-picker-companion/dist/types.js +0 -1
- package/templates/default/prisma/dev.db +0 -0
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { usePathname } from 'next/navigation'
|
|
4
|
-
import Link from 'next/link'
|
|
5
|
-
import { useMemo } from 'react'
|
|
6
|
-
import { cn } from '@/lib/utils'
|
|
7
|
-
|
|
8
|
-
const NavLink = ({
|
|
9
|
-
children,
|
|
10
|
-
href,
|
|
11
|
-
icon,
|
|
12
|
-
className,
|
|
13
|
-
isIconOnly,
|
|
14
|
-
}: {
|
|
15
|
-
children?: React.ReactNode
|
|
16
|
-
href: string
|
|
17
|
-
icon?: React.ReactNode
|
|
18
|
-
className?: React.HTMLAttributes<HTMLAnchorElement>['className']
|
|
19
|
-
isIconOnly?: boolean
|
|
20
|
-
}) => {
|
|
21
|
-
const pathname = usePathname()
|
|
22
|
-
|
|
23
|
-
// Use useMemo to prevent unnecessary re-renders and ensure stable active state
|
|
24
|
-
const isActive = useMemo(() => {
|
|
25
|
-
// Exact match for root paths
|
|
26
|
-
if (href === '/' && pathname === '/') {
|
|
27
|
-
return true
|
|
28
|
-
}
|
|
29
|
-
// For other paths, check if the current path starts with the href
|
|
30
|
-
// This handles nested routes like /test-cases/create, /test-cases/modify, etc.
|
|
31
|
-
return href !== '/' && pathname.startsWith(href)
|
|
32
|
-
}, [pathname, href])
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Link
|
|
36
|
-
href={href}
|
|
37
|
-
className={cn(
|
|
38
|
-
'group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors',
|
|
39
|
-
'hover:bg-accent hover:text-accent-foreground',
|
|
40
|
-
'focus:bg-accent focus:text-accent-foreground',
|
|
41
|
-
'focus-visible:
|
|
42
|
-
'disabled:pointer-events-none disabled:opacity-50',
|
|
43
|
-
'outline-none',
|
|
44
|
-
isActive && 'bg-accent text-accent-foreground',
|
|
45
|
-
className,
|
|
46
|
-
)}
|
|
47
|
-
>
|
|
48
|
-
{isIconOnly ? (
|
|
49
|
-
icon
|
|
50
|
-
) : (
|
|
51
|
-
<div className="flex items-center gap-1">
|
|
52
|
-
{icon}
|
|
53
|
-
{children}
|
|
54
|
-
</div>
|
|
55
|
-
)}
|
|
56
|
-
</Link>
|
|
57
|
-
)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export default NavLink
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { usePathname } from 'next/navigation'
|
|
4
|
+
import Link from 'next/link'
|
|
5
|
+
import { useMemo } from 'react'
|
|
6
|
+
import { cn } from '@/lib/utils'
|
|
7
|
+
|
|
8
|
+
const NavLink = ({
|
|
9
|
+
children,
|
|
10
|
+
href,
|
|
11
|
+
icon,
|
|
12
|
+
className,
|
|
13
|
+
isIconOnly,
|
|
14
|
+
}: {
|
|
15
|
+
children?: React.ReactNode
|
|
16
|
+
href: string
|
|
17
|
+
icon?: React.ReactNode
|
|
18
|
+
className?: React.HTMLAttributes<HTMLAnchorElement>['className']
|
|
19
|
+
isIconOnly?: boolean
|
|
20
|
+
}) => {
|
|
21
|
+
const pathname = usePathname()
|
|
22
|
+
|
|
23
|
+
// Use useMemo to prevent unnecessary re-renders and ensure stable active state
|
|
24
|
+
const isActive = useMemo(() => {
|
|
25
|
+
// Exact match for root paths
|
|
26
|
+
if (href === '/' && pathname === '/') {
|
|
27
|
+
return true
|
|
28
|
+
}
|
|
29
|
+
// For other paths, check if the current path starts with the href
|
|
30
|
+
// This handles nested routes like /test-cases/create, /test-cases/modify, etc.
|
|
31
|
+
return href !== '/' && pathname.startsWith(href)
|
|
32
|
+
}, [pathname, href])
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Link
|
|
36
|
+
href={href}
|
|
37
|
+
className={cn(
|
|
38
|
+
'group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors',
|
|
39
|
+
'hover:bg-accent hover:text-accent-foreground',
|
|
40
|
+
'focus:bg-accent focus:text-accent-foreground',
|
|
41
|
+
'focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:ring-[3px]',
|
|
42
|
+
'disabled:pointer-events-none disabled:opacity-50',
|
|
43
|
+
'outline-none',
|
|
44
|
+
isActive && 'bg-accent text-accent-foreground',
|
|
45
|
+
className,
|
|
46
|
+
)}
|
|
47
|
+
>
|
|
48
|
+
{isIconOnly ? (
|
|
49
|
+
icon
|
|
50
|
+
) : (
|
|
51
|
+
<div className="flex items-center gap-1">
|
|
52
|
+
{icon}
|
|
53
|
+
{children}
|
|
54
|
+
</div>
|
|
55
|
+
)}
|
|
56
|
+
</Link>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export default NavLink
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { StepParameterType, TemplateStepIcon } from '@prisma/client'
|
|
2
2
|
import { describe, expect, it } from 'vitest'
|
|
3
3
|
|
|
4
|
-
import {
|
|
5
|
-
buildScenarioPreview,
|
|
6
|
-
buildScenarioSteps,
|
|
7
|
-
getNodesWithMissingMandatoryParams,
|
|
8
|
-
} from './test-case-form-helpers'
|
|
4
|
+
import { buildScenarioPreview, buildScenarioSteps, getNodesWithMissingMandatoryParams } from './test-case-form-helpers'
|
|
9
5
|
|
|
10
6
|
describe('test-case form helpers', () => {
|
|
11
7
|
it('builds gherkin preview text from ordered scenario steps', () => {
|
|
@@ -54,11 +54,7 @@ export function buildScenarioSteps(nodeOrder: ScenarioNodeOrder) {
|
|
|
54
54
|
}))
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
export function buildScenarioPreview(
|
|
58
|
-
title: string,
|
|
59
|
-
description: string | undefined,
|
|
60
|
-
nodeOrder: ScenarioNodeOrder,
|
|
61
|
-
) {
|
|
57
|
+
export function buildScenarioPreview(title: string, description: string | undefined, nodeOrder: ScenarioNodeOrder) {
|
|
62
58
|
if (!title) {
|
|
63
59
|
return ''
|
|
64
60
|
}
|
|
@@ -10,16 +10,14 @@ export function createSelectionState(selectedIds: string[]): RowSelectionState {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export function testCaseMatchesQuery(testCase: TestCasePickerRow, filterValue: unknown): boolean {
|
|
13
|
-
const query = String(filterValue ?? '')
|
|
13
|
+
const query = String(filterValue ?? '')
|
|
14
|
+
.trim()
|
|
15
|
+
.toLowerCase()
|
|
14
16
|
if (!query) {
|
|
15
17
|
return true
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
const searchableText = [
|
|
19
|
-
testCase.title,
|
|
20
|
-
testCase.description ?? '',
|
|
21
|
-
...testCase.tags.map(tag => tag.name),
|
|
22
|
-
]
|
|
20
|
+
const searchableText = [testCase.title, testCase.description ?? '', ...testCase.tags.map(tag => tag.name)]
|
|
23
21
|
.join(' ')
|
|
24
22
|
.toLowerCase()
|
|
25
23
|
|
|
@@ -32,7 +30,10 @@ export function getSavedTestCases(testCases: TestCasePickerRow[], selectedIds: s
|
|
|
32
30
|
.filter((testCase): testCase is TestCasePickerRow => Boolean(testCase))
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
export function getSelectedIdsFromRowSelection(
|
|
33
|
+
export function getSelectedIdsFromRowSelection(
|
|
34
|
+
testCases: TestCasePickerRow[],
|
|
35
|
+
rowSelection: RowSelectionState,
|
|
36
|
+
): string[] {
|
|
36
37
|
return testCases.filter(testCase => rowSelection[testCase.id]).map(testCase => testCase.id)
|
|
37
38
|
}
|
|
38
39
|
|
|
@@ -187,9 +187,7 @@ function TestCasePicker({
|
|
|
187
187
|
<TableRow key={headerGroup.id}>
|
|
188
188
|
{headerGroup.headers.map(header => (
|
|
189
189
|
<TableHead key={header.id}>
|
|
190
|
-
{header.isPlaceholder
|
|
191
|
-
? null
|
|
192
|
-
: flexRender(header.column.columnDef.header, header.getContext())}
|
|
190
|
+
{header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext())}
|
|
193
191
|
</TableHead>
|
|
194
192
|
))}
|
|
195
193
|
</TableRow>
|
|
@@ -200,9 +198,7 @@ function TestCasePicker({
|
|
|
200
198
|
table.getRowModel().rows.map(row => (
|
|
201
199
|
<TableRow key={row.id} data-state={row.getIsSelected() && 'selected'}>
|
|
202
200
|
{row.getVisibleCells().map(cell => (
|
|
203
|
-
<TableCell key={cell.id}>
|
|
204
|
-
{flexRender(cell.column.columnDef.cell, cell.getContext())}
|
|
205
|
-
</TableCell>
|
|
201
|
+
<TableCell key={cell.id}>{flexRender(cell.column.columnDef.cell, cell.getContext())}</TableCell>
|
|
206
202
|
))}
|
|
207
203
|
</TableRow>
|
|
208
204
|
))
|
|
@@ -77,6 +77,31 @@ describe('LogViewer', () => {
|
|
|
77
77
|
expect(screen.getByText('Download logs for run-1')).toBeInTheDocument()
|
|
78
78
|
})
|
|
79
79
|
|
|
80
|
+
it('renders duplicate log entries without dropping repeated messages', async () => {
|
|
81
|
+
const duplicateTimestamp = '2026-05-30T09:22:19.484Z'
|
|
82
|
+
const duplicateMessage =
|
|
83
|
+
'Scenario completed: [Demo Run With Template] Demo run using a template test case - unknown'
|
|
84
|
+
getTestRunLogsAction.mockResolvedValue({
|
|
85
|
+
status: 200,
|
|
86
|
+
data: [
|
|
87
|
+
{
|
|
88
|
+
type: 'status',
|
|
89
|
+
message: duplicateMessage,
|
|
90
|
+
timestamp: duplicateTimestamp,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: 'status',
|
|
94
|
+
message: duplicateMessage,
|
|
95
|
+
timestamp: duplicateTimestamp,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
render(<LogViewer testRunId="run-duplicates" status={TestRunStatus.COMPLETED} />)
|
|
101
|
+
|
|
102
|
+
expect(await screen.findAllByText(duplicateMessage)).toHaveLength(2)
|
|
103
|
+
})
|
|
104
|
+
|
|
80
105
|
it('streams live logs and dispatches the exit event when the run completes', async () => {
|
|
81
106
|
const emittedEvents: Array<Event> = []
|
|
82
107
|
const addEventListenerSpy = vi.spyOn(window, 'dispatchEvent')
|
|
@@ -110,9 +110,9 @@ export function LogViewer({ testRunId, status, className }: LogViewerProps) {
|
|
|
110
110
|
{logs.length === 0 && connectionStatus !== 'connecting' && connectionStatus !== 'loading' ? (
|
|
111
111
|
<div className="flex items-center justify-center py-8 text-muted-foreground">No logs available</div>
|
|
112
112
|
) : null}
|
|
113
|
-
{logs.map(log => (
|
|
113
|
+
{logs.map((log, index) => (
|
|
114
114
|
<div
|
|
115
|
-
key={`${log.timestamp.toISOString()}-${log.type}-${log.message}`}
|
|
115
|
+
key={`${log.timestamp.toISOString()}-${log.type}-${log.message}-${index}`}
|
|
116
116
|
className={cn(
|
|
117
117
|
'mb-1 flex items-start gap-2 whitespace-pre-wrap break-words',
|
|
118
118
|
log.type === 'stderr' && 'text-red-400',
|
|
@@ -44,7 +44,16 @@ function isTestRunDetailsTestCase(value: unknown): value is TestRunDetailsTestCa
|
|
|
44
44
|
|
|
45
45
|
function hasTestRunScalarFields(value: UnknownRecord) {
|
|
46
46
|
return (
|
|
47
|
-
hasFields(value, [
|
|
47
|
+
hasFields(value, [
|
|
48
|
+
'id',
|
|
49
|
+
'runId',
|
|
50
|
+
'status',
|
|
51
|
+
'result',
|
|
52
|
+
'startedAt',
|
|
53
|
+
'completedAt',
|
|
54
|
+
'browserEngine',
|
|
55
|
+
'testWorkersCount',
|
|
56
|
+
]) &&
|
|
48
57
|
value.startedAt instanceof Date &&
|
|
49
58
|
(value.completedAt instanceof Date || value.completedAt === null)
|
|
50
59
|
)
|
|
@@ -2,30 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
import { act, render, screen, waitFor } from '@testing-library/react'
|
|
4
4
|
import userEvent from '@testing-library/user-event'
|
|
5
|
-
import {
|
|
6
|
-
TestRunResult,
|
|
7
|
-
TestRunStatus,
|
|
8
|
-
TestRunTestCaseResult,
|
|
9
|
-
TestRunTestCaseStatus,
|
|
10
|
-
} from '@prisma/client'
|
|
5
|
+
import { TestRunResult, TestRunStatus, TestRunTestCaseResult, TestRunTestCaseStatus } from '@prisma/client'
|
|
11
6
|
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|
12
7
|
|
|
13
8
|
import { TestRunDetails } from './test-run-details'
|
|
14
9
|
import type { TestRunDetailsData } from './test-run-details-helpers'
|
|
15
10
|
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
spawnTraceViewerAction: vi.fn(),
|
|
25
|
-
checkTraceViewerStatusAction: vi.fn(),
|
|
26
|
-
cancelTestRunAction: vi.fn(),
|
|
27
|
-
toast: vi.fn(),
|
|
28
|
-
}))
|
|
11
|
+
const { getTestRunByIdAction, spawnTraceViewerAction, checkTraceViewerStatusAction, cancelTestRunAction, toast } =
|
|
12
|
+
vi.hoisted(() => ({
|
|
13
|
+
getTestRunByIdAction: vi.fn(),
|
|
14
|
+
spawnTraceViewerAction: vi.fn(),
|
|
15
|
+
checkTraceViewerStatusAction: vi.fn(),
|
|
16
|
+
cancelTestRunAction: vi.fn(),
|
|
17
|
+
toast: vi.fn(),
|
|
18
|
+
}))
|
|
29
19
|
|
|
30
20
|
vi.mock('@/actions/test-run/test-run-actions', () => ({
|
|
31
21
|
getTestRunByIdAction,
|
|
@@ -128,10 +128,7 @@ export function useLogViewer({ testRunId, status }: UseLogViewerParams) {
|
|
|
128
128
|
console.log('[LogViewer] Received log event:', data)
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
setLogs(currentLogs => [
|
|
132
|
-
...currentLogs,
|
|
133
|
-
createLogMessage(data.type || 'stdout', data.message || ''),
|
|
134
|
-
])
|
|
131
|
+
setLogs(currentLogs => [...currentLogs, createLogMessage(data.type || 'stdout', data.message || '')])
|
|
135
132
|
} catch (error) {
|
|
136
133
|
console.error('[LogViewer] Error parsing log event:', error, 'event.data:', event.data)
|
|
137
134
|
}
|
|
@@ -147,10 +144,7 @@ export function useLogViewer({ testRunId, status }: UseLogViewerParams) {
|
|
|
147
144
|
}
|
|
148
145
|
|
|
149
146
|
const data = JSON.parse(event.data)
|
|
150
|
-
setLogs(currentLogs => [
|
|
151
|
-
...currentLogs,
|
|
152
|
-
createLogMessage('status', `Process exited with code ${data.code}`),
|
|
153
|
-
])
|
|
147
|
+
setLogs(currentLogs => [...currentLogs, createLogMessage('status', `Process exited with code ${data.code}`)])
|
|
154
148
|
} catch (error) {
|
|
155
149
|
console.error('[LogViewer] Error parsing exit event:', error, 'event.data:', event.data)
|
|
156
150
|
} finally {
|
|
@@ -4,10 +4,7 @@ import { useCallback, useEffect, useState } from 'react'
|
|
|
4
4
|
|
|
5
5
|
import { getTestRunByIdAction } from '@/actions/test-run/test-run-actions'
|
|
6
6
|
|
|
7
|
-
import {
|
|
8
|
-
getTestRunDetailsData,
|
|
9
|
-
type TestRunDetailsData,
|
|
10
|
-
} from './test-run-details-helpers'
|
|
7
|
+
import { getTestRunDetailsData, type TestRunDetailsData } from './test-run-details-helpers'
|
|
11
8
|
import {
|
|
12
9
|
getTestRunHeaderPollMode,
|
|
13
10
|
matchesTestRunExitEvent,
|
|
@@ -9,7 +9,13 @@ type ThemeProviderProps = {
|
|
|
9
9
|
|
|
10
10
|
export function ThemeProvider({ children }: ThemeProviderProps) {
|
|
11
11
|
return (
|
|
12
|
-
<NextThemesProvider
|
|
12
|
+
<NextThemesProvider
|
|
13
|
+
attribute="class"
|
|
14
|
+
defaultTheme="dark"
|
|
15
|
+
forcedTheme="dark"
|
|
16
|
+
enableSystem={false}
|
|
17
|
+
disableTransitionOnChange
|
|
18
|
+
>
|
|
13
19
|
{children}
|
|
14
20
|
</NextThemesProvider>
|
|
15
21
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
|
|
3
|
-
const HeaderSubtitle = ({ children }: { children: React.ReactNode }) => {
|
|
4
|
-
return <div className="text-sm font-medium text-muted-foreground">{children}</div>
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default HeaderSubtitle
|
|
1
|
+
import React from 'react'
|
|
2
|
+
|
|
3
|
+
const HeaderSubtitle = ({ children }: { children: React.ReactNode }) => {
|
|
4
|
+
return <div className="text-sm font-medium text-muted-foreground">{children}</div>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default HeaderSubtitle
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from '@/lib/utils'
|
|
2
|
-
|
|
3
|
-
const PageHeader = ({ className, children }: { className?: string; children: React.ReactNode }) => {
|
|
4
|
-
return <div className={cn('text-4xl font-bold text-primary', className)}>{children}</div>
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default PageHeader
|
|
1
|
+
import { cn } from '@/lib/utils'
|
|
2
|
+
|
|
3
|
+
const PageHeader = ({ className, children }: { className?: string; children: React.ReactNode }) => {
|
|
4
|
+
return <div className={cn('text-4xl font-bold text-primary', className)}>{children}</div>
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export default PageHeader
|
|
@@ -166,10 +166,7 @@ function ChartTooltipContentActive({
|
|
|
166
166
|
ref,
|
|
167
167
|
}: ChartTooltipContentProps) {
|
|
168
168
|
const { config } = useChart()
|
|
169
|
-
const resolvedPayload = React.useMemo(
|
|
170
|
-
() => (payload?.length ? payload : EMPTY_CHART_TOOLTIP_PAYLOAD),
|
|
171
|
-
[payload],
|
|
172
|
-
)
|
|
169
|
+
const resolvedPayload = React.useMemo(() => (payload?.length ? payload : EMPTY_CHART_TOOLTIP_PAYLOAD), [payload])
|
|
173
170
|
|
|
174
171
|
if (!resolvedPayload.length) {
|
|
175
172
|
return null
|
|
@@ -239,10 +236,7 @@ function ChartTooltipContentActive({
|
|
|
239
236
|
)
|
|
240
237
|
)}
|
|
241
238
|
<div
|
|
242
|
-
className={cn(
|
|
243
|
-
'flex flex-1 justify-between leading-none',
|
|
244
|
-
nestLabel ? 'items-end' : 'items-center',
|
|
245
|
-
)}
|
|
239
|
+
className={cn('flex flex-1 justify-between leading-none', nestLabel ? 'items-end' : 'items-center')}
|
|
246
240
|
>
|
|
247
241
|
<div className="grid gap-1.5">
|
|
248
242
|
{nestLabel ? (
|
|
@@ -56,10 +56,7 @@ CommandInput.displayName = CommandPrimitive.Input.displayName
|
|
|
56
56
|
|
|
57
57
|
function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>) {
|
|
58
58
|
return (
|
|
59
|
-
<CommandPrimitive.List
|
|
60
|
-
className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)}
|
|
61
|
-
{...props}
|
|
62
|
-
/>
|
|
59
|
+
<CommandPrimitive.List className={cn('max-h-[300px] overflow-y-auto overflow-x-hidden', className)} {...props} />
|
|
63
60
|
)
|
|
64
61
|
}
|
|
65
62
|
|
|
@@ -89,7 +86,7 @@ function CommandItem({ className, ...props }: React.ComponentProps<typeof Comman
|
|
|
89
86
|
return (
|
|
90
87
|
<CommandPrimitive.Item
|
|
91
88
|
className={cn(
|
|
92
|
-
'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-
|
|
89
|
+
'relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-popover-foreground outline-none hover:bg-accent hover:text-accent-foreground data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
|
|
93
90
|
className,
|
|
94
91
|
)}
|
|
95
92
|
{...props}
|
|
@@ -42,16 +42,16 @@ export function DataTableColumnHeader<TData, TValue>({
|
|
|
42
42
|
</DropdownMenuTrigger>
|
|
43
43
|
<DropdownMenuContent align="start">
|
|
44
44
|
<DropdownMenuItem onClick={() => column.toggleSorting(false)}>
|
|
45
|
-
<ArrowUp className="
|
|
45
|
+
<ArrowUp className="text-muted-foreground/70 size-3.5" />
|
|
46
46
|
Asc
|
|
47
47
|
</DropdownMenuItem>
|
|
48
48
|
<DropdownMenuItem onClick={() => column.toggleSorting(true)}>
|
|
49
|
-
<ArrowDown className="
|
|
49
|
+
<ArrowDown className="text-muted-foreground/70 size-3.5" />
|
|
50
50
|
Desc
|
|
51
51
|
</DropdownMenuItem>
|
|
52
52
|
<DropdownMenuSeparator />
|
|
53
53
|
<DropdownMenuItem onClick={() => column.toggleVisibility(false)}>
|
|
54
|
-
<EyeOff className="
|
|
54
|
+
<EyeOff className="text-muted-foreground/70 size-3.5" />
|
|
55
55
|
Hide
|
|
56
56
|
</DropdownMenuItem>
|
|
57
57
|
</DropdownMenuContent>
|
|
@@ -15,14 +15,7 @@ const { toast } = vi.hoisted(() => ({
|
|
|
15
15
|
}))
|
|
16
16
|
|
|
17
17
|
vi.mock('next/link', () => ({
|
|
18
|
-
default: ({
|
|
19
|
-
href,
|
|
20
|
-
children,
|
|
21
|
-
...props
|
|
22
|
-
}: {
|
|
23
|
-
href: string
|
|
24
|
-
children: ReactNode
|
|
25
|
-
}) => (
|
|
18
|
+
default: ({ href, children, ...props }: { href: string; children: ReactNode }) => (
|
|
26
19
|
<a href={href} {...props}>
|
|
27
20
|
{children}
|
|
28
21
|
</a>
|
|
@@ -61,10 +61,7 @@ DialogFooter.displayName = 'DialogFooter'
|
|
|
61
61
|
|
|
62
62
|
function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {
|
|
63
63
|
return (
|
|
64
|
-
<DialogPrimitive.Title
|
|
65
|
-
className={cn('text-lg font-semibold leading-none tracking-tight', className)}
|
|
66
|
-
{...props}
|
|
67
|
-
/>
|
|
64
|
+
<DialogPrimitive.Title className={cn('text-lg font-semibold leading-none tracking-tight', className)} {...props} />
|
|
68
65
|
)
|
|
69
66
|
}
|
|
70
67
|
|
|
@@ -105,12 +105,12 @@ function SelectItem({ className, children, ...props }: React.ComponentProps<type
|
|
|
105
105
|
return (
|
|
106
106
|
<SelectPrimitive.Item
|
|
107
107
|
className={cn(
|
|
108
|
-
'
|
|
108
|
+
'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm text-popover-foreground outline-none hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:opacity-50',
|
|
109
109
|
className,
|
|
110
110
|
)}
|
|
111
111
|
{...props}
|
|
112
112
|
>
|
|
113
|
-
<span className="absolute right-2 flex
|
|
113
|
+
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
114
114
|
<SelectPrimitive.ItemIndicator>
|
|
115
115
|
<Check className="size-4" />
|
|
116
116
|
</SelectPrimitive.ItemIndicator>
|
|
@@ -15,7 +15,11 @@ function Separator({
|
|
|
15
15
|
<SeparatorPrimitive.Root
|
|
16
16
|
decorative={decorative}
|
|
17
17
|
orientation={orientation}
|
|
18
|
-
className={cn(
|
|
18
|
+
className={cn(
|
|
19
|
+
'shrink-0 bg-border',
|
|
20
|
+
orientation === 'horizontal' ? 'h-[1px] w-full' : 'h-full w-[1px]',
|
|
21
|
+
className,
|
|
22
|
+
)}
|
|
19
23
|
{...props}
|
|
20
24
|
/>
|
|
21
25
|
)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { cn } from '@/lib/utils'
|
|
2
|
-
|
|
3
|
-
function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
|
4
|
-
return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export { Skeleton }
|
|
1
|
+
import { cn } from '@/lib/utils'
|
|
2
|
+
|
|
3
|
+
function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
|
4
|
+
return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export { Skeleton }
|
|
@@ -21,7 +21,7 @@ function TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {
|
|
|
21
21
|
function TableRow({ className, ...props }: React.ComponentProps<'tr'>) {
|
|
22
22
|
return (
|
|
23
23
|
<tr
|
|
24
|
-
className={cn('border-b transition-colors
|
|
24
|
+
className={cn('hover:bg-muted/50 border-b transition-colors data-[state=selected]:bg-muted', className)}
|
|
25
25
|
{...props}
|
|
26
26
|
/>
|
|
27
27
|
)
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { useToast } from '@/hooks/use-toast'
|
|
4
|
-
import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '@/components/ui/toast'
|
|
5
|
-
|
|
6
|
-
export function Toaster() {
|
|
7
|
-
const { toasts } = useToast()
|
|
8
|
-
|
|
9
|
-
return (
|
|
10
|
-
<ToastProvider>
|
|
11
|
-
{toasts.map(function ({ id, title, description, action, ...props }) {
|
|
12
|
-
return (
|
|
13
|
-
<Toast key={id} {...props}>
|
|
14
|
-
<div className="grid gap-1">
|
|
15
|
-
{title && <ToastTitle>{title}</ToastTitle>}
|
|
16
|
-
{description && <ToastDescription>{description}</ToastDescription>}
|
|
17
|
-
</div>
|
|
18
|
-
{action}
|
|
19
|
-
<ToastClose />
|
|
20
|
-
</Toast>
|
|
21
|
-
)
|
|
22
|
-
})}
|
|
23
|
-
<ToastViewport />
|
|
24
|
-
</ToastProvider>
|
|
25
|
-
)
|
|
26
|
-
}
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { useToast } from '@/hooks/use-toast'
|
|
4
|
+
import { Toast, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport } from '@/components/ui/toast'
|
|
5
|
+
|
|
6
|
+
export function Toaster() {
|
|
7
|
+
const { toasts } = useToast()
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<ToastProvider>
|
|
11
|
+
{toasts.map(function ({ id, title, description, action, ...props }) {
|
|
12
|
+
return (
|
|
13
|
+
<Toast key={id} {...props}>
|
|
14
|
+
<div className="grid gap-1">
|
|
15
|
+
{title && <ToastTitle>{title}</ToastTitle>}
|
|
16
|
+
{description && <ToastDescription>{description}</ToastDescription>}
|
|
17
|
+
</div>
|
|
18
|
+
{action}
|
|
19
|
+
<ToastClose />
|
|
20
|
+
</Toast>
|
|
21
|
+
)
|
|
22
|
+
})}
|
|
23
|
+
<ToastViewport />
|
|
24
|
+
</ToastProvider>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
@@ -21,7 +21,7 @@ function TooltipContent({
|
|
|
21
21
|
<TooltipPrimitive.Content
|
|
22
22
|
sideOffset={sideOffset}
|
|
23
23
|
className={cn(
|
|
24
|
-
'z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2
|
|
24
|
+
'z-50 origin-[--radix-tooltip-content-transform-origin] overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
|
|
25
25
|
className,
|
|
26
26
|
)}
|
|
27
27
|
{...props}
|
|
@@ -4,7 +4,7 @@ export const locatorGroupSchema = z.object({
|
|
|
4
4
|
name: z.string().min(1, { message: 'Name is required' }),
|
|
5
5
|
moduleId: z.string().min(1, { message: 'Module is required' }),
|
|
6
6
|
locators: z.array(z.string()).optional(),
|
|
7
|
-
route: z.string().
|
|
7
|
+
route: z.string().trim().min(1, { message: 'Route is required' }),
|
|
8
8
|
})
|
|
9
9
|
|
|
10
10
|
export type LocatorGroup = z.infer<typeof locatorGroupSchema>
|