create-appraise 0.1.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 +52 -0
- package/package.json +63 -0
- package/templates/default/.env.example +2 -0
- package/templates/default/README.md +51 -0
- package/templates/default/appraise.config.json +4 -0
- package/templates/default/components.json +24 -0
- package/templates/default/eslint.config.mjs +15 -0
- package/templates/default/next-env.d.ts +6 -0
- package/templates/default/next.config.ts +7 -0
- package/templates/default/package-lock.json +14321 -0
- package/templates/default/package.json +124 -0
- package/templates/default/postcss.config.mjs +8 -0
- package/templates/default/prisma/migrations/20251026202316_migrate_back_to_sqlite/migration.sql +257 -0
- package/templates/default/prisma/migrations/20251104113456_add_type_for_template_step_groups/migration.sql +16 -0
- package/templates/default/prisma/migrations/20251104170946_add_tags_to_test_suite_and_test_case/migration.sql +27 -0
- package/templates/default/prisma/migrations/20251112190024_add_cascade_delete_to_test_run_test_case/migration.sql +17 -0
- package/templates/default/prisma/migrations/20251113181100_add_test_run_log/migration.sql +12 -0
- package/templates/default/prisma/migrations/20251119191838_add_tag_type/migration.sql +28 -0
- package/templates/default/prisma/migrations/20251121164059_add_conflict_resolution/migration.sql +12 -0
- package/templates/default/prisma/migrations/20251130190737_add_trace_path_to_test_run_test_case/migration.sql +2 -0
- package/templates/default/prisma/migrations/20251213074835_add_log_path_to_test_run/migration.sql +2 -0
- package/templates/default/prisma/migrations/20251213183952_add_name_property_for_the_test_run_entities/migration.sql +30 -0
- package/templates/default/prisma/migrations/20251223183400_add_report_model_to_db_schema/migration.sql +10 -0
- package/templates/default/prisma/migrations/20251223183637_add_report_test_case_entity_for_storing_test_results_for_individual_test_cases/migration.sql +10 -0
- package/templates/default/prisma/migrations/20251224083549_add_comprehensive_report_storage/migration.sql +108 -0
- package/templates/default/prisma/migrations/20251229194422_migrate_duration_to_string/migration.sql +55 -0
- package/templates/default/prisma/migrations/20251230124637_add_unique_constraint_to_test_run_name/migration.sql +27 -0
- package/templates/default/prisma/migrations/20260115094436_add_dashboard_metrics/migration.sql +59 -0
- package/templates/default/prisma/migrations/20260127172022_add_cascade_delete_to_step_parameters/migration.sql +34 -0
- package/templates/default/prisma/migrations/migration_lock.toml +3 -0
- package/templates/default/prisma/schema.prisma +554 -0
- package/templates/default/public/favicon.ico +0 -0
- package/templates/default/public/file.svg +1 -0
- package/templates/default/public/globe.svg +1 -0
- package/templates/default/public/next.svg +1 -0
- package/templates/default/public/vercel.svg +1 -0
- package/templates/default/public/window.svg +1 -0
- package/templates/default/scripts/regenerate-features.ts +94 -0
- package/templates/default/scripts/setup-env.ts +19 -0
- package/templates/default/scripts/sync-all.ts +341 -0
- package/templates/default/scripts/sync-environments.ts +323 -0
- package/templates/default/scripts/sync-locator-groups.ts +413 -0
- package/templates/default/scripts/sync-locators.ts +402 -0
- package/templates/default/scripts/sync-modules.ts +349 -0
- package/templates/default/scripts/sync-tags.ts +292 -0
- package/templates/default/scripts/sync-template-step-groups.ts +399 -0
- package/templates/default/scripts/sync-template-steps.ts +806 -0
- package/templates/default/scripts/sync-test-cases.ts +905 -0
- package/templates/default/scripts/sync-test-suites.ts +411 -0
- package/templates/default/src/actions/conflict/conflict.action.ts +33 -0
- package/templates/default/src/actions/dashboard/dashboard-actions.ts +241 -0
- package/templates/default/src/actions/environments/environment-actions.ts +205 -0
- package/templates/default/src/actions/locator/locator-actions.ts +547 -0
- package/templates/default/src/actions/locator-groups/locator-group-actions.ts +344 -0
- package/templates/default/src/actions/modules/module-actions.ts +133 -0
- package/templates/default/src/actions/reports/report-actions.ts +614 -0
- package/templates/default/src/actions/review/review-actions.ts +147 -0
- package/templates/default/src/actions/tags/tag-actions.ts +104 -0
- package/templates/default/src/actions/template-step/template-step-actions.ts +332 -0
- package/templates/default/src/actions/template-step-group/template-step-group-actions.ts +278 -0
- package/templates/default/src/actions/template-test-case/template-test-case-actions.ts +238 -0
- package/templates/default/src/actions/test-case/test-case-actions.ts +419 -0
- package/templates/default/src/actions/test-run/test-run-actions.ts +1185 -0
- package/templates/default/src/actions/test-suite/test-suite-actions.ts +253 -0
- package/templates/default/src/actions/user/user-actions.ts +13 -0
- package/templates/default/src/app/(base)/environments/create/page.tsx +28 -0
- package/templates/default/src/app/(base)/environments/environment-form.tsx +219 -0
- package/templates/default/src/app/(base)/environments/environment-table-columns.tsx +96 -0
- package/templates/default/src/app/(base)/environments/environment-table.tsx +24 -0
- package/templates/default/src/app/(base)/environments/modify/[id]/page.tsx +46 -0
- package/templates/default/src/app/(base)/environments/page.tsx +59 -0
- package/templates/default/src/app/(base)/layout.tsx +10 -0
- package/templates/default/src/app/(base)/locator-groups/create/page.tsx +44 -0
- package/templates/default/src/app/(base)/locator-groups/locator-group-form.tsx +215 -0
- package/templates/default/src/app/(base)/locator-groups/locator-group-table-columns.tsx +77 -0
- package/templates/default/src/app/(base)/locator-groups/locator-group-table.tsx +28 -0
- package/templates/default/src/app/(base)/locator-groups/modify/[id]/page.tsx +46 -0
- package/templates/default/src/app/(base)/locator-groups/page.tsx +61 -0
- package/templates/default/src/app/(base)/locators/create/page.tsx +38 -0
- package/templates/default/src/app/(base)/locators/locator-form.tsx +163 -0
- package/templates/default/src/app/(base)/locators/locator-table-columns.tsx +90 -0
- package/templates/default/src/app/(base)/locators/locator-table.tsx +28 -0
- package/templates/default/src/app/(base)/locators/modify/[id]/page.tsx +45 -0
- package/templates/default/src/app/(base)/locators/page.tsx +65 -0
- package/templates/default/src/app/(base)/locators/sync-locators-button.tsx +66 -0
- package/templates/default/src/app/(base)/modules/create/page.tsx +34 -0
- package/templates/default/src/app/(base)/modules/modify/[id]/page.tsx +46 -0
- package/templates/default/src/app/(base)/modules/module-form.tsx +126 -0
- package/templates/default/src/app/(base)/modules/module-table-columns.tsx +85 -0
- package/templates/default/src/app/(base)/modules/module-table.tsx +24 -0
- package/templates/default/src/app/(base)/modules/page.tsx +59 -0
- package/templates/default/src/app/(base)/reports/[id]/page.tsx +517 -0
- package/templates/default/src/app/(base)/reports/duration-chart.tsx +33 -0
- package/templates/default/src/app/(base)/reports/feature-chart.tsx +78 -0
- package/templates/default/src/app/(base)/reports/overview-chart.tsx +46 -0
- package/templates/default/src/app/(base)/reports/page.tsx +98 -0
- package/templates/default/src/app/(base)/reports/report-metric-card.tsx +16 -0
- package/templates/default/src/app/(base)/reports/report-table-columns.tsx +189 -0
- package/templates/default/src/app/(base)/reports/report-table.tsx +72 -0
- package/templates/default/src/app/(base)/reports/report-view-table-columns.tsx +131 -0
- package/templates/default/src/app/(base)/reports/report-view-table.tsx +82 -0
- package/templates/default/src/app/(base)/reports/test-cases/page.tsx +42 -0
- package/templates/default/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx +115 -0
- package/templates/default/src/app/(base)/reports/test-cases/test-cases-metric-table.tsx +27 -0
- package/templates/default/src/app/(base)/reports/test-suites/page.tsx +42 -0
- package/templates/default/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx +79 -0
- package/templates/default/src/app/(base)/reports/test-suites/test-suites-metric-table.tsx +27 -0
- package/templates/default/src/app/(base)/reports/view-logs-button.tsx +60 -0
- package/templates/default/src/app/(base)/reviews/create/page.tsx +26 -0
- package/templates/default/src/app/(base)/reviews/created-reviews-table.tsx +15 -0
- package/templates/default/src/app/(base)/reviews/modify/[id]/page.tsx +26 -0
- package/templates/default/src/app/(base)/reviews/page.tsx +26 -0
- package/templates/default/src/app/(base)/reviews/review/[id]/page.tsx +26 -0
- package/templates/default/src/app/(base)/reviews/review-form.tsx +11 -0
- package/templates/default/src/app/(base)/reviews/review-table-by-creator-columns.tsx +9 -0
- package/templates/default/src/app/(base)/reviews/review-table-by-reviewer-columns.tsx +9 -0
- package/templates/default/src/app/(base)/reviews/reviewer-reviews-table.tsx +15 -0
- package/templates/default/src/app/(base)/tags/create/page.tsx +39 -0
- package/templates/default/src/app/(base)/tags/modify/[id]/page.tsx +50 -0
- package/templates/default/src/app/(base)/tags/page.tsx +58 -0
- package/templates/default/src/app/(base)/tags/tag-form.tsx +147 -0
- package/templates/default/src/app/(base)/tags/tag-table-columns.tsx +63 -0
- package/templates/default/src/app/(base)/tags/tag-table.tsx +29 -0
- package/templates/default/src/app/(base)/template-step-groups/create/page.tsx +28 -0
- package/templates/default/src/app/(base)/template-step-groups/modify/[id]/page.tsx +45 -0
- package/templates/default/src/app/(base)/template-step-groups/page.tsx +60 -0
- package/templates/default/src/app/(base)/template-step-groups/template-step-group-form.tsx +167 -0
- package/templates/default/src/app/(base)/template-step-groups/template-step-group-table-columns.tsx +89 -0
- package/templates/default/src/app/(base)/template-step-groups/template-step-group-table.tsx +32 -0
- package/templates/default/src/app/(base)/template-steps/create/page.tsx +37 -0
- package/templates/default/src/app/(base)/template-steps/modify/[id]/page.tsx +49 -0
- package/templates/default/src/app/(base)/template-steps/page.tsx +59 -0
- package/templates/default/src/app/(base)/template-steps/paramChip.tsx +213 -0
- package/templates/default/src/app/(base)/template-steps/template-step-form.tsx +384 -0
- package/templates/default/src/app/(base)/template-steps/template-step-table-columns.tsx +158 -0
- package/templates/default/src/app/(base)/template-steps/template-step-table.tsx +24 -0
- package/templates/default/src/app/(base)/template-test-cases/create/page.tsx +56 -0
- package/templates/default/src/app/(base)/template-test-cases/modify/[id]/page.tsx +89 -0
- package/templates/default/src/app/(base)/template-test-cases/page.tsx +58 -0
- package/templates/default/src/app/(base)/template-test-cases/template-test-case-flow.tsx +84 -0
- package/templates/default/src/app/(base)/template-test-cases/template-test-case-form.tsx +262 -0
- package/templates/default/src/app/(base)/template-test-cases/template-test-case-table-columns.tsx +76 -0
- package/templates/default/src/app/(base)/template-test-cases/template-test-case-table.tsx +32 -0
- package/templates/default/src/app/(base)/test-cases/create/page.tsx +76 -0
- package/templates/default/src/app/(base)/test-cases/create-from-template/generate/[id]/page.tsx +96 -0
- package/templates/default/src/app/(base)/test-cases/create-from-template/page.tsx +38 -0
- package/templates/default/src/app/(base)/test-cases/create-from-template/template-selection-form.tsx +73 -0
- package/templates/default/src/app/(base)/test-cases/modify/[id]/page.tsx +106 -0
- package/templates/default/src/app/(base)/test-cases/page.tsx +60 -0
- package/templates/default/src/app/(base)/test-cases/test-case-flow.tsx +82 -0
- package/templates/default/src/app/(base)/test-cases/test-case-form.tsx +395 -0
- package/templates/default/src/app/(base)/test-cases/test-case-table-columns.tsx +90 -0
- package/templates/default/src/app/(base)/test-cases/test-case-table.tsx +35 -0
- package/templates/default/src/app/(base)/test-runs/[id]/page.tsx +56 -0
- package/templates/default/src/app/(base)/test-runs/create/page.tsx +47 -0
- package/templates/default/src/app/(base)/test-runs/page.tsx +60 -0
- package/templates/default/src/app/(base)/test-runs/test-run-form.tsx +512 -0
- package/templates/default/src/app/(base)/test-runs/test-run-table-columns.tsx +229 -0
- package/templates/default/src/app/(base)/test-runs/test-run-table.tsx +127 -0
- package/templates/default/src/app/(base)/test-suites/create/page.tsx +45 -0
- package/templates/default/src/app/(base)/test-suites/modify/[id]/page.tsx +55 -0
- package/templates/default/src/app/(base)/test-suites/page.tsx +82 -0
- package/templates/default/src/app/(base)/test-suites/test-suite-form.tsx +269 -0
- package/templates/default/src/app/(base)/test-suites/test-suite-table-columns.tsx +97 -0
- package/templates/default/src/app/(base)/test-suites/test-suite-table.tsx +29 -0
- package/templates/default/src/app/(dashboard-components)/app-drawer.tsx +187 -0
- package/templates/default/src/app/(dashboard-components)/data-card-grid.tsx +13 -0
- package/templates/default/src/app/(dashboard-components)/data-card.tsx +27 -0
- package/templates/default/src/app/(dashboard-components)/execution-health-panel.tsx +57 -0
- package/templates/default/src/app/(dashboard-components)/ongoing-test-runs-card.tsx +87 -0
- package/templates/default/src/app/(dashboard-components)/quick-actions-drawer.tsx +45 -0
- package/templates/default/src/app/api/test-runs/[runId]/download/route.ts +133 -0
- package/templates/default/src/app/api/test-runs/[runId]/logs/route.ts +420 -0
- package/templates/default/src/app/api/test-runs/[runId]/trace/[testCaseId]/route.ts +146 -0
- package/templates/default/src/app/favicon.ico +0 -0
- package/templates/default/src/app/globals.css +147 -0
- package/templates/default/src/app/layout.tsx +171 -0
- package/templates/default/src/app/page.tsx +64 -0
- package/templates/default/src/assets/icons/empty-tube.tsx +23 -0
- package/templates/default/src/assets/icons/tube-plus.tsx +29 -0
- package/templates/default/src/components/base-node.tsx +21 -0
- package/templates/default/src/components/chart/pie-chart.tsx +73 -0
- package/templates/default/src/components/data-extraction/locator-inspector.tsx +460 -0
- package/templates/default/src/components/data-state/empty-state.tsx +40 -0
- package/templates/default/src/components/data-visualization/info-card.tsx +70 -0
- package/templates/default/src/components/data-visualization/info-grid.tsx +22 -0
- package/templates/default/src/components/devtools/providers.tsx +13 -0
- package/templates/default/src/components/diagram/button-edge.tsx +54 -0
- package/templates/default/src/components/diagram/dynamic-parameters.tsx +438 -0
- package/templates/default/src/components/diagram/edit-header-option.tsx +36 -0
- package/templates/default/src/components/diagram/flow-diagram.tsx +470 -0
- package/templates/default/src/components/diagram/node-form.tsx +262 -0
- package/templates/default/src/components/diagram/options-header-node.tsx +57 -0
- package/templates/default/src/components/diagram/template-step-combobox.tsx +155 -0
- package/templates/default/src/components/form/error-message.tsx +7 -0
- package/templates/default/src/components/kokonutui/smooth-tab.tsx +453 -0
- package/templates/default/src/components/loading-skeleton/data-table/data-table-skeleton.tsx +30 -0
- package/templates/default/src/components/loading-skeleton/form/button-skeleton.tsx +8 -0
- package/templates/default/src/components/loading-skeleton/form/icon-button-skeleton.tsx +8 -0
- package/templates/default/src/components/loading-skeleton/form/text-input-skeleton.tsx +8 -0
- package/templates/default/src/components/loading-skeleton/visualization/table-skeleton.tsx +14 -0
- package/templates/default/src/components/logo.tsx +15 -0
- package/templates/default/src/components/navigation/command-badge.tsx +34 -0
- package/templates/default/src/components/navigation/command-chain-input.tsx +51 -0
- package/templates/default/src/components/navigation/entity-search-command.tsx +116 -0
- package/templates/default/src/components/navigation/nav-card.tsx +31 -0
- package/templates/default/src/components/navigation/nav-command.tsx +508 -0
- package/templates/default/src/components/navigation/nav-link.tsx +60 -0
- package/templates/default/src/components/navigation/nav-menu-card-deck.tsx +112 -0
- package/templates/default/src/components/node-header.tsx +159 -0
- package/templates/default/src/components/reports/test-case-logs-modal.tsx +253 -0
- package/templates/default/src/components/table/table-actions.tsx +172 -0
- package/templates/default/src/components/test-run/download-logs-button.tsx +99 -0
- package/templates/default/src/components/test-run/log-viewer.tsx +445 -0
- package/templates/default/src/components/test-run/test-run-details.tsx +611 -0
- package/templates/default/src/components/test-run/test-run-header.tsx +149 -0
- package/templates/default/src/components/test-run/view-report-button.tsx +102 -0
- package/templates/default/src/components/theme/mode-toggle.tsx +54 -0
- package/templates/default/src/components/theme/theme-provider.tsx +8 -0
- package/templates/default/src/components/typography/page-header-subtitle.tsx +7 -0
- package/templates/default/src/components/typography/page-header.tsx +7 -0
- package/templates/default/src/components/ui/alert-dialog.tsx +106 -0
- package/templates/default/src/components/ui/alert.tsx +43 -0
- package/templates/default/src/components/ui/avatar.tsx +40 -0
- package/templates/default/src/components/ui/badge.tsx +29 -0
- package/templates/default/src/components/ui/button.tsx +47 -0
- package/templates/default/src/components/ui/calendar.tsx +158 -0
- package/templates/default/src/components/ui/card.tsx +43 -0
- package/templates/default/src/components/ui/chart.tsx +369 -0
- package/templates/default/src/components/ui/checkbox.tsx +28 -0
- package/templates/default/src/components/ui/command.tsx +135 -0
- package/templates/default/src/components/ui/data-table-column-header.tsx +61 -0
- package/templates/default/src/components/ui/data-table-pagination.tsx +87 -0
- package/templates/default/src/components/ui/data-table-view-options.tsx +50 -0
- package/templates/default/src/components/ui/data-table.tsx +267 -0
- package/templates/default/src/components/ui/dialog.tsx +97 -0
- package/templates/default/src/components/ui/dropdown-menu.tsx +182 -0
- package/templates/default/src/components/ui/empty.tsx +104 -0
- package/templates/default/src/components/ui/input.tsx +22 -0
- package/templates/default/src/components/ui/kbd.tsx +28 -0
- package/templates/default/src/components/ui/label.tsx +19 -0
- package/templates/default/src/components/ui/loading.tsx +12 -0
- package/templates/default/src/components/ui/multi-select-with-preview.tsx +116 -0
- package/templates/default/src/components/ui/multi-select.tsx +142 -0
- package/templates/default/src/components/ui/navigation-menu.tsx +120 -0
- package/templates/default/src/components/ui/popover.tsx +33 -0
- package/templates/default/src/components/ui/progress.tsx +25 -0
- package/templates/default/src/components/ui/radio-group.tsx +44 -0
- package/templates/default/src/components/ui/scroll-area.tsx +40 -0
- package/templates/default/src/components/ui/select.tsx +144 -0
- package/templates/default/src/components/ui/separator.tsx +22 -0
- package/templates/default/src/components/ui/skeleton.tsx +7 -0
- package/templates/default/src/components/ui/table.tsx +76 -0
- package/templates/default/src/components/ui/tabs.tsx +55 -0
- package/templates/default/src/components/ui/textarea.tsx +21 -0
- package/templates/default/src/components/ui/toast.tsx +113 -0
- package/templates/default/src/components/ui/toaster.tsx +26 -0
- package/templates/default/src/components/ui/tooltip.tsx +32 -0
- package/templates/default/src/components/user-prompt/delete-prompt.tsx +87 -0
- package/templates/default/src/config/db-config.ts +10 -0
- package/templates/default/src/constants/form-opts/diagram/node-form.ts +30 -0
- package/templates/default/src/constants/form-opts/environment-form-opts.ts +24 -0
- package/templates/default/src/constants/form-opts/locator-form-opts.ts +20 -0
- package/templates/default/src/constants/form-opts/locator-group-form-opts.ts +28 -0
- package/templates/default/src/constants/form-opts/module-form-opts.ts +21 -0
- package/templates/default/src/constants/form-opts/review-form-opts.ts +23 -0
- package/templates/default/src/constants/form-opts/tag-form-opts.ts +42 -0
- package/templates/default/src/constants/form-opts/template-selection-form-opts.ts +16 -0
- package/templates/default/src/constants/form-opts/template-step-group-form-opts.ts +24 -0
- package/templates/default/src/constants/form-opts/template-test-case-form-opts.ts +39 -0
- package/templates/default/src/constants/form-opts/template-test-step-form-opts.ts +36 -0
- package/templates/default/src/constants/form-opts/test-case-form-opts.ts +43 -0
- package/templates/default/src/constants/form-opts/test-run-form-opts.ts +31 -0
- package/templates/default/src/constants/form-opts/test-suite-form-opts.ts +24 -0
- package/templates/default/src/hooks/use-toast.ts +187 -0
- package/templates/default/src/lib/bidirectional-sync.ts +432 -0
- package/templates/default/src/lib/database-sync.ts +531 -0
- package/templates/default/src/lib/environment-file-utils.ts +221 -0
- package/templates/default/src/lib/feature-file-generator.ts +411 -0
- package/templates/default/src/lib/gherkin-parser.ts +259 -0
- package/templates/default/src/lib/locator-group-file-utils.ts +370 -0
- package/templates/default/src/lib/metrics/metric-calculator.ts +613 -0
- package/templates/default/src/lib/module-hierarchy-builder.ts +205 -0
- package/templates/default/src/lib/path-helpers/module-path.ts +71 -0
- package/templates/default/src/lib/test-case-utils.ts +6 -0
- package/templates/default/src/lib/test-run/log-formatter.ts +83 -0
- package/templates/default/src/lib/test-run/process-manager.ts +191 -0
- package/templates/default/src/lib/test-run/report-parser.ts +316 -0
- package/templates/default/src/lib/test-run/test-run-executor.ts +144 -0
- package/templates/default/src/lib/test-run/winston-logger.ts +95 -0
- package/templates/default/src/lib/transformers/gherkin-converter.ts +42 -0
- package/templates/default/src/lib/transformers/key-to-icon-transformer.tsx +95 -0
- package/templates/default/src/lib/transformers/template-test-case-converter.ts +160 -0
- package/templates/default/src/lib/utils/node-param-validation.ts +81 -0
- package/templates/default/src/lib/utils/template-step-file-generator.ts +167 -0
- package/templates/default/src/lib/utils/template-step-file-manager-intelligent.ts +723 -0
- package/templates/default/src/lib/utils/template-step-file-manager.ts +166 -0
- package/templates/default/src/lib/utils.ts +31 -0
- package/templates/default/src/tests/config/environments/environments.json +14 -0
- package/templates/default/src/tests/config/executor/world.ts +41 -0
- package/templates/default/src/tests/executor.ts +80 -0
- package/templates/default/src/tests/hooks/hooks.ts +99 -0
- package/templates/default/src/tests/mapping/locator-map.json +1 -0
- package/templates/default/src/tests/steps/actions/click.step.ts +62 -0
- package/templates/default/src/tests/steps/actions/hover.step.ts +31 -0
- package/templates/default/src/tests/steps/actions/input.step.ts +149 -0
- package/templates/default/src/tests/steps/actions/navigation.step.ts +72 -0
- package/templates/default/src/tests/steps/actions/random_data.step.ts +146 -0
- package/templates/default/src/tests/steps/actions/store.step.ts +90 -0
- package/templates/default/src/tests/steps/actions/wait.step.ts +107 -0
- package/templates/default/src/tests/steps/validations/active_state_assertion.step.ts +34 -0
- package/templates/default/src/tests/steps/validations/navigation_assertion.step.ts +23 -0
- package/templates/default/src/tests/steps/validations/text_assertion.step.ts +111 -0
- package/templates/default/src/tests/steps/validations/visibility_assertion.step.ts +30 -0
- package/templates/default/src/tests/support/parameter-types.ts +12 -0
- package/templates/default/src/tests/utils/cache.util.ts +260 -0
- package/templates/default/src/tests/utils/cli.util.ts +177 -0
- package/templates/default/src/tests/utils/environment.util.ts +65 -0
- package/templates/default/src/tests/utils/locator.util.ts +248 -0
- package/templates/default/src/tests/utils/random-data.util.ts +45 -0
- package/templates/default/src/tests/utils/spawner.util.ts +617 -0
- package/templates/default/src/types/diagram/diagram.ts +34 -0
- package/templates/default/src/types/diagram/template-step.ts +11 -0
- package/templates/default/src/types/executor/browser.type.ts +1 -0
- package/templates/default/src/types/form/actionHandler.ts +6 -0
- package/templates/default/src/types/locator/locator.type.ts +11 -0
- package/templates/default/src/types/step/step.type.ts +1 -0
- package/templates/default/src/types/table/data-table.ts +6 -0
- package/templates/default/tailwind.config.ts +62 -0
- package/templates/default/tsconfig.json +28 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { useEffect, useState, useMemo } from 'react'
|
|
5
|
+
import { CommandGroup, CommandItem } from '../ui/command'
|
|
6
|
+
import { ActionResponse } from '@/types/form/actionHandler'
|
|
7
|
+
|
|
8
|
+
export interface EntitySearchCommandProps<T extends { id: string }> {
|
|
9
|
+
searchQuery: string
|
|
10
|
+
entityName: string
|
|
11
|
+
fetchAction: () => Promise<ActionResponse>
|
|
12
|
+
searchKey: keyof T
|
|
13
|
+
icon?: React.ReactNode
|
|
14
|
+
onSelect?: (entity: T) => void
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function EntitySearchCommand<T extends { id: string }>({
|
|
18
|
+
searchQuery,
|
|
19
|
+
entityName,
|
|
20
|
+
fetchAction,
|
|
21
|
+
searchKey,
|
|
22
|
+
icon,
|
|
23
|
+
onSelect,
|
|
24
|
+
}: EntitySearchCommandProps<T>) {
|
|
25
|
+
const [entities, setEntities] = useState<T[]>([])
|
|
26
|
+
const [isLoading, setIsLoading] = useState(true)
|
|
27
|
+
const [error, setError] = useState<string | null>(null)
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
let isMounted = true
|
|
31
|
+
|
|
32
|
+
const fetchEntities = async () => {
|
|
33
|
+
setIsLoading(true)
|
|
34
|
+
setError(null)
|
|
35
|
+
try {
|
|
36
|
+
const result = await fetchAction()
|
|
37
|
+
if (isMounted) {
|
|
38
|
+
if (result.status === 200 && result.data) {
|
|
39
|
+
setEntities(result.data as T[])
|
|
40
|
+
} else {
|
|
41
|
+
setError(result.error || 'Failed to fetch entities')
|
|
42
|
+
}
|
|
43
|
+
setIsLoading(false)
|
|
44
|
+
}
|
|
45
|
+
} catch (err) {
|
|
46
|
+
if (isMounted) {
|
|
47
|
+
setError(err instanceof Error ? err.message : 'An error occurred')
|
|
48
|
+
setIsLoading(false)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
fetchEntities()
|
|
54
|
+
|
|
55
|
+
return () => {
|
|
56
|
+
isMounted = false
|
|
57
|
+
}
|
|
58
|
+
}, [fetchAction])
|
|
59
|
+
|
|
60
|
+
const filteredEntities = useMemo(() => {
|
|
61
|
+
if (!searchQuery.trim()) {
|
|
62
|
+
return entities
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const query = searchQuery.toLowerCase()
|
|
66
|
+
return entities.filter(entity => {
|
|
67
|
+
const value = entity[searchKey]
|
|
68
|
+
if (typeof value === 'string') {
|
|
69
|
+
return value.toLowerCase().includes(query)
|
|
70
|
+
}
|
|
71
|
+
return false
|
|
72
|
+
})
|
|
73
|
+
}, [entities, searchQuery, searchKey])
|
|
74
|
+
|
|
75
|
+
if (isLoading) {
|
|
76
|
+
return (
|
|
77
|
+
<CommandGroup heading={`Searching ${entityName}...`}>
|
|
78
|
+
<CommandItem disabled>Loading...</CommandItem>
|
|
79
|
+
</CommandGroup>
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (error) {
|
|
84
|
+
return (
|
|
85
|
+
<CommandGroup heading="Error">
|
|
86
|
+
<CommandItem disabled className="text-destructive">
|
|
87
|
+
{error}
|
|
88
|
+
</CommandItem>
|
|
89
|
+
</CommandGroup>
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (filteredEntities.length === 0) {
|
|
94
|
+
return <></>
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<CommandGroup heading={`${entityName} Results`}>
|
|
99
|
+
{filteredEntities.map(entity => {
|
|
100
|
+
const displayValue = entity[searchKey]
|
|
101
|
+
return (
|
|
102
|
+
<CommandItem
|
|
103
|
+
key={entity.id}
|
|
104
|
+
value={typeof displayValue === 'string' ? displayValue : entity.id}
|
|
105
|
+
onSelect={() => {
|
|
106
|
+
onSelect?.(entity)
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
{icon}
|
|
110
|
+
<span>{typeof displayValue === 'string' ? displayValue : entity.id}</span>
|
|
111
|
+
</CommandItem>
|
|
112
|
+
)
|
|
113
|
+
})}
|
|
114
|
+
</CommandGroup>
|
|
115
|
+
)
|
|
116
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { Card, CardContent } from '../ui/card'
|
|
3
|
+
import Link from 'next/link'
|
|
4
|
+
|
|
5
|
+
const NavCard = ({
|
|
6
|
+
data,
|
|
7
|
+
href,
|
|
8
|
+
icon,
|
|
9
|
+
}: {
|
|
10
|
+
data: { title: string; description: string }
|
|
11
|
+
href: string
|
|
12
|
+
icon: React.ReactNode
|
|
13
|
+
}) => {
|
|
14
|
+
return (
|
|
15
|
+
<Link href={href} className="w-full">
|
|
16
|
+
<Card className="h-24 w-full border-none outline-none transition-colors hover:bg-accent hover:text-accent-foreground">
|
|
17
|
+
<CardContent className="flex h-full w-full items-center gap-3 p-4">
|
|
18
|
+
<div className="flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-md text-accent-foreground">
|
|
19
|
+
{icon}
|
|
20
|
+
</div>
|
|
21
|
+
<div className="flex min-w-0 flex-1 flex-col justify-center">
|
|
22
|
+
<span className="truncate text-sm font-medium">{data.title}</span>
|
|
23
|
+
<span className="line-clamp-2 text-xs text-muted-foreground">{data.description}</span>
|
|
24
|
+
</div>
|
|
25
|
+
</CardContent>
|
|
26
|
+
</Card>
|
|
27
|
+
</Link>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default NavCard
|
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
Blocks,
|
|
5
|
+
Code,
|
|
6
|
+
Command,
|
|
7
|
+
Component,
|
|
8
|
+
FileCheck,
|
|
9
|
+
Group,
|
|
10
|
+
LayoutDashboard,
|
|
11
|
+
LayoutTemplate,
|
|
12
|
+
ListChecks,
|
|
13
|
+
Plus,
|
|
14
|
+
Puzzle,
|
|
15
|
+
Server,
|
|
16
|
+
Tag,
|
|
17
|
+
TestTubeDiagonal,
|
|
18
|
+
TestTubes,
|
|
19
|
+
} from 'lucide-react'
|
|
20
|
+
import { Button } from '../ui/button'
|
|
21
|
+
import { cn } from '@/lib/utils'
|
|
22
|
+
import { useEffect, useState } from 'react'
|
|
23
|
+
import { CommandEmpty, CommandList, CommandGroup, CommandItem, CommandDialog } from '../ui/command'
|
|
24
|
+
import { DialogDescription, DialogTitle } from '../ui/dialog'
|
|
25
|
+
import Link from 'next/link'
|
|
26
|
+
import { useRouter } from 'next/navigation'
|
|
27
|
+
import { CommandChainInput } from './command-chain-input'
|
|
28
|
+
import { EntitySearchCommand } from './entity-search-command'
|
|
29
|
+
import { getAllTestSuitesAction } from '@/actions/test-suite/test-suite-actions'
|
|
30
|
+
import { TestSuite, TestCase, TemplateStep, TestRun, TemplateTestCase } from '@prisma/client'
|
|
31
|
+
import { getAllTestCasesAction } from '@/actions/test-case/test-case-actions'
|
|
32
|
+
import { getAllTemplateStepsAction } from '@/actions/template-step/template-step-actions'
|
|
33
|
+
import { getAllTestRunsAction } from '@/actions/test-run/test-run-actions'
|
|
34
|
+
import { getAllTemplateTestCasesAction } from '@/actions/template-test-case/template-test-case-actions'
|
|
35
|
+
|
|
36
|
+
type CommandMode =
|
|
37
|
+
| null
|
|
38
|
+
| 'search-test-suite'
|
|
39
|
+
| 'search-test-case'
|
|
40
|
+
| 'search-template-step'
|
|
41
|
+
| 'search-test-run'
|
|
42
|
+
| 'search-template-test-case'
|
|
43
|
+
|
|
44
|
+
const commandModeToPlaceholder = {
|
|
45
|
+
'search-test-suite': 'Search Test Suite by Name...',
|
|
46
|
+
'search-test-case': 'Search Test Case by Title...',
|
|
47
|
+
'search-template-step': 'Search Template Step by Name...',
|
|
48
|
+
'search-test-run': 'Search Test Run by Name...',
|
|
49
|
+
'search-template-test-case': 'Search Template Test Case by Name...',
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export default function NavCommand({ className }: { className?: string }) {
|
|
53
|
+
const router = useRouter()
|
|
54
|
+
|
|
55
|
+
const [open, setOpen] = useState(false)
|
|
56
|
+
const [commandMode, setCommandMode] = useState<CommandMode>(null)
|
|
57
|
+
const [searchQuery, setSearchQuery] = useState('')
|
|
58
|
+
const [isMac, setIsMac] = useState(false)
|
|
59
|
+
|
|
60
|
+
// Detect platform only after mount to avoid hydration mismatch (server has no navigator)
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
queueMicrotask(() => setIsMac(navigator.userAgent.toLowerCase().includes('mac')))
|
|
63
|
+
}, [])
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
const down = (e: KeyboardEvent) => {
|
|
67
|
+
if (e.key === 'k' && (e.metaKey || e.ctrlKey)) {
|
|
68
|
+
e.preventDefault()
|
|
69
|
+
setOpen(open => !open)
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
document.addEventListener('keydown', down)
|
|
73
|
+
return () => document.removeEventListener('keydown', down)
|
|
74
|
+
}, [])
|
|
75
|
+
|
|
76
|
+
// Reset command mode and search query when dialog closes (defer setState to avoid sync setState in effect)
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
if (!open) {
|
|
79
|
+
queueMicrotask(() => {
|
|
80
|
+
setCommandMode(null)
|
|
81
|
+
setSearchQuery('')
|
|
82
|
+
})
|
|
83
|
+
}
|
|
84
|
+
}, [open])
|
|
85
|
+
|
|
86
|
+
const handleTestSuiteSelect = (testSuite: TestSuite) => {
|
|
87
|
+
router.push(`/test-suites/modify/${testSuite.id}`)
|
|
88
|
+
setOpen(false)
|
|
89
|
+
}
|
|
90
|
+
const handleTestCaseSelect = (testCase: TestCase) => {
|
|
91
|
+
router.push(`/test-cases/modify/${testCase.id}`)
|
|
92
|
+
setOpen(false)
|
|
93
|
+
}
|
|
94
|
+
const handleTemplateStepSelect = (templateStep: TemplateStep) => {
|
|
95
|
+
router.push(`/template-steps/modify/${templateStep.id}`)
|
|
96
|
+
setOpen(false)
|
|
97
|
+
}
|
|
98
|
+
const handleTestRunSelect = (testRun: TestRun) => {
|
|
99
|
+
router.push(`/test-runs/${testRun.id}`)
|
|
100
|
+
setOpen(false)
|
|
101
|
+
}
|
|
102
|
+
const handleTemplateTestCaseSelect = (templateTestCase: TemplateTestCase) => {
|
|
103
|
+
router.push(`/template-test-cases/modify/${templateTestCase.id}`)
|
|
104
|
+
setOpen(false)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const getBadgeConfig = () => {
|
|
108
|
+
if (commandMode === 'search-test-suite') {
|
|
109
|
+
return {
|
|
110
|
+
label: 'Search Test Suite',
|
|
111
|
+
onClose: () => {
|
|
112
|
+
setCommandMode(null)
|
|
113
|
+
setSearchQuery('')
|
|
114
|
+
},
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (commandMode === 'search-test-case') {
|
|
118
|
+
return {
|
|
119
|
+
label: 'Search Test Case',
|
|
120
|
+
onClose: () => {
|
|
121
|
+
setCommandMode(null)
|
|
122
|
+
setSearchQuery('')
|
|
123
|
+
},
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (commandMode === 'search-template-step') {
|
|
127
|
+
return {
|
|
128
|
+
label: 'Search Template Step',
|
|
129
|
+
onClose: () => {
|
|
130
|
+
setCommandMode(null)
|
|
131
|
+
setSearchQuery('')
|
|
132
|
+
},
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (commandMode === 'search-test-run') {
|
|
136
|
+
return {
|
|
137
|
+
label: 'Search Test Run',
|
|
138
|
+
onClose: () => {
|
|
139
|
+
setCommandMode(null)
|
|
140
|
+
setSearchQuery('')
|
|
141
|
+
},
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (commandMode === 'search-template-test-case') {
|
|
145
|
+
return {
|
|
146
|
+
label: 'Search Template Test Case',
|
|
147
|
+
onClose: () => {
|
|
148
|
+
setCommandMode(null)
|
|
149
|
+
setSearchQuery('')
|
|
150
|
+
},
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return undefined
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<>
|
|
158
|
+
<Button
|
|
159
|
+
variant="outline"
|
|
160
|
+
className={cn('hover:bg-accent-foreground/10 flex w-1/5 justify-between px-4 hover:text-primary', className)}
|
|
161
|
+
onClick={() => setOpen(true)}
|
|
162
|
+
>
|
|
163
|
+
<span>Open Command Palette</span>
|
|
164
|
+
<div className="flex items-center gap-1 text-xs text-muted-foreground">
|
|
165
|
+
<kbd className="rounded-md bg-muted px-1 text-xs text-gray-400">
|
|
166
|
+
{isMac ? <Command className="h-2 w-2 text-gray-400" /> : 'Ctrl'}
|
|
167
|
+
</kbd>
|
|
168
|
+
<Plus className="h-2 w-2 text-gray-400" />
|
|
169
|
+
<kbd className="rounded-md bg-muted px-1 text-xs text-gray-400">K</kbd>
|
|
170
|
+
</div>
|
|
171
|
+
</Button>
|
|
172
|
+
<CommandDialog open={open} onOpenChange={setOpen} shouldFilter={!commandMode}>
|
|
173
|
+
<DialogTitle className="sr-only">Command Palette</DialogTitle>
|
|
174
|
+
<DialogDescription className="sr-only">Search for a command or navigate to a page</DialogDescription>
|
|
175
|
+
<CommandChainInput
|
|
176
|
+
placeholder={commandMode ? commandModeToPlaceholder[commandMode] : 'Type a command or search...'}
|
|
177
|
+
badge={getBadgeConfig()}
|
|
178
|
+
value={searchQuery}
|
|
179
|
+
onValueChange={setSearchQuery}
|
|
180
|
+
/>
|
|
181
|
+
<CommandList>
|
|
182
|
+
<CommandEmpty>No results found.</CommandEmpty>
|
|
183
|
+
{commandMode === 'search-test-suite' ? (
|
|
184
|
+
<EntitySearchCommand
|
|
185
|
+
searchQuery={searchQuery}
|
|
186
|
+
entityName="Test Suite"
|
|
187
|
+
fetchAction={getAllTestSuitesAction}
|
|
188
|
+
searchKey="name"
|
|
189
|
+
icon={<TestTubes className="h-4 w-4" />}
|
|
190
|
+
onSelect={handleTestSuiteSelect}
|
|
191
|
+
/>
|
|
192
|
+
) : commandMode === 'search-test-case' ? (
|
|
193
|
+
<EntitySearchCommand
|
|
194
|
+
searchQuery={searchQuery}
|
|
195
|
+
entityName="Test Case"
|
|
196
|
+
fetchAction={getAllTestCasesAction}
|
|
197
|
+
searchKey="title"
|
|
198
|
+
icon={<TestTubeDiagonal className="h-4 w-4" />}
|
|
199
|
+
onSelect={handleTestCaseSelect}
|
|
200
|
+
/>
|
|
201
|
+
) : commandMode === 'search-template-step' ? (
|
|
202
|
+
<EntitySearchCommand
|
|
203
|
+
searchQuery={searchQuery}
|
|
204
|
+
entityName="Template Step"
|
|
205
|
+
fetchAction={getAllTemplateStepsAction}
|
|
206
|
+
searchKey="name"
|
|
207
|
+
icon={<LayoutTemplate className="h-4 w-4" />}
|
|
208
|
+
onSelect={handleTemplateStepSelect}
|
|
209
|
+
/>
|
|
210
|
+
) : commandMode === 'search-test-run' ? (
|
|
211
|
+
<EntitySearchCommand
|
|
212
|
+
searchQuery={searchQuery}
|
|
213
|
+
entityName="Test Run"
|
|
214
|
+
fetchAction={getAllTestRunsAction}
|
|
215
|
+
searchKey="name"
|
|
216
|
+
icon={<ListChecks className="h-4 w-4" />}
|
|
217
|
+
onSelect={handleTestRunSelect}
|
|
218
|
+
/>
|
|
219
|
+
) : commandMode === 'search-template-test-case' ? (
|
|
220
|
+
<EntitySearchCommand
|
|
221
|
+
searchQuery={searchQuery}
|
|
222
|
+
entityName="Template Test Case"
|
|
223
|
+
fetchAction={getAllTemplateTestCasesAction}
|
|
224
|
+
searchKey="name"
|
|
225
|
+
icon={<Blocks className="h-4 w-4" />}
|
|
226
|
+
onSelect={handleTemplateTestCaseSelect}
|
|
227
|
+
/>
|
|
228
|
+
) : (
|
|
229
|
+
<>
|
|
230
|
+
<CommandGroup heading="Overview">
|
|
231
|
+
<CommandItem
|
|
232
|
+
asChild
|
|
233
|
+
onSelect={() => {
|
|
234
|
+
setOpen(false)
|
|
235
|
+
router.push('/')
|
|
236
|
+
}}
|
|
237
|
+
>
|
|
238
|
+
<Link href="/" onClick={() => setOpen(false)}>
|
|
239
|
+
<LayoutDashboard className="h-4 w-4" />
|
|
240
|
+
Dashboard
|
|
241
|
+
</Link>
|
|
242
|
+
</CommandItem>
|
|
243
|
+
</CommandGroup>
|
|
244
|
+
<CommandGroup heading="Automate">
|
|
245
|
+
<CommandItem
|
|
246
|
+
asChild
|
|
247
|
+
onSelect={() => {
|
|
248
|
+
setOpen(false)
|
|
249
|
+
router.push('/test-suites')
|
|
250
|
+
}}
|
|
251
|
+
>
|
|
252
|
+
<Link href="/test-suites" onClick={() => setOpen(false)}>
|
|
253
|
+
<TestTubes className="h-4 w-4" />
|
|
254
|
+
Test Suites
|
|
255
|
+
</Link>
|
|
256
|
+
</CommandItem>
|
|
257
|
+
|
|
258
|
+
<CommandItem
|
|
259
|
+
asChild
|
|
260
|
+
onSelect={() => {
|
|
261
|
+
setOpen(false)
|
|
262
|
+
router.push('/test-cases')
|
|
263
|
+
}}
|
|
264
|
+
>
|
|
265
|
+
<Link href="/test-cases" onClick={() => setOpen(false)}>
|
|
266
|
+
<TestTubeDiagonal className="h-4 w-4" />
|
|
267
|
+
Test Cases
|
|
268
|
+
</Link>
|
|
269
|
+
</CommandItem>
|
|
270
|
+
<CommandItem
|
|
271
|
+
asChild
|
|
272
|
+
onSelect={() => {
|
|
273
|
+
setOpen(false)
|
|
274
|
+
router.push('/test-runs')
|
|
275
|
+
}}
|
|
276
|
+
>
|
|
277
|
+
<Link href="/test-runs" onClick={() => setOpen(false)}>
|
|
278
|
+
<ListChecks className="h-4 w-4" />
|
|
279
|
+
Test Runs
|
|
280
|
+
</Link>
|
|
281
|
+
</CommandItem>
|
|
282
|
+
<CommandItem
|
|
283
|
+
asChild
|
|
284
|
+
onSelect={() => {
|
|
285
|
+
setOpen(false)
|
|
286
|
+
router.push('/reports')
|
|
287
|
+
}}
|
|
288
|
+
>
|
|
289
|
+
<Link href="/reports" onClick={() => setOpen(false)}>
|
|
290
|
+
<FileCheck className="h-4 w-4" />
|
|
291
|
+
Reports
|
|
292
|
+
</Link>
|
|
293
|
+
</CommandItem>
|
|
294
|
+
<CommandItem
|
|
295
|
+
asChild
|
|
296
|
+
onSelect={() => {
|
|
297
|
+
setOpen(false)
|
|
298
|
+
router.push('/test-runs/create')
|
|
299
|
+
}}
|
|
300
|
+
>
|
|
301
|
+
<Link href="/test-runs/create" onClick={() => setOpen(false)}>
|
|
302
|
+
<ListChecks className="h-4 w-4" />
|
|
303
|
+
Create Test Run
|
|
304
|
+
</Link>
|
|
305
|
+
</CommandItem>
|
|
306
|
+
<CommandItem
|
|
307
|
+
asChild
|
|
308
|
+
onSelect={() => {
|
|
309
|
+
setOpen(false)
|
|
310
|
+
router.push('/test-suites/create')
|
|
311
|
+
}}
|
|
312
|
+
>
|
|
313
|
+
<Link href="/test-suites/create" onClick={() => setOpen(false)}>
|
|
314
|
+
<TestTubes className="h-4 w-4" />
|
|
315
|
+
Create Test Suite
|
|
316
|
+
</Link>
|
|
317
|
+
</CommandItem>
|
|
318
|
+
<CommandItem
|
|
319
|
+
asChild
|
|
320
|
+
onSelect={() => {
|
|
321
|
+
setOpen(false)
|
|
322
|
+
router.push('/test-cases/create')
|
|
323
|
+
}}
|
|
324
|
+
>
|
|
325
|
+
<Link href="/test-cases/create" onClick={() => setOpen(false)}>
|
|
326
|
+
<TestTubeDiagonal className="h-4 w-4" />
|
|
327
|
+
Create Test Case
|
|
328
|
+
</Link>
|
|
329
|
+
</CommandItem>
|
|
330
|
+
</CommandGroup>
|
|
331
|
+
<CommandGroup heading="Template">
|
|
332
|
+
<CommandItem
|
|
333
|
+
asChild
|
|
334
|
+
onSelect={() => {
|
|
335
|
+
setOpen(false)
|
|
336
|
+
router.push('/template-steps')
|
|
337
|
+
}}
|
|
338
|
+
>
|
|
339
|
+
<Link href="/template-steps" onClick={() => setOpen(false)}>
|
|
340
|
+
<LayoutTemplate className="h-4 w-4" />
|
|
341
|
+
Template Steps
|
|
342
|
+
</Link>
|
|
343
|
+
</CommandItem>
|
|
344
|
+
<CommandItem
|
|
345
|
+
asChild
|
|
346
|
+
onSelect={() => {
|
|
347
|
+
setOpen(false)
|
|
348
|
+
router.push('/template-step-groups')
|
|
349
|
+
}}
|
|
350
|
+
>
|
|
351
|
+
<Link href="/template-step-groups" onClick={() => setOpen(false)}>
|
|
352
|
+
<Component className="h-4 w-4" />
|
|
353
|
+
Template Step Groups
|
|
354
|
+
</Link>
|
|
355
|
+
</CommandItem>
|
|
356
|
+
<CommandItem
|
|
357
|
+
asChild
|
|
358
|
+
onSelect={() => {
|
|
359
|
+
setOpen(false)
|
|
360
|
+
router.push('/template-test-cases')
|
|
361
|
+
}}
|
|
362
|
+
>
|
|
363
|
+
<Link href="/template-test-cases" onClick={() => setOpen(false)}>
|
|
364
|
+
<Blocks className="h-4 w-4" />
|
|
365
|
+
Template Test Cases
|
|
366
|
+
</Link>
|
|
367
|
+
</CommandItem>
|
|
368
|
+
<CommandItem
|
|
369
|
+
asChild
|
|
370
|
+
onSelect={() => {
|
|
371
|
+
setOpen(false)
|
|
372
|
+
router.push('/template-steps/create')
|
|
373
|
+
}}
|
|
374
|
+
>
|
|
375
|
+
<Link href="/template-steps/create" onClick={() => setOpen(false)}>
|
|
376
|
+
<LayoutTemplate className="h-4 w-4" />
|
|
377
|
+
Create Template Step
|
|
378
|
+
</Link>
|
|
379
|
+
</CommandItem>
|
|
380
|
+
<CommandItem
|
|
381
|
+
asChild
|
|
382
|
+
onSelect={() => {
|
|
383
|
+
setOpen(false)
|
|
384
|
+
router.push('/template-test-cases/create')
|
|
385
|
+
}}
|
|
386
|
+
>
|
|
387
|
+
<Link href="/template-test-cases/create" onClick={() => setOpen(false)}>
|
|
388
|
+
<Blocks className="h-4 w-4" />
|
|
389
|
+
Create Template Test Case
|
|
390
|
+
</Link>
|
|
391
|
+
</CommandItem>
|
|
392
|
+
</CommandGroup>
|
|
393
|
+
<CommandGroup heading="Configuration">
|
|
394
|
+
<CommandItem
|
|
395
|
+
asChild
|
|
396
|
+
onSelect={() => {
|
|
397
|
+
setOpen(false)
|
|
398
|
+
router.push('/locators')
|
|
399
|
+
}}
|
|
400
|
+
>
|
|
401
|
+
<Link href="/locators" onClick={() => setOpen(false)}>
|
|
402
|
+
<Code className="h-4 w-4" />
|
|
403
|
+
Locators
|
|
404
|
+
</Link>
|
|
405
|
+
</CommandItem>
|
|
406
|
+
<CommandItem
|
|
407
|
+
asChild
|
|
408
|
+
onSelect={() => {
|
|
409
|
+
setOpen(false)
|
|
410
|
+
router.push('/locator-groups')
|
|
411
|
+
}}
|
|
412
|
+
>
|
|
413
|
+
<Link href="/locator-groups" onClick={() => setOpen(false)}>
|
|
414
|
+
<Group className="h-4 w-4" />
|
|
415
|
+
Locator Groups
|
|
416
|
+
</Link>
|
|
417
|
+
</CommandItem>
|
|
418
|
+
<CommandItem
|
|
419
|
+
asChild
|
|
420
|
+
onSelect={() => {
|
|
421
|
+
setOpen(false)
|
|
422
|
+
router.push('/modules')
|
|
423
|
+
}}
|
|
424
|
+
>
|
|
425
|
+
<Link href="/modules" onClick={() => setOpen(false)}>
|
|
426
|
+
<Puzzle className="h-4 w-4" />
|
|
427
|
+
Modules
|
|
428
|
+
</Link>
|
|
429
|
+
</CommandItem>
|
|
430
|
+
<CommandItem
|
|
431
|
+
asChild
|
|
432
|
+
onSelect={() => {
|
|
433
|
+
setOpen(false)
|
|
434
|
+
router.push('/environments')
|
|
435
|
+
}}
|
|
436
|
+
>
|
|
437
|
+
<Link href="/environments" onClick={() => setOpen(false)}>
|
|
438
|
+
<Server className="h-4 w-4" />
|
|
439
|
+
Environments
|
|
440
|
+
</Link>
|
|
441
|
+
</CommandItem>
|
|
442
|
+
<CommandItem
|
|
443
|
+
asChild
|
|
444
|
+
onSelect={() => {
|
|
445
|
+
setOpen(false)
|
|
446
|
+
router.push('/tags')
|
|
447
|
+
}}
|
|
448
|
+
>
|
|
449
|
+
<Link href="/tags" onClick={() => setOpen(false)}>
|
|
450
|
+
<Tag className="h-4 w-4" />
|
|
451
|
+
Tags
|
|
452
|
+
</Link>
|
|
453
|
+
</CommandItem>
|
|
454
|
+
</CommandGroup>
|
|
455
|
+
<CommandGroup heading="Search">
|
|
456
|
+
<CommandItem
|
|
457
|
+
onSelect={() => {
|
|
458
|
+
setCommandMode('search-test-case')
|
|
459
|
+
setSearchQuery('')
|
|
460
|
+
}}
|
|
461
|
+
>
|
|
462
|
+
<TestTubeDiagonal className="h-4 w-4" />
|
|
463
|
+
Search Test Cases
|
|
464
|
+
</CommandItem>
|
|
465
|
+
<CommandItem
|
|
466
|
+
onSelect={() => {
|
|
467
|
+
setCommandMode('search-test-suite')
|
|
468
|
+
setSearchQuery('')
|
|
469
|
+
}}
|
|
470
|
+
>
|
|
471
|
+
<TestTubes className="h-4 w-4" />
|
|
472
|
+
Search Test Suites
|
|
473
|
+
</CommandItem>
|
|
474
|
+
<CommandItem
|
|
475
|
+
onSelect={() => {
|
|
476
|
+
setCommandMode('search-template-step')
|
|
477
|
+
setSearchQuery('')
|
|
478
|
+
}}
|
|
479
|
+
>
|
|
480
|
+
<LayoutTemplate className="h-4 w-4" />
|
|
481
|
+
Search Template Steps
|
|
482
|
+
</CommandItem>
|
|
483
|
+
<CommandItem
|
|
484
|
+
onSelect={() => {
|
|
485
|
+
setCommandMode('search-test-run')
|
|
486
|
+
setSearchQuery('')
|
|
487
|
+
}}
|
|
488
|
+
>
|
|
489
|
+
<ListChecks className="h-4 w-4" />
|
|
490
|
+
Search Test Runs
|
|
491
|
+
</CommandItem>
|
|
492
|
+
<CommandItem
|
|
493
|
+
onSelect={() => {
|
|
494
|
+
setCommandMode('search-template-test-case')
|
|
495
|
+
setSearchQuery('')
|
|
496
|
+
}}
|
|
497
|
+
>
|
|
498
|
+
<Blocks className="h-4 w-4" />
|
|
499
|
+
Search Template Test Cases
|
|
500
|
+
</CommandItem>
|
|
501
|
+
</CommandGroup>
|
|
502
|
+
</>
|
|
503
|
+
)}
|
|
504
|
+
</CommandList>
|
|
505
|
+
</CommandDialog>
|
|
506
|
+
</>
|
|
507
|
+
)
|
|
508
|
+
}
|