create-appraisejs 0.3.1-alpha.0 → 0.3.1-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -17
- package/dist/cli.e2e.test.d.ts +2 -2
- package/dist/cli.e2e.test.js +74 -72
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js.map +1 -1
- package/dist/config.test.d.ts +2 -2
- package/dist/config.test.js +64 -64
- package/dist/copy-template.test.d.ts +2 -2
- package/dist/copy-template.test.js +70 -70
- package/dist/download-repo.test.d.ts +2 -2
- package/dist/download-repo.test.js +15 -13
- package/dist/install.test.d.ts +2 -2
- package/dist/install.test.js +115 -114
- package/dist/prepare-template-utils.d.ts.map +1 -1
- package/dist/prepare-template-utils.js.map +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +2 -2
- package/dist/prompts.js.map +1 -1
- package/dist/prompts.test.d.ts +2 -2
- package/dist/prompts.test.js +54 -54
- package/dist/sync-templates-utils.d.ts.map +1 -1
- package/dist/sync-templates-utils.js +1 -5
- package/dist/sync-templates-utils.js.map +1 -1
- package/package.json +1 -1
- package/templates/blank/.editorconfig +11 -0
- package/templates/blank/.gitattributes +21 -0
- package/templates/blank/.gitconfig.appraise +14 -0
- package/templates/blank/.prettierrc +13 -0
- package/templates/blank/.vscode/settings.json +2 -0
- package/templates/blank/README.md +12 -12
- package/templates/blank/components.json +24 -24
- package/templates/blank/cucumber.mjs +16 -16
- package/templates/blank/e2e/README.md +56 -0
- package/templates/blank/e2e/apply-migrations.mjs +76 -0
- package/templates/blank/e2e/appraise-smoke.spec.ts +78 -0
- package/templates/blank/e2e/authoring.spec.ts +53 -0
- package/templates/blank/e2e/crud-configuration.spec.ts +138 -0
- package/templates/blank/e2e/crud-tests.spec.ts +76 -0
- package/templates/blank/e2e/helpers/forms.ts +186 -0
- package/templates/blank/e2e/helpers/navigation.ts +27 -0
- package/templates/blank/e2e/helpers/table.ts +45 -0
- package/templates/blank/e2e/helpers/test-data.ts +549 -0
- package/templates/blank/e2e/helpers/ui.ts +41 -0
- package/templates/blank/e2e/navigation.spec.ts +101 -0
- package/templates/blank/e2e/runs-and-reports.spec.ts +82 -0
- package/templates/blank/e2e/settings-sync.spec.ts +39 -0
- package/templates/blank/e2e/start-server.mjs +61 -0
- package/templates/blank/eslint.config.mjs +4 -4
- package/templates/blank/gitignore +0 -3
- package/templates/blank/next-env.d.ts +1 -1
- package/templates/blank/package-lock.json +58 -102
- package/templates/blank/package.json +10 -9
- package/templates/blank/packages/cucumber-runtime/package.json +13 -13
- package/templates/blank/packages/cucumber-runtime/src/cache.util.ts +93 -93
- package/templates/blank/packages/cucumber-runtime/src/cli.ts +77 -68
- package/templates/blank/packages/cucumber-runtime/src/environment.util.ts +21 -21
- package/templates/blank/packages/cucumber-runtime/src/executor.ts +32 -32
- package/templates/blank/packages/cucumber-runtime/src/index.ts +17 -17
- package/templates/blank/packages/cucumber-runtime/src/locator.util.ts +234 -234
- package/templates/blank/packages/cucumber-runtime/src/parameter-types.ts +7 -7
- package/templates/blank/packages/cucumber-runtime/src/random-data.util.ts +35 -35
- package/templates/blank/packages/cucumber-runtime/src/types.ts +13 -13
- package/templates/blank/packages/cucumber-runtime/src/world.ts +44 -44
- package/templates/blank/packages/cucumber-runtime/tsconfig.json +11 -11
- package/templates/blank/packages/locator-picker-companion/dist/cli.js +1 -1
- package/templates/blank/packages/locator-picker-companion/dist/index.d.ts +3 -3
- package/templates/blank/packages/locator-picker-companion/dist/index.js +3 -3
- package/templates/blank/packages/locator-picker-companion/dist/injected-picker-script.js +13 -3
- package/templates/blank/packages/locator-picker-companion/dist/selector-generator.d.ts +6 -3
- package/templates/blank/packages/locator-picker-companion/dist/selector-generator.js +233 -229
- package/templates/blank/packages/locator-picker-companion/src/cli.ts +1 -7
- package/templates/blank/packages/locator-picker-companion/src/injected-picker-script.ts +26 -5
- package/templates/blank/packages/locator-picker-companion/src/launcher.ts +1 -3
- package/templates/blank/packages/locator-picker-companion/src/session-file.ts +4 -15
- package/templates/blank/packages/locator-picker-companion/src/types.ts +1 -8
- package/templates/blank/playwright.config.ts +46 -0
- package/templates/blank/postcss.config.mjs +8 -8
- package/templates/blank/prisma/dev.db +0 -0
- package/templates/blank/scripts/configure-git-line-endings.mjs +91 -0
- package/templates/blank/scripts/install-template-step.ts +5 -1
- package/templates/blank/scripts/lib/step-matcher.test.ts +3 -3
- package/templates/blank/scripts/lib/step-matcher.ts +5 -1
- package/templates/blank/scripts/lib/template-step-installer.test.ts +4 -2
- package/templates/blank/scripts/lib/template-step-installer.ts +16 -4
- package/templates/blank/scripts/lib/template-step-registry.test.ts +1 -1
- package/templates/blank/scripts/lib/template-step-registry.ts +4 -1
- package/templates/blank/scripts/run-fallow-commit.mjs +4 -6
- package/templates/blank/scripts/sync-all.ts +7 -6
- package/templates/blank/scripts/sync-appraise-base-template.ts +84 -77
- package/templates/blank/scripts/sync-environments.ts +47 -44
- package/templates/blank/scripts/sync-locator-groups.ts +67 -76
- package/templates/blank/scripts/sync-locators.ts +50 -53
- package/templates/blank/scripts/sync-modules.ts +42 -42
- package/templates/blank/scripts/sync-tags.ts +51 -51
- package/templates/blank/scripts/sync-template-step-groups.ts +34 -32
- package/templates/blank/scripts/sync-template-steps.ts +97 -97
- package/templates/blank/scripts/sync-test-cases.ts +65 -74
- package/templates/blank/scripts/sync-test-suites.ts +85 -80
- package/templates/blank/src/actions/server-action-boundary.test.ts +1 -7
- package/templates/blank/src/actions/settings/sync-actions.ts +3 -1
- package/templates/blank/src/actions/tags/tag-actions.ts +1 -7
- package/templates/blank/src/actions/template-test-case/template-test-case-actions.ts +3 -1
- package/templates/blank/src/app/(base)/environments/create/page.tsx +28 -28
- package/templates/blank/src/app/(base)/environments/environment-form.tsx +3 -2
- package/templates/blank/src/app/(base)/environments/environment-helpers.ts +4 -1
- package/templates/blank/src/app/(base)/layout.tsx +10 -10
- package/templates/blank/src/app/(base)/locator-groups/locator-group-form.tsx +5 -3
- package/templates/blank/src/app/(base)/locator-groups/locator-group-table-columns.tsx +77 -77
- package/templates/blank/src/app/(base)/locator-groups/locator-group-table.tsx +28 -28
- package/templates/blank/src/app/(base)/locator-groups/modify/[id]/page.tsx +46 -46
- package/templates/blank/src/app/(base)/locator-groups/page.tsx +9 -19
- package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-helpers.test.ts +3 -6
- package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-response.ts +22 -5
- package/templates/blank/src/app/(base)/locators/create/create-locator-workspace-state.ts +5 -1
- package/templates/blank/src/app/(base)/locators/create/use-locator-workspace.ts +7 -2
- package/templates/blank/src/app/(base)/locators/locator-file-sync.ts +1 -5
- package/templates/blank/src/app/(base)/locators/locator-helpers.ts +2 -12
- package/templates/blank/src/app/(base)/locators/locator-table-columns.tsx +59 -60
- package/templates/blank/src/app/(base)/modules/module-form.tsx +3 -1
- package/templates/blank/src/app/(base)/reports/overview-chart.tsx +49 -49
- package/templates/blank/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx +114 -115
- package/templates/blank/src/app/(base)/reports/test-cases/test-cases-metric-table.tsx +27 -27
- package/templates/blank/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx +80 -79
- package/templates/blank/src/app/(base)/reports/test-suites/test-suites-metric-table.tsx +29 -27
- package/templates/blank/src/app/(base)/settings/settings-sync-panel-helpers.test.tsx +4 -6
- package/templates/blank/src/app/(base)/settings/settings-sync-panel.tsx +22 -23
- package/templates/blank/src/app/(base)/tags/tag-form.test.tsx +2 -10
- package/templates/blank/src/app/(base)/tags/tag-form.tsx +5 -3
- package/templates/blank/src/app/(base)/tags/tag-table-columns.tsx +63 -63
- package/templates/blank/src/app/(base)/tags/tag-table.tsx +29 -29
- package/templates/blank/src/app/(base)/template-step-groups/create/page.tsx +28 -28
- package/templates/blank/src/app/(base)/template-step-groups/template-step-group-form.tsx +3 -1
- package/templates/blank/src/app/(base)/template-step-groups/template-step-group-helpers.ts +4 -1
- package/templates/blank/src/app/(base)/template-steps/paramChip.tsx +6 -10
- package/templates/blank/src/app/(base)/template-steps/template-step-form-helpers.ts +4 -2
- package/templates/blank/src/app/(base)/template-steps/template-step-helpers.test.ts +19 -1
- package/templates/blank/src/app/(base)/template-steps/template-step-helpers.ts +1 -5
- package/templates/blank/src/app/(base)/template-steps/template-step-row-guards.ts +1 -5
- package/templates/blank/src/app/(base)/template-steps/template-step-types.ts +1 -5
- package/templates/blank/src/app/(base)/template-test-cases/create-template-test-case-page-data.test.ts +4 -1
- package/templates/blank/src/app/(base)/template-test-cases/create-template-test-case-page-data.ts +1 -2
- package/templates/blank/src/app/(base)/template-test-cases/modify/[id]/page.tsx +1 -0
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-flow.test.tsx +0 -1
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-form.tsx +3 -1
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-table-columns.tsx +76 -76
- package/templates/blank/src/app/(base)/template-test-cases/template-test-case-table.tsx +32 -32
- package/templates/blank/src/app/(base)/test-cases/create/page.tsx +1 -5
- package/templates/blank/src/app/(base)/test-cases/create-from-template/create-from-template-selection-helpers.ts +1 -4
- package/templates/blank/src/app/(base)/test-cases/create-from-template/page.test.tsx +2 -2
- package/templates/blank/src/app/(base)/test-cases/inline-tag-creation-dialog.tsx +1 -7
- package/templates/blank/src/app/(base)/test-cases/inline-test-suite-creation-dialog.tsx +1 -7
- package/templates/blank/src/app/(base)/test-cases/modify/[id]/page.tsx +1 -5
- package/templates/blank/src/app/(base)/test-cases/test-case-form.tsx +63 -78
- package/templates/blank/src/app/(base)/test-cases/test-case-route-helpers.test.ts +2 -7
- package/templates/blank/src/app/(base)/test-suites/editable-test-suite-helpers.ts +1 -6
- package/templates/blank/src/app/(base)/test-suites/test-suite-form.test.tsx +2 -10
- package/templates/blank/src/app/(dashboard-components)/data-card-grid.tsx +10 -10
- package/templates/blank/src/app/api/test-runs/[runId]/download/route.ts +1 -4
- package/templates/blank/src/app/api/test-runs/[runId]/trace/[testCaseId]/route.test.ts +18 -9
- package/templates/blank/src/assets/icons/empty-tube.tsx +23 -23
- package/templates/blank/src/assets/icons/tube-plus.tsx +29 -29
- package/templates/blank/src/components/data-visualization/info-card.tsx +56 -70
- package/templates/blank/src/components/data-visualization/info-grid.tsx +22 -22
- package/templates/blank/src/components/diagram/add-node-prompt-node.tsx +1 -1
- package/templates/blank/src/components/diagram/dynamic-parameters-helpers.ts +4 -3
- package/templates/blank/src/components/diagram/dynamic-parameters.test.tsx +4 -1
- package/templates/blank/src/components/diagram/dynamic-parameters.tsx +0 -1
- package/templates/blank/src/components/diagram/flow-diagram-block-dialog.test.tsx +26 -0
- package/templates/blank/src/components/diagram/flow-diagram-block-dialog.tsx +3 -1
- package/templates/blank/src/components/diagram/flow-diagram-connection-guards.ts +24 -6
- package/templates/blank/src/components/diagram/flow-diagram-helpers.test.ts +27 -0
- package/templates/blank/src/components/diagram/flow-diagram-node-search.tsx +65 -65
- package/templates/blank/src/components/diagram/flow-diagram-toolbar.tsx +1 -3
- package/templates/blank/src/components/diagram/flow-diagram-view.tsx +1 -7
- package/templates/blank/src/components/diagram/flow-node-data-helpers.ts +1 -1
- package/templates/blank/src/components/diagram/node-form-fields-content.tsx +9 -2
- package/templates/blank/src/components/diagram/node-form-helpers.test.ts +3 -1
- package/templates/blank/src/components/diagram/node-form-helpers.ts +1 -4
- package/templates/blank/src/components/diagram/node-form-template-step-selection.ts +1 -4
- package/templates/blank/src/components/diagram/node-form.test.tsx +25 -0
- package/templates/blank/src/components/diagram/node-form.tsx +2 -12
- package/templates/blank/src/components/diagram/options-header-node.test.tsx +4 -1
- package/templates/blank/src/components/diagram/options-header-node.tsx +140 -130
- package/templates/blank/src/components/diagram/use-flow-diagram.ts +1 -2
- package/templates/blank/src/components/form/error-message.tsx +7 -7
- package/templates/blank/src/components/loading-skeleton/form/button-skeleton.tsx +8 -8
- package/templates/blank/src/components/loading-skeleton/form/text-input-skeleton.tsx +8 -8
- package/templates/blank/src/components/loading-skeleton/visualization/table-skeleton.tsx +14 -14
- package/templates/blank/src/components/navigation/entity-search-command.tsx +3 -9
- package/templates/blank/src/components/navigation/nav-link.tsx +60 -60
- package/templates/blank/src/components/test-case/test-case-form-helpers.test.ts +1 -5
- package/templates/blank/src/components/test-case/test-case-form-helpers.ts +1 -5
- package/templates/blank/src/components/test-case/test-case-picker-helpers.ts +8 -7
- package/templates/blank/src/components/test-case/test-case-picker.tsx +2 -6
- package/templates/blank/src/components/test-run/log-viewer.test.tsx +25 -0
- package/templates/blank/src/components/test-run/log-viewer.tsx +2 -2
- package/templates/blank/src/components/test-run/test-run-details-guards.ts +10 -1
- package/templates/blank/src/components/test-run/test-run-details.test.tsx +9 -19
- package/templates/blank/src/components/test-run/use-log-viewer.ts +2 -8
- package/templates/blank/src/components/test-run/use-test-run-header.ts +1 -4
- package/templates/blank/src/components/test-suite/test-suite-picker.tsx +1 -1
- package/templates/blank/src/components/theme/theme-provider.tsx +7 -1
- package/templates/blank/src/components/typography/page-header-subtitle.tsx +7 -7
- package/templates/blank/src/components/typography/page-header.tsx +7 -7
- package/templates/blank/src/components/ui/chart.tsx +2 -8
- package/templates/blank/src/components/ui/command.tsx +2 -5
- package/templates/blank/src/components/ui/data-table-column-header.tsx +3 -3
- package/templates/blank/src/components/ui/data-table.test.tsx +1 -8
- package/templates/blank/src/components/ui/dialog.tsx +1 -4
- package/templates/blank/src/components/ui/select.tsx +2 -2
- package/templates/blank/src/components/ui/separator.tsx +5 -1
- package/templates/blank/src/components/ui/skeleton.tsx +7 -7
- package/templates/blank/src/components/ui/table.tsx +1 -1
- package/templates/blank/src/components/ui/toaster.tsx +26 -26
- package/templates/blank/src/components/ui/tooltip.tsx +1 -1
- package/templates/blank/src/constants/form-opts/locator-group-form-opts.ts +1 -1
- package/templates/blank/src/lib/locator-group-file-utils.ts +5 -1
- package/templates/blank/src/lib/locator-picker/session-manager.ts +1 -2
- package/templates/blank/src/lib/metrics/metric-calculator.test.ts +105 -6
- package/templates/blank/src/lib/metrics/metric-calculator.ts +39 -40
- package/templates/blank/src/lib/sync/sync-executor.ts +1 -4
- package/templates/blank/src/lib/sync/sync-pending-counts.test.ts +201 -7
- package/templates/blank/src/lib/sync/sync-pending-counts.ts +81 -13
- package/templates/blank/src/lib/template-automation-paths.ts +1 -1
- package/templates/blank/src/lib/template-sync-utils.d.ts +14 -7
- package/templates/blank/src/lib/test-case-utils.ts +6 -6
- package/templates/blank/src/lib/test-run/log-formatter.ts +82 -83
- package/templates/blank/src/lib/test-run/report-parser.ts +352 -352
- package/templates/blank/src/lib/transformers/gherkin-converter.ts +42 -42
- package/templates/blank/src/lib/transformers/key-to-icon-transformer.tsx +95 -95
- package/templates/blank/src/lib/utils/node-param-validation.ts +81 -81
- package/templates/blank/src/lib/utils/template-step-file-generator.ts +5 -3
- package/templates/blank/src/lib/utils/template-step-file-manager-intelligent.ts +11 -1
- package/templates/blank/src/services/dashboard/dashboard-service.test.ts +28 -1
- package/templates/blank/src/services/dashboard/dashboard-service.ts +2 -0
- package/templates/blank/src/services/locator/locator-service.test.ts +1 -3
- package/templates/blank/src/services/locator/locator-service.ts +3 -1
- package/templates/blank/src/services/locator/locator-sync-utils.test.ts +1 -4
- package/templates/blank/src/services/module/module-service.ts +1 -4
- package/templates/blank/src/services/report/report-service.test.ts +70 -6
- package/templates/blank/src/services/report/report-service.ts +52 -9
- package/templates/blank/src/services/shared/errors.ts +2 -4
- package/templates/blank/src/services/template-step/template-step-service.ts +3 -1
- package/templates/blank/src/services/template-step-group/template-step-group-service.ts +3 -1
- package/templates/blank/src/services/test-case/test-case-service.ts +0 -5
- package/templates/blank/src/services/test-run/test-run-service.test.ts +3 -6
- package/templates/blank/src/services/test-run/test-run-service.ts +12 -7
- package/templates/blank/src/services/test-suite/test-suite-service.test.ts +1 -5
- package/templates/blank/src/services/test-suite/test-suite-service.ts +2 -4
- package/templates/blank/src/types/form/actionHandler.ts +1 -5
- package/templates/blank/tsconfig.json +8 -8
- package/templates/default/packages/locator-picker-companion/dist/cli.d.ts +1 -1
- package/templates/default/packages/locator-picker-companion/dist/cli.js +313 -279
- package/templates/default/packages/locator-picker-companion/dist/index.d.ts +3 -3
- package/templates/default/packages/locator-picker-companion/dist/index.js +3 -3
- package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.d.ts +1 -1
- package/templates/default/packages/locator-picker-companion/dist/injected-picker-script.js +526 -481
- package/templates/default/packages/locator-picker-companion/dist/launcher.d.ts +13 -10
- package/templates/default/packages/locator-picker-companion/dist/launcher.js +47 -48
- package/templates/default/packages/locator-picker-companion/dist/selector-generator.d.ts +6 -3
- package/templates/default/packages/locator-picker-companion/dist/selector-generator.js +233 -229
- package/templates/default/packages/locator-picker-companion/dist/session-file.d.ts +30 -22
- package/templates/default/packages/locator-picker-companion/dist/session-file.js +116 -104
- package/templates/default/packages/locator-picker-companion/dist/types.d.ts +25 -25
- package/templates/default/packages/locator-picker-companion/dist/types.js +1 -1
- package/templates/starter/.editorconfig +11 -0
- package/templates/starter/.gitattributes +21 -0
- package/templates/starter/.gitconfig.appraise +14 -0
- package/templates/starter/.prettierrc +13 -0
- package/templates/starter/.vscode/settings.json +2 -0
- package/templates/starter/README.md +12 -12
- package/templates/starter/automation/steps/actions/click.step.ts +56 -58
- package/templates/starter/automation/steps/actions/hover.step.ts +25 -27
- package/templates/starter/automation/steps/actions/input.step.ts +85 -108
- package/templates/starter/automation/steps/actions/navigation.step.ts +67 -70
- package/templates/starter/automation/steps/actions/random_data.step.ts +149 -143
- package/templates/starter/automation/steps/actions/store.step.ts +69 -1
- package/templates/starter/automation/steps/actions/wait.step.ts +84 -1
- package/templates/starter/automation/steps/validations/active_state_assertion.step.ts +28 -30
- package/templates/starter/automation/steps/validations/navigation_assertion.step.ts +20 -22
- package/templates/starter/automation/steps/validations/text_assertion.step.ts +67 -107
- package/templates/starter/automation/steps/validations/visibility_assertion.step.ts +24 -26
- package/templates/starter/components.json +24 -24
- package/templates/starter/cucumber.mjs +16 -16
- package/templates/starter/e2e/README.md +56 -0
- package/templates/starter/e2e/apply-migrations.mjs +76 -0
- package/templates/starter/e2e/appraise-smoke.spec.ts +78 -0
- package/templates/starter/e2e/authoring.spec.ts +53 -0
- package/templates/starter/e2e/crud-configuration.spec.ts +138 -0
- package/templates/starter/e2e/crud-tests.spec.ts +76 -0
- package/templates/starter/e2e/helpers/forms.ts +186 -0
- package/templates/starter/e2e/helpers/navigation.ts +27 -0
- package/templates/starter/e2e/helpers/table.ts +45 -0
- package/templates/starter/e2e/helpers/test-data.ts +549 -0
- package/templates/starter/e2e/helpers/ui.ts +41 -0
- package/templates/starter/e2e/navigation.spec.ts +101 -0
- package/templates/starter/e2e/runs-and-reports.spec.ts +82 -0
- package/templates/starter/e2e/settings-sync.spec.ts +39 -0
- package/templates/starter/e2e/start-server.mjs +61 -0
- package/templates/starter/eslint.config.mjs +4 -4
- package/templates/starter/gitignore +0 -3
- package/templates/starter/next-env.d.ts +1 -1
- package/templates/starter/package-lock.json +58 -102
- package/templates/starter/package.json +10 -9
- package/templates/starter/packages/cucumber-runtime/package.json +13 -13
- package/templates/starter/packages/cucumber-runtime/src/cache.util.ts +93 -93
- package/templates/starter/packages/cucumber-runtime/src/cli.ts +77 -68
- package/templates/starter/packages/cucumber-runtime/src/environment.util.ts +21 -21
- package/templates/starter/packages/cucumber-runtime/src/executor.ts +32 -32
- package/templates/starter/packages/cucumber-runtime/src/index.ts +17 -17
- package/templates/starter/packages/cucumber-runtime/src/locator.util.ts +234 -234
- package/templates/starter/packages/cucumber-runtime/src/parameter-types.ts +7 -7
- package/templates/starter/packages/cucumber-runtime/src/random-data.util.ts +35 -35
- package/templates/starter/packages/cucumber-runtime/src/types.ts +13 -13
- package/templates/starter/packages/cucumber-runtime/src/world.ts +44 -44
- package/templates/starter/packages/cucumber-runtime/tsconfig.json +11 -11
- package/templates/starter/packages/locator-picker-companion/dist/cli.js +1 -1
- package/templates/starter/packages/locator-picker-companion/dist/index.d.ts +3 -3
- package/templates/starter/packages/locator-picker-companion/dist/index.js +3 -3
- package/templates/starter/packages/locator-picker-companion/dist/injected-picker-script.js +13 -3
- package/templates/starter/packages/locator-picker-companion/dist/selector-generator.d.ts +6 -3
- package/templates/starter/packages/locator-picker-companion/dist/selector-generator.js +233 -229
- package/templates/starter/packages/locator-picker-companion/src/cli.ts +1 -7
- package/templates/starter/packages/locator-picker-companion/src/injected-picker-script.ts +26 -5
- package/templates/starter/packages/locator-picker-companion/src/launcher.ts +1 -3
- package/templates/starter/packages/locator-picker-companion/src/session-file.ts +4 -15
- package/templates/starter/packages/locator-picker-companion/src/types.ts +1 -8
- package/templates/starter/playwright.config.ts +46 -0
- package/templates/starter/postcss.config.mjs +8 -8
- package/templates/starter/prisma/dev.db +0 -0
- package/templates/starter/scripts/configure-git-line-endings.mjs +91 -0
- package/templates/starter/scripts/install-template-step.ts +5 -1
- package/templates/starter/scripts/lib/step-matcher.test.ts +3 -3
- package/templates/starter/scripts/lib/step-matcher.ts +5 -1
- package/templates/starter/scripts/lib/template-step-installer.test.ts +4 -2
- package/templates/starter/scripts/lib/template-step-installer.ts +16 -4
- package/templates/starter/scripts/lib/template-step-registry.test.ts +1 -1
- package/templates/starter/scripts/lib/template-step-registry.ts +4 -1
- package/templates/starter/scripts/run-fallow-commit.mjs +4 -6
- package/templates/starter/scripts/sync-all.ts +7 -6
- package/templates/starter/scripts/sync-appraise-base-template.ts +84 -77
- package/templates/starter/scripts/sync-environments.ts +47 -44
- package/templates/starter/scripts/sync-locator-groups.ts +67 -76
- package/templates/starter/scripts/sync-locators.ts +50 -53
- package/templates/starter/scripts/sync-modules.ts +42 -42
- package/templates/starter/scripts/sync-tags.ts +51 -51
- package/templates/starter/scripts/sync-template-step-groups.ts +34 -32
- package/templates/starter/scripts/sync-template-steps.ts +97 -97
- package/templates/starter/scripts/sync-test-cases.ts +65 -74
- package/templates/starter/scripts/sync-test-suites.ts +85 -80
- package/templates/starter/src/actions/server-action-boundary.test.ts +1 -7
- package/templates/starter/src/actions/settings/sync-actions.ts +3 -1
- package/templates/starter/src/actions/tags/tag-actions.ts +1 -7
- package/templates/starter/src/actions/template-test-case/template-test-case-actions.ts +3 -1
- package/templates/starter/src/app/(base)/environments/create/page.tsx +28 -28
- package/templates/starter/src/app/(base)/environments/environment-form.tsx +3 -2
- package/templates/starter/src/app/(base)/environments/environment-helpers.ts +4 -1
- package/templates/starter/src/app/(base)/layout.tsx +10 -10
- package/templates/starter/src/app/(base)/locator-groups/locator-group-form.tsx +5 -3
- package/templates/starter/src/app/(base)/locator-groups/locator-group-table-columns.tsx +77 -77
- package/templates/starter/src/app/(base)/locator-groups/locator-group-table.tsx +28 -28
- package/templates/starter/src/app/(base)/locator-groups/modify/[id]/page.tsx +46 -46
- package/templates/starter/src/app/(base)/locator-groups/page.tsx +9 -19
- package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-helpers.test.ts +3 -6
- package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-response.ts +22 -5
- package/templates/starter/src/app/(base)/locators/create/create-locator-workspace-state.ts +5 -1
- package/templates/starter/src/app/(base)/locators/create/use-locator-workspace.ts +7 -2
- package/templates/starter/src/app/(base)/locators/locator-file-sync.ts +1 -5
- package/templates/starter/src/app/(base)/locators/locator-helpers.ts +2 -12
- package/templates/starter/src/app/(base)/locators/locator-table-columns.tsx +59 -60
- package/templates/starter/src/app/(base)/modules/module-form.tsx +3 -1
- package/templates/starter/src/app/(base)/reports/overview-chart.tsx +49 -49
- package/templates/starter/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx +114 -115
- package/templates/starter/src/app/(base)/reports/test-cases/test-cases-metric-table.tsx +27 -27
- package/templates/starter/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx +80 -79
- package/templates/starter/src/app/(base)/reports/test-suites/test-suites-metric-table.tsx +29 -27
- package/templates/starter/src/app/(base)/settings/settings-sync-panel-helpers.test.tsx +4 -6
- package/templates/starter/src/app/(base)/settings/settings-sync-panel.tsx +22 -23
- package/templates/starter/src/app/(base)/tags/tag-form.test.tsx +2 -10
- package/templates/starter/src/app/(base)/tags/tag-form.tsx +5 -3
- package/templates/starter/src/app/(base)/tags/tag-table-columns.tsx +63 -63
- package/templates/starter/src/app/(base)/tags/tag-table.tsx +29 -29
- package/templates/starter/src/app/(base)/template-step-groups/create/page.tsx +28 -28
- package/templates/starter/src/app/(base)/template-step-groups/template-step-group-form.tsx +3 -1
- package/templates/starter/src/app/(base)/template-step-groups/template-step-group-helpers.ts +4 -1
- package/templates/starter/src/app/(base)/template-steps/paramChip.tsx +6 -10
- package/templates/starter/src/app/(base)/template-steps/template-step-form-helpers.ts +4 -2
- package/templates/starter/src/app/(base)/template-steps/template-step-helpers.test.ts +19 -1
- package/templates/starter/src/app/(base)/template-steps/template-step-helpers.ts +1 -5
- package/templates/starter/src/app/(base)/template-steps/template-step-row-guards.ts +1 -5
- package/templates/starter/src/app/(base)/template-steps/template-step-types.ts +1 -5
- package/templates/starter/src/app/(base)/template-test-cases/create-template-test-case-page-data.test.ts +4 -1
- package/templates/starter/src/app/(base)/template-test-cases/create-template-test-case-page-data.ts +1 -2
- package/templates/starter/src/app/(base)/template-test-cases/modify/[id]/page.tsx +1 -0
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-flow.test.tsx +0 -1
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-form.tsx +3 -1
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-table-columns.tsx +76 -76
- package/templates/starter/src/app/(base)/template-test-cases/template-test-case-table.tsx +32 -32
- package/templates/starter/src/app/(base)/test-cases/create/page.tsx +1 -5
- package/templates/starter/src/app/(base)/test-cases/create-from-template/create-from-template-selection-helpers.ts +1 -4
- package/templates/starter/src/app/(base)/test-cases/create-from-template/page.test.tsx +2 -2
- package/templates/starter/src/app/(base)/test-cases/inline-tag-creation-dialog.tsx +1 -7
- package/templates/starter/src/app/(base)/test-cases/inline-test-suite-creation-dialog.tsx +1 -7
- package/templates/starter/src/app/(base)/test-cases/modify/[id]/page.tsx +1 -5
- package/templates/starter/src/app/(base)/test-cases/test-case-form.tsx +63 -78
- package/templates/starter/src/app/(base)/test-cases/test-case-route-helpers.test.ts +2 -7
- package/templates/starter/src/app/(base)/test-suites/editable-test-suite-helpers.ts +1 -6
- package/templates/starter/src/app/(base)/test-suites/test-suite-form.test.tsx +2 -10
- package/templates/starter/src/app/(dashboard-components)/data-card-grid.tsx +10 -10
- package/templates/starter/src/app/api/test-runs/[runId]/download/route.ts +1 -4
- package/templates/starter/src/app/api/test-runs/[runId]/trace/[testCaseId]/route.test.ts +18 -9
- package/templates/starter/src/assets/icons/empty-tube.tsx +23 -23
- package/templates/starter/src/assets/icons/tube-plus.tsx +29 -29
- package/templates/starter/src/components/data-visualization/info-card.tsx +56 -70
- package/templates/starter/src/components/data-visualization/info-grid.tsx +22 -22
- package/templates/starter/src/components/diagram/add-node-prompt-node.tsx +1 -1
- package/templates/starter/src/components/diagram/dynamic-parameters-helpers.ts +4 -3
- package/templates/starter/src/components/diagram/dynamic-parameters.test.tsx +4 -1
- package/templates/starter/src/components/diagram/dynamic-parameters.tsx +0 -1
- package/templates/starter/src/components/diagram/flow-diagram-block-dialog.test.tsx +26 -0
- package/templates/starter/src/components/diagram/flow-diagram-block-dialog.tsx +3 -1
- package/templates/starter/src/components/diagram/flow-diagram-connection-guards.ts +24 -6
- package/templates/starter/src/components/diagram/flow-diagram-helpers.test.ts +27 -0
- package/templates/starter/src/components/diagram/flow-diagram-node-search.tsx +65 -65
- package/templates/starter/src/components/diagram/flow-diagram-toolbar.tsx +1 -3
- package/templates/starter/src/components/diagram/flow-diagram-view.tsx +1 -7
- package/templates/starter/src/components/diagram/flow-node-data-helpers.ts +1 -1
- package/templates/starter/src/components/diagram/node-form-fields-content.tsx +9 -2
- package/templates/starter/src/components/diagram/node-form-helpers.test.ts +3 -1
- package/templates/starter/src/components/diagram/node-form-helpers.ts +1 -4
- package/templates/starter/src/components/diagram/node-form-template-step-selection.ts +1 -4
- package/templates/starter/src/components/diagram/node-form.test.tsx +25 -0
- package/templates/starter/src/components/diagram/node-form.tsx +2 -12
- package/templates/starter/src/components/diagram/options-header-node.test.tsx +4 -1
- package/templates/starter/src/components/diagram/options-header-node.tsx +140 -130
- package/templates/starter/src/components/diagram/use-flow-diagram.ts +1 -2
- package/templates/starter/src/components/form/error-message.tsx +7 -7
- package/templates/starter/src/components/loading-skeleton/form/button-skeleton.tsx +8 -8
- package/templates/starter/src/components/loading-skeleton/form/text-input-skeleton.tsx +8 -8
- package/templates/starter/src/components/loading-skeleton/visualization/table-skeleton.tsx +14 -14
- package/templates/starter/src/components/navigation/entity-search-command.tsx +3 -9
- package/templates/starter/src/components/navigation/nav-link.tsx +60 -60
- package/templates/starter/src/components/test-case/test-case-form-helpers.test.ts +1 -5
- package/templates/starter/src/components/test-case/test-case-form-helpers.ts +1 -5
- package/templates/starter/src/components/test-case/test-case-picker-helpers.ts +8 -7
- package/templates/starter/src/components/test-case/test-case-picker.tsx +2 -6
- package/templates/starter/src/components/test-run/log-viewer.test.tsx +25 -0
- package/templates/starter/src/components/test-run/log-viewer.tsx +2 -2
- package/templates/starter/src/components/test-run/test-run-details-guards.ts +10 -1
- package/templates/starter/src/components/test-run/test-run-details.test.tsx +9 -19
- package/templates/starter/src/components/test-run/use-log-viewer.ts +2 -8
- package/templates/starter/src/components/test-run/use-test-run-header.ts +1 -4
- package/templates/starter/src/components/test-suite/test-suite-picker.tsx +1 -1
- package/templates/starter/src/components/theme/theme-provider.tsx +7 -1
- package/templates/starter/src/components/typography/page-header-subtitle.tsx +7 -7
- package/templates/starter/src/components/typography/page-header.tsx +7 -7
- package/templates/starter/src/components/ui/chart.tsx +2 -8
- package/templates/starter/src/components/ui/command.tsx +2 -5
- package/templates/starter/src/components/ui/data-table-column-header.tsx +3 -3
- package/templates/starter/src/components/ui/data-table.test.tsx +1 -8
- package/templates/starter/src/components/ui/dialog.tsx +1 -4
- package/templates/starter/src/components/ui/select.tsx +2 -2
- package/templates/starter/src/components/ui/separator.tsx +5 -1
- package/templates/starter/src/components/ui/skeleton.tsx +7 -7
- package/templates/starter/src/components/ui/table.tsx +1 -1
- package/templates/starter/src/components/ui/toaster.tsx +26 -26
- package/templates/starter/src/components/ui/tooltip.tsx +1 -1
- package/templates/starter/src/constants/form-opts/locator-group-form-opts.ts +1 -1
- package/templates/starter/src/lib/locator-group-file-utils.ts +5 -1
- package/templates/starter/src/lib/locator-picker/session-manager.ts +1 -2
- package/templates/starter/src/lib/metrics/metric-calculator.test.ts +105 -6
- package/templates/starter/src/lib/metrics/metric-calculator.ts +39 -40
- package/templates/starter/src/lib/sync/sync-executor.ts +1 -4
- package/templates/starter/src/lib/sync/sync-pending-counts.test.ts +201 -7
- package/templates/starter/src/lib/sync/sync-pending-counts.ts +81 -13
- package/templates/starter/src/lib/template-automation-paths.ts +1 -1
- package/templates/starter/src/lib/template-sync-utils.d.ts +14 -7
- package/templates/starter/src/lib/test-case-utils.ts +6 -6
- package/templates/starter/src/lib/test-run/log-formatter.ts +82 -83
- package/templates/starter/src/lib/test-run/report-parser.ts +352 -352
- package/templates/starter/src/lib/transformers/gherkin-converter.ts +42 -42
- package/templates/starter/src/lib/transformers/key-to-icon-transformer.tsx +95 -95
- package/templates/starter/src/lib/utils/node-param-validation.ts +81 -81
- package/templates/starter/src/lib/utils/template-step-file-generator.ts +5 -3
- package/templates/starter/src/lib/utils/template-step-file-manager-intelligent.ts +11 -1
- package/templates/starter/src/services/dashboard/dashboard-service.test.ts +28 -1
- package/templates/starter/src/services/dashboard/dashboard-service.ts +2 -0
- package/templates/starter/src/services/locator/locator-service.test.ts +1 -3
- package/templates/starter/src/services/locator/locator-service.ts +3 -1
- package/templates/starter/src/services/locator/locator-sync-utils.test.ts +1 -4
- package/templates/starter/src/services/module/module-service.ts +1 -4
- package/templates/starter/src/services/report/report-service.test.ts +70 -6
- package/templates/starter/src/services/report/report-service.ts +52 -9
- package/templates/starter/src/services/shared/errors.ts +2 -4
- package/templates/starter/src/services/template-step/template-step-service.ts +3 -1
- package/templates/starter/src/services/template-step-group/template-step-group-service.ts +3 -1
- package/templates/starter/src/services/test-case/test-case-service.ts +0 -5
- package/templates/starter/src/services/test-run/test-run-service.test.ts +3 -6
- package/templates/starter/src/services/test-run/test-run-service.ts +12 -7
- package/templates/starter/src/services/test-suite/test-suite-service.test.ts +1 -5
- package/templates/starter/src/services/test-suite/test-suite-service.ts +2 -4
- package/templates/starter/src/types/form/actionHandler.ts +1 -5
- package/templates/starter/tsconfig.json +8 -8
package/templates/starter/src/app/(base)/reports/test-cases/test-cases-metric-table-columns.tsx
CHANGED
|
@@ -1,115 +1,114 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { DataTableColumnHeader } from '@/components/ui/data-table-column-header'
|
|
4
|
-
import { ColumnDef } from '@tanstack/react-table'
|
|
5
|
-
import TableActions from '@/components/table/table-actions'
|
|
6
|
-
import { Tag, TestCase, TestCaseMetrics } from '@prisma/client'
|
|
7
|
-
import { deleteTestCaseAction } from '@/actions/test-case/test-case-actions'
|
|
8
|
-
import { formatDateTime } from '@/lib/utils'
|
|
9
|
-
import { Checkbox } from '@/components/ui/checkbox'
|
|
10
|
-
|
|
11
|
-
export const testCasesMetricTableCols: ColumnDef<TestCaseMetrics & { testCase: TestCase & { tags: Tag[] } }>[] =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
]
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { DataTableColumnHeader } from '@/components/ui/data-table-column-header'
|
|
4
|
+
import { ColumnDef } from '@tanstack/react-table'
|
|
5
|
+
import TableActions from '@/components/table/table-actions'
|
|
6
|
+
import { Tag, TestCase, TestCaseMetrics } from '@prisma/client'
|
|
7
|
+
import { deleteTestCaseAction } from '@/actions/test-case/test-case-actions'
|
|
8
|
+
import { formatDateTime } from '@/lib/utils'
|
|
9
|
+
import { Checkbox } from '@/components/ui/checkbox'
|
|
10
|
+
|
|
11
|
+
export const testCasesMetricTableCols: ColumnDef<TestCaseMetrics & { testCase: TestCase & { tags: Tag[] } }>[] = [
|
|
12
|
+
{
|
|
13
|
+
id: 'select',
|
|
14
|
+
header: ({ table }) => (
|
|
15
|
+
<Checkbox
|
|
16
|
+
checked={table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate')}
|
|
17
|
+
onCheckedChange={value => table.toggleAllPageRowsSelected(!!value)}
|
|
18
|
+
aria-label="Select all"
|
|
19
|
+
className="mr-2"
|
|
20
|
+
/>
|
|
21
|
+
),
|
|
22
|
+
cell: ({ row }) => (
|
|
23
|
+
<Checkbox
|
|
24
|
+
checked={row.getIsSelected()}
|
|
25
|
+
onCheckedChange={value => row.toggleSelected(!!value)}
|
|
26
|
+
aria-label="Select row"
|
|
27
|
+
className="mr-2"
|
|
28
|
+
/>
|
|
29
|
+
),
|
|
30
|
+
enableSorting: false,
|
|
31
|
+
enableHiding: false,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 'testCase.title',
|
|
35
|
+
accessorKey: 'testCase.title',
|
|
36
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Test Case Title" />,
|
|
37
|
+
cell: ({ row }) => {
|
|
38
|
+
const testCase = row.original.testCase
|
|
39
|
+
return <div>{testCase.title}</div>
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
accessorKey: 'testCase.description',
|
|
44
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Test Case Description" />,
|
|
45
|
+
cell: ({ row }) => {
|
|
46
|
+
const testCase = row.original.testCase
|
|
47
|
+
return <div>{testCase.description}</div>
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
accessorKey: 'consecutiveFailures',
|
|
52
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Consecutive Failures" />,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
accessorKey: 'failureRate',
|
|
56
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Failure Rate" />,
|
|
57
|
+
cell: ({ row }) => {
|
|
58
|
+
const testCaseMetrics = row.original
|
|
59
|
+
return <div>{((testCaseMetrics.failureRate as number) * 100).toFixed(2)}%</div>
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
accessorKey: 'totalRecentRuns',
|
|
64
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Total Recent Runs" />,
|
|
65
|
+
cell: ({ row }) => {
|
|
66
|
+
const testCaseMetrics = row.original
|
|
67
|
+
return <div>{testCaseMetrics.totalRecentRuns}</div>
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
accessorKey: 'failedRecentRuns',
|
|
72
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Failed Recent Runs" />,
|
|
73
|
+
cell: ({ row }) => {
|
|
74
|
+
const testCaseMetrics = row.original
|
|
75
|
+
return <div>{testCaseMetrics.failedRecentRuns}</div>
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
accessorKey: 'lastExecutedAt',
|
|
80
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Last Executed At" />,
|
|
81
|
+
cell: ({ row }) => {
|
|
82
|
+
const testCaseMetrics = row.original
|
|
83
|
+
return <div>{testCaseMetrics.lastExecutedAt ? formatDateTime(testCaseMetrics.lastExecutedAt) : '-'}</div>
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
accessorKey: 'lastFailedAt',
|
|
88
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Last Failed At" />,
|
|
89
|
+
cell: ({ row }) => {
|
|
90
|
+
const testCaseMetrics = row.original
|
|
91
|
+
return <div>{testCaseMetrics.lastFailedAt ? formatDateTime(testCaseMetrics.lastFailedAt) : '-'}</div>
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
accessorKey: 'lastPassedAt',
|
|
96
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Last Passed At" />,
|
|
97
|
+
cell: ({ row }) => {
|
|
98
|
+
const testCaseMetrics = row.original
|
|
99
|
+
return <div>{testCaseMetrics.lastPassedAt ? formatDateTime(testCaseMetrics.lastPassedAt) : '-'}</div>
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
id: 'actions',
|
|
104
|
+
cell: ({ row }) => {
|
|
105
|
+
const testCaseId = row.original.testCaseId
|
|
106
|
+
return (
|
|
107
|
+
<TableActions
|
|
108
|
+
modifyLink={`/test-cases/modify/${testCaseId}`}
|
|
109
|
+
deleteHandler={() => deleteTestCaseAction([testCaseId])}
|
|
110
|
+
/>
|
|
111
|
+
)
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
]
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { DataTable } from '@/components/ui/data-table'
|
|
2
|
-
import { testCasesMetricTableCols } from './test-cases-metric-table-columns'
|
|
3
|
-
import { TestCaseMetrics, TestCase, Tag } from '@prisma/client'
|
|
4
|
-
import { getAllTestCaseMetricsAction } from '@/actions/reports/report-actions'
|
|
5
|
-
import { deleteTestCaseAction } from '@/actions/test-case/test-case-actions'
|
|
6
|
-
|
|
7
|
-
const TestCasesMetricTable = async ({ filter }: { filter: 'repeatedlyFailing' | 'flaky' }) => {
|
|
8
|
-
const { data: testCaseMetrics, error: testCaseMetricsError } = await getAllTestCaseMetricsAction(filter)
|
|
9
|
-
|
|
10
|
-
if (testCaseMetricsError) {
|
|
11
|
-
return <div>Error: {testCaseMetricsError}</div>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<>
|
|
16
|
-
<DataTable
|
|
17
|
-
columns={testCasesMetricTableCols}
|
|
18
|
-
data={testCaseMetrics as (TestCaseMetrics & { testCase: TestCase & { tags: Tag[] } })[]}
|
|
19
|
-
filterColumn="testCase.title"
|
|
20
|
-
filterPlaceholder="Filter by name..."
|
|
21
|
-
deleteAction={deleteTestCaseAction}
|
|
22
|
-
/>
|
|
23
|
-
</>
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export default TestCasesMetricTable
|
|
1
|
+
import { DataTable } from '@/components/ui/data-table'
|
|
2
|
+
import { testCasesMetricTableCols } from './test-cases-metric-table-columns'
|
|
3
|
+
import { TestCaseMetrics, TestCase, Tag } from '@prisma/client'
|
|
4
|
+
import { getAllTestCaseMetricsAction } from '@/actions/reports/report-actions'
|
|
5
|
+
import { deleteTestCaseAction } from '@/actions/test-case/test-case-actions'
|
|
6
|
+
|
|
7
|
+
const TestCasesMetricTable = async ({ filter }: { filter: 'repeatedlyFailing' | 'flaky' }) => {
|
|
8
|
+
const { data: testCaseMetrics, error: testCaseMetricsError } = await getAllTestCaseMetricsAction(filter)
|
|
9
|
+
|
|
10
|
+
if (testCaseMetricsError) {
|
|
11
|
+
return <div>Error: {testCaseMetricsError}</div>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<DataTable
|
|
17
|
+
columns={testCasesMetricTableCols}
|
|
18
|
+
data={testCaseMetrics as (TestCaseMetrics & { testCase: TestCase & { tags: Tag[] } })[]}
|
|
19
|
+
filterColumn="testCase.title"
|
|
20
|
+
filterPlaceholder="Filter by name..."
|
|
21
|
+
deleteAction={deleteTestCaseAction}
|
|
22
|
+
/>
|
|
23
|
+
</>
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default TestCasesMetricTable
|
package/templates/starter/src/app/(base)/reports/test-suites/test-suites-metric-table-columns.tsx
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import { DataTableColumnHeader } from '@/components/ui/data-table-column-header'
|
|
4
|
-
import { ColumnDef } from '@tanstack/react-table'
|
|
5
|
-
import TableActions from '@/components/table/table-actions'
|
|
6
|
-
import { Tag, TestCase, TestSuite, TestSuiteMetrics } from '@prisma/client'
|
|
7
|
-
import { formatDateTime } from '@/lib/utils'
|
|
8
|
-
import { Checkbox } from '@/components/ui/checkbox'
|
|
9
|
-
import { deleteTestSuiteAction } from '@/actions/test-suite/test-suite-actions'
|
|
10
|
-
|
|
11
|
-
export const testSuitesMetricTableCols: ColumnDef<
|
|
12
|
-
[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
import { DataTableColumnHeader } from '@/components/ui/data-table-column-header'
|
|
4
|
+
import { ColumnDef } from '@tanstack/react-table'
|
|
5
|
+
import TableActions from '@/components/table/table-actions'
|
|
6
|
+
import { Tag, TestCase, TestSuite, TestSuiteMetrics } from '@prisma/client'
|
|
7
|
+
import { formatDateTime } from '@/lib/utils'
|
|
8
|
+
import { Checkbox } from '@/components/ui/checkbox'
|
|
9
|
+
import { deleteTestSuiteAction } from '@/actions/test-suite/test-suite-actions'
|
|
10
|
+
|
|
11
|
+
export const testSuitesMetricTableCols: ColumnDef<
|
|
12
|
+
TestSuiteMetrics & { testSuite: TestSuite & { tags: Tag[]; testCases: TestCase[] } }
|
|
13
|
+
>[] = [
|
|
14
|
+
{
|
|
15
|
+
id: 'select',
|
|
16
|
+
header: ({ table }) => (
|
|
17
|
+
<Checkbox
|
|
18
|
+
checked={table.getIsAllPageRowsSelected() || (table.getIsSomePageRowsSelected() && 'indeterminate')}
|
|
19
|
+
onCheckedChange={value => table.toggleAllPageRowsSelected(!!value)}
|
|
20
|
+
aria-label="Select all"
|
|
21
|
+
className="mr-2"
|
|
22
|
+
/>
|
|
23
|
+
),
|
|
24
|
+
cell: ({ row }) => (
|
|
25
|
+
<Checkbox
|
|
26
|
+
checked={row.getIsSelected()}
|
|
27
|
+
onCheckedChange={value => row.toggleSelected(!!value)}
|
|
28
|
+
aria-label="Select row"
|
|
29
|
+
className="mr-2"
|
|
30
|
+
/>
|
|
31
|
+
),
|
|
32
|
+
enableSorting: false,
|
|
33
|
+
enableHiding: false,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 'testSuite.name',
|
|
37
|
+
accessorKey: 'testSuite.name',
|
|
38
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Test Suite Name" />,
|
|
39
|
+
cell: ({ row }) => {
|
|
40
|
+
const testSuite = row.original.testSuite
|
|
41
|
+
return <div>{testSuite.name}</div>
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
accessorKey: 'testSuite.description',
|
|
46
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Test Suite Description" />,
|
|
47
|
+
cell: ({ row }) => {
|
|
48
|
+
const testSuite = row.original.testSuite
|
|
49
|
+
return <div>{testSuite.description}</div>
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
accessorKey: 'testSuite.testCases.length',
|
|
54
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Total Test Cases" />,
|
|
55
|
+
cell: ({ row }) => {
|
|
56
|
+
const testSuite = row.original.testSuite
|
|
57
|
+
return <div>{testSuite.testCases.length}</div>
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
accessorKey: 'lastExecutedAt',
|
|
62
|
+
header: ({ column }) => <DataTableColumnHeader column={column} title="Last Executed At" />,
|
|
63
|
+
cell: ({ row }) => {
|
|
64
|
+
const testSuiteMetrics = row.original
|
|
65
|
+
return <div>{formatDateTime(testSuiteMetrics.lastExecutedAt)}</div>
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: 'actions',
|
|
70
|
+
cell: ({ row }) => {
|
|
71
|
+
const testSuite = row.original.testSuite
|
|
72
|
+
return (
|
|
73
|
+
<TableActions
|
|
74
|
+
modifyLink={`/test-suites/modify/${testSuite.id}`}
|
|
75
|
+
deleteHandler={() => deleteTestSuiteAction([testSuite.id])}
|
|
76
|
+
/>
|
|
77
|
+
)
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
]
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import { deleteTestSuiteAction } from '@/actions/test-suite/test-suite-actions'
|
|
2
|
-
import { DataTable } from '@/components/ui/data-table'
|
|
3
|
-
import { TestCase, Tag, TestSuiteMetrics, TestSuite } from '@prisma/client'
|
|
4
|
-
import { getAllTestSuiteMetricsAction } from '@/actions/reports/report-actions'
|
|
5
|
-
import { testSuitesMetricTableCols } from './test-suites-metric-table-columns'
|
|
6
|
-
|
|
7
|
-
const TestSuitesMetricTable = async ({ filter }: { filter: 'notExecutedRecently' }) => {
|
|
8
|
-
const { data: testSuiteMetrics, error: testSuiteMetricsError } = await getAllTestSuiteMetricsAction(filter)
|
|
9
|
-
|
|
10
|
-
if (testSuiteMetricsError) {
|
|
11
|
-
return <div>Error: {testSuiteMetricsError}</div>
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<>
|
|
16
|
-
<DataTable
|
|
17
|
-
columns={testSuitesMetricTableCols}
|
|
18
|
-
data={
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
import { deleteTestSuiteAction } from '@/actions/test-suite/test-suite-actions'
|
|
2
|
+
import { DataTable } from '@/components/ui/data-table'
|
|
3
|
+
import { TestCase, Tag, TestSuiteMetrics, TestSuite } from '@prisma/client'
|
|
4
|
+
import { getAllTestSuiteMetricsAction } from '@/actions/reports/report-actions'
|
|
5
|
+
import { testSuitesMetricTableCols } from './test-suites-metric-table-columns'
|
|
6
|
+
|
|
7
|
+
const TestSuitesMetricTable = async ({ filter }: { filter: 'notExecutedRecently' }) => {
|
|
8
|
+
const { data: testSuiteMetrics, error: testSuiteMetricsError } = await getAllTestSuiteMetricsAction(filter)
|
|
9
|
+
|
|
10
|
+
if (testSuiteMetricsError) {
|
|
11
|
+
return <div>Error: {testSuiteMetricsError}</div>
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
<DataTable
|
|
17
|
+
columns={testSuitesMetricTableCols}
|
|
18
|
+
data={
|
|
19
|
+
testSuiteMetrics as (TestSuiteMetrics & { testSuite: TestSuite & { tags: Tag[]; testCases: TestCase[] } })[]
|
|
20
|
+
}
|
|
21
|
+
filterColumn="testSuite.name"
|
|
22
|
+
filterPlaceholder="Filter by name..."
|
|
23
|
+
deleteAction={deleteTestSuiteAction}
|
|
24
|
+
/>
|
|
25
|
+
</>
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export default TestSuitesMetricTable
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { describe, expect, it } from 'vitest'
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
formatExecutionSummary,
|
|
7
|
-
formatFailureSummary,
|
|
8
|
-
formatExecutionOrder,
|
|
9
|
-
} from './settings-sync-panel-helpers'
|
|
5
|
+
import { formatExecutionSummary, formatFailureSummary, formatExecutionOrder } from './settings-sync-panel-helpers'
|
|
10
6
|
|
|
11
7
|
describe('settings-sync-panel helpers', () => {
|
|
12
8
|
it('formats the sync-all execution summary', () => {
|
|
@@ -35,6 +31,8 @@ describe('settings-sync-panel helpers', () => {
|
|
|
35
31
|
})
|
|
36
32
|
|
|
37
33
|
it('formats the requested execution order labels', () => {
|
|
38
|
-
expect(formatExecutionOrder('sync-test-cases')).toBe(
|
|
34
|
+
expect(formatExecutionOrder('sync-test-cases')).toBe(
|
|
35
|
+
'Modules -> Tags -> Test Suites -> Template Step Groups -> Template Steps -> Test Cases',
|
|
36
|
+
)
|
|
39
37
|
})
|
|
40
38
|
})
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
RefreshCw,
|
|
5
|
-
} from 'lucide-react'
|
|
3
|
+
import { RefreshCw } from 'lucide-react'
|
|
6
4
|
import { AppDrawerItemColor } from '@/app/(dashboard-components)/app-drawer'
|
|
7
5
|
import { Button } from '@/components/ui/button'
|
|
8
6
|
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
|
@@ -14,11 +12,7 @@ import {
|
|
|
14
12
|
syncScriptDefinitions,
|
|
15
13
|
} from '@/lib/sync/sync-registry'
|
|
16
14
|
import type { SyncPendingCounts } from '@/lib/sync/sync-pending-counts'
|
|
17
|
-
import {
|
|
18
|
-
getSyncTooltipCopy,
|
|
19
|
-
syncPanelInfo,
|
|
20
|
-
syncPresentation,
|
|
21
|
-
} from './settings-sync-panel-helpers'
|
|
15
|
+
import { getSyncTooltipCopy, syncPanelInfo, syncPresentation } from './settings-sync-panel-helpers'
|
|
22
16
|
import { useSettingsSync } from './use-settings-sync'
|
|
23
17
|
|
|
24
18
|
function SyncRow({
|
|
@@ -66,16 +60,22 @@ function SyncRow({
|
|
|
66
60
|
</TooltipTrigger>
|
|
67
61
|
<TooltipContent className="max-w-xs">
|
|
68
62
|
<p>{definition.description}</p>
|
|
69
|
-
<p className="
|
|
63
|
+
<p className="text-primary-foreground/80 mt-1">{getSyncTooltipCopy(definition.id)}</p>
|
|
70
64
|
</TooltipContent>
|
|
71
65
|
</Tooltip>
|
|
72
66
|
)
|
|
73
67
|
}
|
|
74
68
|
|
|
75
69
|
export function SettingsSyncPanel({ pendingCounts }: { pendingCounts: SyncPendingCounts }) {
|
|
76
|
-
const {
|
|
70
|
+
const {
|
|
71
|
+
activeRequestId,
|
|
72
|
+
isRunning,
|
|
73
|
+
pendingCounts: currentPendingCounts,
|
|
74
|
+
runSync,
|
|
75
|
+
} = useSettingsSync({
|
|
77
76
|
initialPendingCounts: pendingCounts,
|
|
78
77
|
})
|
|
78
|
+
const syncAllColor = AppDrawerItemColor.emerald
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
<TooltipProvider>
|
|
@@ -85,13 +85,9 @@ export function SettingsSyncPanel({ pendingCounts }: { pendingCounts: SyncPendin
|
|
|
85
85
|
<CardTitle className="text-primary">Sync</CardTitle>
|
|
86
86
|
<Tooltip>
|
|
87
87
|
<TooltipTrigger asChild>
|
|
88
|
-
<span className="cursor-help text-muted-foreground">
|
|
89
|
-
{syncPanelInfo.helpIcon}
|
|
90
|
-
</span>
|
|
88
|
+
<span className="cursor-help text-muted-foreground">{syncPanelInfo.helpIcon}</span>
|
|
91
89
|
</TooltipTrigger>
|
|
92
|
-
<TooltipContent className="max-w-xs">
|
|
93
|
-
Runs all sync targets with prerequisites.
|
|
94
|
-
</TooltipContent>
|
|
90
|
+
<TooltipContent className="max-w-xs">Runs all sync targets with prerequisites.</TooltipContent>
|
|
95
91
|
</Tooltip>
|
|
96
92
|
</div>
|
|
97
93
|
</CardHeader>
|
|
@@ -99,27 +95,30 @@ export function SettingsSyncPanel({ pendingCounts }: { pendingCounts: SyncPendin
|
|
|
99
95
|
<Tooltip>
|
|
100
96
|
<TooltipTrigger asChild>
|
|
101
97
|
<Button
|
|
98
|
+
variant="outline"
|
|
102
99
|
disabled={isRunning}
|
|
103
100
|
aria-label="Sync All"
|
|
104
101
|
onClick={() => runSync(SYNC_ALL_REQUEST_ID)}
|
|
105
|
-
className=
|
|
102
|
+
className={`inline-flex h-24 w-44 flex-none flex-col items-start justify-start whitespace-normal rounded-2xl border-none px-3 py-2.5 text-left hover:text-foreground ${syncAllColor.buttonColor}`}
|
|
106
103
|
>
|
|
107
104
|
<div className="flex w-full items-center justify-between gap-3">
|
|
108
|
-
<div className=
|
|
105
|
+
<div className={`${syncAllColor.iconColor} shrink-0 [&_svg]:!h-5 [&_svg]:!w-5`}>
|
|
109
106
|
{activeRequestId === SYNC_ALL_REQUEST_ID ? <RefreshCw className="animate-spin" /> : <RefreshCw />}
|
|
110
107
|
</div>
|
|
111
108
|
{currentPendingCounts[SYNC_ALL_REQUEST_ID] > 0 ? (
|
|
112
|
-
<div
|
|
109
|
+
<div
|
|
110
|
+
className={`flex min-w-7 shrink-0 items-center justify-center rounded-full px-2 py-1 text-[10px] font-semibold ${syncAllColor.badgeColor}`}
|
|
111
|
+
>
|
|
113
112
|
{currentPendingCounts[SYNC_ALL_REQUEST_ID]}
|
|
114
113
|
</div>
|
|
115
114
|
) : null}
|
|
116
115
|
</div>
|
|
117
|
-
<
|
|
116
|
+
<div className="mt-3 min-w-0">
|
|
117
|
+
<p className="break-words text-xs font-medium leading-4 text-foreground">Sync All</p>
|
|
118
|
+
</div>
|
|
118
119
|
</Button>
|
|
119
120
|
</TooltipTrigger>
|
|
120
|
-
<TooltipContent className="max-w-xs">
|
|
121
|
-
{getSyncTooltipCopy(SYNC_ALL_REQUEST_ID)}
|
|
122
|
-
</TooltipContent>
|
|
121
|
+
<TooltipContent className="max-w-xs">{getSyncTooltipCopy(SYNC_ALL_REQUEST_ID)}</TooltipContent>
|
|
123
122
|
</Tooltip>
|
|
124
123
|
<div className="flex flex-wrap items-start gap-4">
|
|
125
124
|
{syncScriptDefinitions.map(definition => (
|