@solidxai/core 0.1.2 → 0.1.5-beta.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/.claude/settings.local.json +8 -0
- package/dist/commands/run-tests.command.d.ts +37 -0
- package/dist/commands/run-tests.command.d.ts.map +1 -0
- package/dist/commands/run-tests.command.js +345 -0
- package/dist/commands/run-tests.command.js.map +1 -0
- package/dist/commands/test-data.command.d.ts +6 -6
- package/dist/commands/test-data.command.d.ts.map +1 -1
- package/dist/commands/test-data.command.js +25 -25
- package/dist/commands/test-data.command.js.map +1 -1
- package/dist/commands/test.command.d.ts +5 -0
- package/dist/commands/test.command.d.ts.map +1 -0
- package/dist/commands/test.command.js +26 -0
- package/dist/commands/test.command.js.map +1 -0
- package/dist/constants/error-messages.d.ts +1 -0
- package/dist/constants/error-messages.d.ts.map +1 -1
- package/dist/constants/error-messages.js +1 -0
- package/dist/constants/error-messages.js.map +1 -1
- package/dist/constants.d.ts +3 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +12 -12
- package/dist/constants.js.map +1 -1
- package/dist/controllers/otp-authentication.controller.d.ts +1 -4
- package/dist/controllers/otp-authentication.controller.d.ts.map +1 -1
- package/dist/controllers/otp-authentication.controller.js +1 -1
- package/dist/controllers/role-metadata.controller.d.ts +1 -0
- package/dist/controllers/role-metadata.controller.d.ts.map +1 -1
- package/dist/controllers/role-metadata.controller.js +15 -0
- package/dist/controllers/role-metadata.controller.js.map +1 -1
- package/dist/controllers/service.controller.d.ts +0 -9
- package/dist/controllers/service.controller.d.ts.map +1 -1
- package/dist/controllers/service.controller.js +0 -45
- package/dist/controllers/service.controller.js.map +1 -1
- package/dist/dtos/basic-filters.dto.d.ts.map +1 -1
- package/dist/dtos/basic-filters.dto.js.map +1 -1
- package/dist/dtos/create-email-template.dto.d.ts.map +1 -1
- package/dist/dtos/create-email-template.dto.js.map +1 -1
- package/dist/dtos/create-list-of-values.dto.d.ts.map +1 -1
- package/dist/dtos/create-list-of-values.dto.js.map +1 -1
- package/dist/dtos/create-menu-item-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/create-menu-item-metadata.dto.js.map +1 -1
- package/dist/dtos/create-role-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/create-role-metadata.dto.js.map +1 -1
- package/dist/dtos/create-scheduled-job.dto.d.ts.map +1 -1
- package/dist/dtos/create-scheduled-job.dto.js.map +1 -1
- package/dist/dtos/create-security-rule.dto.d.ts.map +1 -1
- package/dist/dtos/create-security-rule.dto.js.map +1 -1
- package/dist/dtos/create-sms-template.dto.d.ts.map +1 -1
- package/dist/dtos/create-sms-template.dto.js.map +1 -1
- package/dist/dtos/create-user.dto.d.ts +1 -0
- package/dist/dtos/create-user.dto.d.ts.map +1 -1
- package/dist/dtos/create-user.dto.js +2 -1
- package/dist/dtos/create-user.dto.js.map +1 -1
- package/dist/dtos/create-view-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/create-view-metadata.dto.js.map +1 -1
- package/dist/dtos/otp-sign-in.dto.d.ts +1 -1
- package/dist/dtos/otp-sign-in.dto.d.ts.map +1 -1
- package/dist/dtos/otp-sign-in.dto.js +2 -2
- package/dist/dtos/otp-sign-in.dto.js.map +1 -1
- package/dist/dtos/otp-sign-up.dto.d.ts +2 -2
- package/dist/dtos/otp-sign-up.dto.d.ts.map +1 -1
- package/dist/dtos/otp-sign-up.dto.js +2 -2
- package/dist/dtos/otp-sign-up.dto.js.map +1 -1
- package/dist/dtos/resolve-s3-url.dto.d.ts +2 -5
- package/dist/dtos/resolve-s3-url.dto.d.ts.map +1 -1
- package/dist/dtos/resolve-s3-url.dto.js +1 -13
- package/dist/dtos/resolve-s3-url.dto.js.map +1 -1
- package/dist/dtos/sign-up.dto.d.ts.map +1 -1
- package/dist/dtos/sign-up.dto.js.map +1 -1
- package/dist/dtos/update-email-template.dto.d.ts.map +1 -1
- package/dist/dtos/update-email-template.dto.js.map +1 -1
- package/dist/dtos/update-list-of-values.dto.d.ts.map +1 -1
- package/dist/dtos/update-list-of-values.dto.js.map +1 -1
- package/dist/dtos/update-menu-item-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/update-menu-item-metadata.dto.js.map +1 -1
- package/dist/dtos/update-scheduled-job.dto.d.ts.map +1 -1
- package/dist/dtos/update-scheduled-job.dto.js.map +1 -1
- package/dist/dtos/update-security-rule.dto.d.ts.map +1 -1
- package/dist/dtos/update-security-rule.dto.js.map +1 -1
- package/dist/dtos/update-sms-template.dto.d.ts.map +1 -1
- package/dist/dtos/update-sms-template.dto.js.map +1 -1
- package/dist/dtos/update-view-metadata.dto.d.ts.map +1 -1
- package/dist/dtos/update-view-metadata.dto.js.map +1 -1
- package/dist/entities/user.entity.d.ts +1 -0
- package/dist/entities/user.entity.d.ts.map +1 -1
- package/dist/entities/user.entity.js +6 -1
- package/dist/entities/user.entity.js.map +1 -1
- package/dist/helpers/field-crud-managers/ManyToManyRelationFieldCrudManager.d.ts +2 -0
- package/dist/helpers/field-crud-managers/ManyToManyRelationFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/ManyToManyRelationFieldCrudManager.js +33 -23
- package/dist/helpers/field-crud-managers/ManyToManyRelationFieldCrudManager.js.map +1 -1
- package/dist/helpers/field-crud-managers/OneToManyRelationFieldCrudManager.d.ts +3 -0
- package/dist/helpers/field-crud-managers/OneToManyRelationFieldCrudManager.d.ts.map +1 -1
- package/dist/helpers/field-crud-managers/OneToManyRelationFieldCrudManager.js +36 -23
- package/dist/helpers/field-crud-managers/OneToManyRelationFieldCrudManager.js.map +1 -1
- package/dist/helpers/security.helper.js +1 -0
- package/dist/helpers/security.helper.js.map +1 -1
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/repository/solid-base.repository.d.ts +10 -1
- package/dist/repository/solid-base.repository.d.ts.map +1 -1
- package/dist/repository/solid-base.repository.js +109 -0
- package/dist/repository/solid-base.repository.js.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.d.ts +2 -0
- package/dist/seeders/module-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/module-metadata-seeder.service.js +142 -91
- package/dist/seeders/module-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/module-test-data.service.d.ts.map +1 -1
- package/dist/seeders/module-test-data.service.js +3 -3
- package/dist/seeders/module-test-data.service.js.map +1 -1
- package/dist/seeders/permission-metadata-seeder.service.d.ts +1 -1
- package/dist/seeders/permission-metadata-seeder.service.d.ts.map +1 -1
- package/dist/seeders/permission-metadata-seeder.service.js +1 -1
- package/dist/seeders/permission-metadata-seeder.service.js.map +1 -1
- package/dist/seeders/seed-data/solid-core-metadata.json +12 -25
- package/dist/services/authentication.service.d.ts +22 -8
- package/dist/services/authentication.service.d.ts.map +1 -1
- package/dist/services/authentication.service.js +228 -214
- package/dist/services/authentication.service.js.map +1 -1
- package/dist/services/chatter-message.service.d.ts +2 -0
- package/dist/services/chatter-message.service.d.ts.map +1 -1
- package/dist/services/chatter-message.service.js +18 -2
- package/dist/services/chatter-message.service.js.map +1 -1
- package/dist/services/crud-helper.service.d.ts +4 -0
- package/dist/services/crud-helper.service.d.ts.map +1 -1
- package/dist/services/crud-helper.service.js +66 -32
- package/dist/services/crud-helper.service.js.map +1 -1
- package/dist/services/crud.service.d.ts.map +1 -1
- package/dist/services/crud.service.js +7 -4
- package/dist/services/crud.service.js.map +1 -1
- package/dist/services/field-metadata.service.d.ts.map +1 -1
- package/dist/services/field-metadata.service.js.map +1 -1
- package/dist/services/file/disk-file.service.d.ts +0 -2
- package/dist/services/file/disk-file.service.d.ts.map +1 -1
- package/dist/services/file/disk-file.service.js +7 -16
- package/dist/services/file/disk-file.service.js.map +1 -1
- package/dist/services/file/index.d.ts +1 -0
- package/dist/services/file/index.d.ts.map +1 -1
- package/dist/services/file/index.js +1 -0
- package/dist/services/file/index.js.map +1 -1
- package/dist/services/file/storage-path-builder.d.ts +17 -0
- package/dist/services/file/storage-path-builder.d.ts.map +1 -0
- package/dist/{seeders/sms-template-seeder.service.js → services/file/storage-path-builder.js} +45 -35
- package/dist/services/file/storage-path-builder.js.map +1 -0
- package/dist/services/media.service.d.ts +1 -1
- package/dist/services/media.service.d.ts.map +1 -1
- package/dist/services/media.service.js +45 -6
- package/dist/services/media.service.js.map +1 -1
- package/dist/services/mediaStorageProviders/file-s3-storage-provider.js.map +1 -1
- package/dist/services/mediaStorageProviders/file-storage-provider.d.ts.map +1 -1
- package/dist/services/mediaStorageProviders/file-storage-provider.js +46 -7
- package/dist/services/mediaStorageProviders/file-storage-provider.js.map +1 -1
- package/dist/services/module-metadata.service.d.ts +4 -6
- package/dist/services/module-metadata.service.d.ts.map +1 -1
- package/dist/services/module-metadata.service.js +16 -14
- package/dist/services/module-metadata.service.js.map +1 -1
- package/dist/services/queues/common.d.ts +3 -0
- package/dist/services/queues/common.d.ts.map +1 -0
- package/dist/services/queues/common.js +39 -0
- package/dist/services/queues/common.js.map +1 -0
- package/dist/services/queues/database-publisher.service.d.ts.map +1 -1
- package/dist/services/queues/database-publisher.service.js +3 -1
- package/dist/services/queues/database-publisher.service.js.map +1 -1
- package/dist/services/queues/database-subscriber.service.d.ts.map +1 -1
- package/dist/services/queues/database-subscriber.service.js +5 -2
- package/dist/services/queues/database-subscriber.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-publisher.service.d.ts.map +1 -1
- package/dist/services/queues/rabbitmq-publisher.service.js +13 -6
- package/dist/services/queues/rabbitmq-publisher.service.js.map +1 -1
- package/dist/services/queues/rabbitmq-subscriber.service.d.ts.map +1 -1
- package/dist/services/queues/rabbitmq-subscriber.service.js +9 -5
- package/dist/services/queues/rabbitmq-subscriber.service.js.map +1 -1
- package/dist/services/setting.service.d.ts +3 -2
- package/dist/services/setting.service.d.ts.map +1 -1
- package/dist/services/setting.service.js +7 -4
- package/dist/services/setting.service.js.map +1 -1
- package/dist/services/settings/default-settings-provider.service.d.ts +24 -2
- package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
- package/dist/services/settings/default-settings-provider.service.js +8 -6
- package/dist/services/settings/default-settings-provider.service.js.map +1 -1
- package/dist/solid-core.module.d.ts +3 -1
- package/dist/solid-core.module.d.ts.map +1 -1
- package/dist/solid-core.module.js +49 -9
- package/dist/solid-core.module.js.map +1 -1
- package/dist/testing/__examples__/register-example-specs.d.ts +3 -0
- package/dist/testing/__examples__/register-example-specs.d.ts.map +1 -0
- package/dist/testing/__examples__/register-example-specs.js +8 -0
- package/dist/testing/__examples__/register-example-specs.js.map +1 -0
- package/dist/testing/__examples__/specs/custom-health.spec.d.ts +17 -0
- package/dist/testing/__examples__/specs/custom-health.spec.d.ts.map +1 -0
- package/dist/testing/__examples__/specs/custom-health.spec.js +30 -0
- package/dist/testing/__examples__/specs/custom-health.spec.js.map +1 -0
- package/dist/testing/adapters/api/api-adapter.d.ts +9 -0
- package/dist/testing/adapters/api/api-adapter.d.ts.map +1 -0
- package/dist/testing/adapters/api/api-adapter.js +76 -0
- package/dist/testing/adapters/api/api-adapter.js.map +1 -0
- package/dist/testing/adapters/api/api.types.d.ts +14 -0
- package/dist/testing/adapters/api/api.types.d.ts.map +1 -0
- package/dist/testing/adapters/api/api.types.js +3 -0
- package/dist/testing/adapters/api/api.types.js.map +1 -0
- package/dist/testing/adapters/ui/playwright-adapter.d.ts +14 -0
- package/dist/testing/adapters/ui/playwright-adapter.d.ts.map +1 -0
- package/dist/testing/adapters/ui/playwright-adapter.js +80 -0
- package/dist/testing/adapters/ui/playwright-adapter.js.map +1 -0
- package/dist/testing/adapters/ui/ui.types.d.ts +5 -0
- package/dist/testing/adapters/ui/ui.types.d.ts.map +1 -0
- package/dist/testing/adapters/ui/ui.types.js +3 -0
- package/dist/testing/adapters/ui/ui.types.js.map +1 -0
- package/dist/testing/contracts/runtime-context.types.d.ts +35 -0
- package/dist/testing/contracts/runtime-context.types.d.ts.map +1 -0
- package/dist/testing/contracts/runtime-context.types.js +3 -0
- package/dist/testing/contracts/runtime-context.types.js.map +1 -0
- package/dist/testing/contracts/test-spec.types.d.ts +21 -0
- package/dist/testing/contracts/test-spec.types.d.ts.map +1 -0
- package/dist/testing/contracts/test-spec.types.js +3 -0
- package/dist/testing/contracts/test-spec.types.js.map +1 -0
- package/dist/testing/contracts/testing-metadata.types.d.ts +41 -0
- package/dist/testing/contracts/testing-metadata.types.d.ts.map +1 -0
- package/dist/testing/contracts/testing-metadata.types.js +3 -0
- package/dist/testing/contracts/testing-metadata.types.js.map +1 -0
- package/dist/testing/core/interpolation.d.ts +4 -0
- package/dist/testing/core/interpolation.d.ts.map +1 -0
- package/dist/testing/core/interpolation.js +180 -0
- package/dist/testing/core/interpolation.js.map +1 -0
- package/dist/testing/core/normalize-steps.d.ts +7 -0
- package/dist/testing/core/normalize-steps.d.ts.map +1 -0
- package/dist/testing/core/normalize-steps.js +20 -0
- package/dist/testing/core/normalize-steps.js.map +1 -0
- package/dist/testing/core/resource-store.d.ts +8 -0
- package/dist/testing/core/resource-store.d.ts.map +1 -0
- package/dist/testing/core/resource-store.js +41 -0
- package/dist/testing/core/resource-store.js.map +1 -0
- package/dist/testing/core/spec-registry.d.ts +10 -0
- package/dist/testing/core/spec-registry.d.ts.map +1 -0
- package/dist/testing/core/spec-registry.js +32 -0
- package/dist/testing/core/spec-registry.js.map +1 -0
- package/dist/testing/core/step-registry.d.ts +10 -0
- package/dist/testing/core/step-registry.d.ts.map +1 -0
- package/dist/testing/core/step-registry.js +26 -0
- package/dist/testing/core/step-registry.js.map +1 -0
- package/dist/testing/core/testing-engine.d.ts +14 -0
- package/dist/testing/core/testing-engine.d.ts.map +1 -0
- package/dist/testing/core/testing-engine.js +97 -0
- package/dist/testing/core/testing-engine.js.map +1 -0
- package/dist/testing/core/timeout.d.ts +2 -0
- package/dist/testing/core/timeout.d.ts.map +1 -0
- package/dist/testing/core/timeout.js +18 -0
- package/dist/testing/core/timeout.js.map +1 -0
- package/dist/testing/reporter/attachments.d.ts +4 -0
- package/dist/testing/reporter/attachments.d.ts.map +1 -0
- package/dist/testing/reporter/attachments.js +25 -0
- package/dist/testing/reporter/attachments.js.map +1 -0
- package/dist/testing/reporter/console-reporter.d.ts +45 -0
- package/dist/testing/reporter/console-reporter.d.ts.map +1 -0
- package/dist/testing/reporter/console-reporter.js +189 -0
- package/dist/testing/reporter/console-reporter.js.map +1 -0
- package/dist/testing/reporter/reporter.types.d.ts +37 -0
- package/dist/testing/reporter/reporter.types.d.ts.map +1 -0
- package/dist/testing/reporter/reporter.types.js +3 -0
- package/dist/testing/reporter/reporter.types.js.map +1 -0
- package/dist/testing/runner/lifecycle.d.ts +9 -0
- package/dist/testing/runner/lifecycle.d.ts.map +1 -0
- package/dist/testing/runner/lifecycle.js +33 -0
- package/dist/testing/runner/lifecycle.js.map +1 -0
- package/dist/testing/runner/run-from-metadata.d.ts +24 -0
- package/dist/testing/runner/run-from-metadata.d.ts.map +1 -0
- package/dist/testing/runner/run-from-metadata.js +70 -0
- package/dist/testing/runner/run-from-metadata.js.map +1 -0
- package/dist/testing/runner/scenario-filter.d.ts +9 -0
- package/dist/testing/runner/scenario-filter.d.ts.map +1 -0
- package/dist/testing/runner/scenario-filter.js +22 -0
- package/dist/testing/runner/scenario-filter.js.map +1 -0
- package/dist/testing/steps/api/auth.step.d.ts +3 -0
- package/dist/testing/steps/api/auth.step.d.ts.map +1 -0
- package/dist/testing/steps/api/auth.step.js +38 -0
- package/dist/testing/steps/api/auth.step.js.map +1 -0
- package/dist/testing/steps/api/index.d.ts +3 -0
- package/dist/testing/steps/api/index.d.ts.map +1 -0
- package/dist/testing/steps/api/index.js +10 -0
- package/dist/testing/steps/api/index.js.map +1 -0
- package/dist/testing/steps/api/request.step.d.ts +3 -0
- package/dist/testing/steps/api/request.step.d.ts.map +1 -0
- package/dist/testing/steps/api/request.step.js +281 -0
- package/dist/testing/steps/api/request.step.js.map +1 -0
- package/dist/testing/steps/assert/http.step.d.ts +3 -0
- package/dist/testing/steps/assert/http.step.d.ts.map +1 -0
- package/dist/testing/steps/assert/http.step.js +27 -0
- package/dist/testing/steps/assert/http.step.js.map +1 -0
- package/dist/testing/steps/assert/index.d.ts +3 -0
- package/dist/testing/steps/assert/index.d.ts.map +1 -0
- package/dist/testing/steps/assert/index.js +12 -0
- package/dist/testing/steps/assert/index.js.map +1 -0
- package/dist/testing/steps/assert/jsonpath.step.d.ts +3 -0
- package/dist/testing/steps/assert/jsonpath.step.d.ts.map +1 -0
- package/dist/testing/steps/assert/jsonpath.step.js +40 -0
- package/dist/testing/steps/assert/jsonpath.step.js.map +1 -0
- package/dist/testing/steps/assert/primitives.step.d.ts +3 -0
- package/dist/testing/steps/assert/primitives.step.d.ts.map +1 -0
- package/dist/testing/steps/assert/primitives.step.js +43 -0
- package/dist/testing/steps/assert/primitives.step.js.map +1 -0
- package/dist/testing/steps/test/index.d.ts +3 -0
- package/dist/testing/steps/test/index.d.ts.map +1 -0
- package/dist/testing/steps/test/index.js +8 -0
- package/dist/testing/steps/test/index.js.map +1 -0
- package/dist/testing/steps/test/test-spec.step.d.ts +3 -0
- package/dist/testing/steps/test/test-spec.step.d.ts.map +1 -0
- package/dist/testing/steps/test/test-spec.step.js +41 -0
- package/dist/testing/steps/test/test-spec.step.js.map +1 -0
- package/dist/testing/steps/ui/actions.step.d.ts +3 -0
- package/dist/testing/steps/ui/actions.step.d.ts.map +1 -0
- package/dist/testing/steps/ui/actions.step.js +31 -0
- package/dist/testing/steps/ui/actions.step.js.map +1 -0
- package/dist/testing/steps/ui/assertions.step.d.ts +3 -0
- package/dist/testing/steps/ui/assertions.step.d.ts.map +1 -0
- package/dist/testing/steps/ui/assertions.step.js +41 -0
- package/dist/testing/steps/ui/assertions.step.js.map +1 -0
- package/dist/testing/steps/ui/form.step.d.ts +3 -0
- package/dist/testing/steps/ui/form.step.d.ts.map +1 -0
- package/dist/testing/steps/ui/form.step.js +34 -0
- package/dist/testing/steps/ui/form.step.js.map +1 -0
- package/dist/testing/steps/ui/index.d.ts +3 -0
- package/dist/testing/steps/ui/index.d.ts.map +1 -0
- package/dist/testing/steps/ui/index.js +14 -0
- package/dist/testing/steps/ui/index.js.map +1 -0
- package/dist/testing/steps/ui/navigation.step.d.ts +3 -0
- package/dist/testing/steps/ui/navigation.step.d.ts.map +1 -0
- package/dist/testing/steps/ui/navigation.step.js +39 -0
- package/dist/testing/steps/ui/navigation.step.js.map +1 -0
- package/dist/testing/steps/util/index.d.ts +3 -0
- package/dist/testing/steps/util/index.d.ts.map +1 -0
- package/dist/testing/steps/util/index.js +12 -0
- package/dist/testing/steps/util/index.js.map +1 -0
- package/dist/testing/steps/util/log.step.d.ts +3 -0
- package/dist/testing/steps/util/log.step.d.ts.map +1 -0
- package/dist/testing/steps/util/log.step.js +18 -0
- package/dist/testing/steps/util/log.step.js.map +1 -0
- package/dist/testing/steps/util/require.step.d.ts +3 -0
- package/dist/testing/steps/util/require.step.d.ts.map +1 -0
- package/dist/testing/steps/util/require.step.js +16 -0
- package/dist/testing/steps/util/require.step.js.map +1 -0
- package/dist/testing/steps/util/sleep.step.d.ts +3 -0
- package/dist/testing/steps/util/sleep.step.d.ts.map +1 -0
- package/dist/testing/steps/util/sleep.step.js +13 -0
- package/dist/testing/steps/util/sleep.step.js.map +1 -0
- package/docs/test-data-workflow.md +51 -11
- package/package.json +10 -2
- package/src/commands/run-tests.command.ts +278 -0
- package/src/commands/test-data.command.ts +26 -26
- package/src/commands/test.command.ts +14 -0
- package/src/constants/error-messages.ts +1 -0
- package/src/constants.ts +3 -3
- package/src/controllers/role-metadata.controller.ts +26 -18
- package/src/controllers/service.controller.ts +58 -59
- package/src/dtos/basic-filters.dto.ts +0 -2
- package/src/dtos/create-email-template.dto.ts +7 -0
- package/src/dtos/create-list-of-values.dto.ts +7 -0
- package/src/dtos/create-menu-item-metadata.dto.ts +12 -1
- package/src/dtos/create-role-metadata.dto.ts +9 -0
- package/src/dtos/create-scheduled-job.dto.ts +14 -0
- package/src/dtos/create-security-rule.dto.ts +6 -0
- package/src/dtos/create-sms-template.dto.ts +6 -0
- package/src/dtos/create-user.dto.ts +1 -0
- package/src/dtos/create-view-metadata.dto.ts +11 -0
- package/src/dtos/otp-sign-in.dto.ts +3 -3
- package/src/dtos/otp-sign-up.dto.ts +3 -3
- package/src/dtos/resolve-s3-url.dto.ts +2 -12
- package/src/dtos/sign-up.dto.ts +0 -2
- package/src/dtos/update-email-template.dto.ts +6 -0
- package/src/dtos/update-list-of-values.dto.ts +8 -0
- package/src/dtos/update-menu-item-metadata.dto.ts +12 -0
- package/src/dtos/update-scheduled-job.dto.ts +15 -0
- package/src/dtos/update-security-rule.dto.ts +7 -0
- package/src/dtos/update-sms-template.dto.ts +32 -32
- package/src/dtos/update-view-metadata.dto.ts +12 -0
- package/src/entities/user.entity.ts +3 -0
- package/src/helpers/field-crud-managers/ManyToManyRelationFieldCrudManager.ts +43 -32
- package/src/helpers/field-crud-managers/OneToManyRelationFieldCrudManager.ts +45 -33
- package/src/helpers/security.helper.ts +1 -1
- package/src/index.ts +3 -4
- package/src/repository/solid-base.repository.ts +172 -1
- package/src/seeders/module-metadata-seeder.service.ts +191 -150
- package/src/seeders/module-test-data.service.ts +5 -3
- package/src/seeders/permission-metadata-seeder.service.ts +1 -4
- package/src/seeders/seed-data/solid-core-metadata.json +12 -25
- package/src/services/authentication.service.ts +268 -266
- package/src/services/chatter-message.service.ts +18 -1
- package/src/services/crud-helper.service.ts +79 -36
- package/src/services/crud.service.ts +10 -4
- package/src/services/field-metadata.service.ts +0 -71
- package/src/services/file/disk-file.service.ts +8 -18
- package/src/services/file/index.ts +1 -0
- package/src/services/file/storage-path-builder.ts +56 -0
- package/src/services/media.service.ts +13 -7
- package/src/services/mediaStorageProviders/file-s3-storage-provider.ts +1 -1
- package/src/services/mediaStorageProviders/file-storage-provider.ts +13 -8
- package/src/services/module-metadata.service.ts +18 -15
- package/src/services/queues/common.ts +75 -0
- package/src/services/queues/database-publisher.service.ts +4 -1
- package/src/services/queues/database-subscriber.service.ts +5 -3
- package/src/services/queues/rabbitmq-publisher.service.ts +17 -7
- package/src/services/queues/rabbitmq-subscriber.service.ts +9 -5
- package/src/services/setting.service.ts +5 -3
- package/src/services/settings/default-settings-provider.service.ts +5 -3
- package/src/solid-core.module.ts +20 -12
- package/src/testing/README.md +364 -0
- package/src/testing/__examples__/register-example-specs.ts +6 -0
- package/src/testing/__examples__/specs/custom-health.spec.ts +29 -0
- package/src/testing/__examples__/testing.sample.json +82 -0
- package/src/testing/adapters/api/api-adapter.ts +85 -0
- package/src/testing/adapters/api/api.types.ts +15 -0
- package/src/testing/adapters/ui/playwright-adapter.ts +54 -0
- package/src/testing/adapters/ui/ui.types.ts +4 -0
- package/src/testing/contracts/runtime-context.types.ts +36 -0
- package/src/testing/contracts/test-spec.types.ts +24 -0
- package/src/testing/contracts/testing-metadata.types.ts +46 -0
- package/src/testing/core/interpolation.ts +189 -0
- package/src/testing/core/normalize-steps.ts +21 -0
- package/src/testing/core/resource-store.ts +38 -0
- package/src/testing/core/spec-registry.ts +33 -0
- package/src/testing/core/step-registry.ts +27 -0
- package/src/testing/core/testing-engine.ts +127 -0
- package/src/testing/core/timeout.ts +19 -0
- package/src/testing/reporter/attachments.ts +25 -0
- package/src/testing/reporter/console-reporter.ts +229 -0
- package/src/testing/reporter/reporter.types.ts +36 -0
- package/src/testing/runner/lifecycle.ts +31 -0
- package/src/testing/runner/run-from-metadata.ts +87 -0
- package/src/testing/runner/scenario-filter.ts +33 -0
- package/src/testing/steps/api/auth.step.ts +66 -0
- package/src/testing/steps/api/index.ts +10 -0
- package/src/testing/steps/api/request.step.ts +358 -0
- package/src/testing/steps/assert/http.step.ts +33 -0
- package/src/testing/steps/assert/index.ts +12 -0
- package/src/testing/steps/assert/jsonpath.step.ts +50 -0
- package/src/testing/steps/assert/primitives.step.ts +69 -0
- package/src/testing/steps/test/index.ts +8 -0
- package/src/testing/steps/test/test-spec.step.ts +52 -0
- package/src/testing/steps/ui/actions.step.ts +36 -0
- package/src/testing/steps/ui/assertions.step.ts +54 -0
- package/src/testing/steps/ui/form.step.ts +39 -0
- package/src/testing/steps/ui/index.ts +12 -0
- package/src/testing/steps/ui/navigation.step.ts +53 -0
- package/src/testing/steps/util/index.ts +10 -0
- package/src/testing/steps/util/log.step.ts +19 -0
- package/src/testing/steps/util/require.step.ts +16 -0
- package/src/testing/steps/util/sleep.step.ts +15 -0
- package/tsconfig.json +35 -25
- package/tsconfig.tests.json +14 -0
- package/dist/passport-strategies/local.strategy.d.ts +0 -15
- package/dist/passport-strategies/local.strategy.d.ts.map +0 -1
- package/dist/passport-strategies/local.strategy.js +0 -44
- package/dist/passport-strategies/local.strategy.js.map +0 -1
- package/dist/seeders/email-template-seeder.service.d.ts +0 -10
- package/dist/seeders/email-template-seeder.service.d.ts.map +0 -1
- package/dist/seeders/email-template-seeder.service.js +0 -84
- package/dist/seeders/email-template-seeder.service.js.map +0 -1
- package/dist/seeders/sms-template-seeder.service.d.ts +0 -10
- package/dist/seeders/sms-template-seeder.service.d.ts.map +0 -1
- package/dist/seeders/sms-template-seeder.service.js.map +0 -1
- package/dist/seeders/user-seeder.service.d.ts +0 -10
- package/dist/seeders/user-seeder.service.d.ts.map +0 -1
- package/dist/seeders/user-seeder.service.js +0 -44
- package/dist/seeders/user-seeder.service.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/src/passport-strategies/local.strategy.ts +0 -28
- package/src/seeders/email-template-seeder.service.ts +0 -49
- package/src/seeders/sms-template-seeder.service.ts +0 -50
- package/src/seeders/user-seeder.service.ts +0 -33
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerActionSteps = registerActionSteps;
|
|
4
|
+
function requirePage(ctx, op) {
|
|
5
|
+
if (!ctx.ui || !ctx.ui.page) {
|
|
6
|
+
throw new Error(`Missing UI page on context for op "${op}"`);
|
|
7
|
+
}
|
|
8
|
+
return ctx.ui.page;
|
|
9
|
+
}
|
|
10
|
+
function registerActionSteps(registry) {
|
|
11
|
+
registry.register("ui.click", async (ctx, step) => {
|
|
12
|
+
const page = requirePage(ctx, "ui.click");
|
|
13
|
+
const input = (step.with ?? {});
|
|
14
|
+
if (!input.selector) {
|
|
15
|
+
throw new Error('Missing "selector" in step.with for op "ui.click"');
|
|
16
|
+
}
|
|
17
|
+
await page.click(input.selector);
|
|
18
|
+
});
|
|
19
|
+
registry.register("ui.press", async (ctx, step) => {
|
|
20
|
+
const page = requirePage(ctx, "ui.press");
|
|
21
|
+
const input = (step.with ?? {});
|
|
22
|
+
if (!input.selector) {
|
|
23
|
+
throw new Error('Missing "selector" in step.with for op "ui.press"');
|
|
24
|
+
}
|
|
25
|
+
if (!input.key) {
|
|
26
|
+
throw new Error('Missing "key" in step.with for op "ui.press"');
|
|
27
|
+
}
|
|
28
|
+
await page.press(input.selector, input.key);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=actions.step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.step.js","sourceRoot":"","sources":["../../../../src/testing/steps/ui/actions.step.ts"],"names":[],"mappings":";;AAcA,kDAqBC;AA5BD,SAAS,WAAW,CAAC,GAAgB,EAAE,EAAU;IAC/C,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,sCAAsC,EAAE,GAAG,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,SAAgB,mBAAmB,CAAC,QAAsB;IACxD,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QACrE,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAe,CAAC;QAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACvE,CAAC;QACD,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QACrE,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;QAC1C,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAe,CAAC;QAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACvE,CAAC;QACD,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QACD,MAAM,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { TestContext } from \"../../contracts/runtime-context.types\";\nimport type { OpStep } from \"../../contracts/testing-metadata.types\";\nimport { StepRegistry } from \"../../core/step-registry\";\n\ntype ClickInput = { selector: string };\ntype PressInput = { selector: string; key: string };\n\nfunction requirePage(ctx: TestContext, op: string) {\n if (!ctx.ui || !ctx.ui.page) {\n throw new Error(`Missing UI page on context for op \"${op}\"`);\n }\n return ctx.ui.page;\n}\n\nexport function registerActionSteps(registry: StepRegistry): void {\n registry.register(\"ui.click\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.click\");\n const input = (step.with ?? {}) as ClickInput;\n if (!input.selector) {\n throw new Error('Missing \"selector\" in step.with for op \"ui.click\"');\n }\n await page.click(input.selector);\n });\n\n registry.register(\"ui.press\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.press\");\n const input = (step.with ?? {}) as PressInput;\n if (!input.selector) {\n throw new Error('Missing \"selector\" in step.with for op \"ui.press\"');\n }\n if (!input.key) {\n throw new Error('Missing \"key\" in step.with for op \"ui.press\"');\n }\n await page.press(input.selector, input.key);\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertions.step.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/ui/assertions.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYxD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAuCnE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerAssertionSteps = registerAssertionSteps;
|
|
4
|
+
function requirePage(ctx, op) {
|
|
5
|
+
if (!ctx.ui || !ctx.ui.page) {
|
|
6
|
+
throw new Error(`Missing UI page on context for op "${op}"`);
|
|
7
|
+
}
|
|
8
|
+
return ctx.ui.page;
|
|
9
|
+
}
|
|
10
|
+
function registerAssertionSteps(registry) {
|
|
11
|
+
registry.register("ui.expectVisible", async (ctx, step) => {
|
|
12
|
+
const page = requirePage(ctx, "ui.expectVisible");
|
|
13
|
+
const input = (step.with ?? {});
|
|
14
|
+
if (!input.selector) {
|
|
15
|
+
throw new Error('Missing "selector" in step.with for op "ui.expectVisible"');
|
|
16
|
+
}
|
|
17
|
+
await page.waitForSelector(input.selector, { state: "visible" });
|
|
18
|
+
});
|
|
19
|
+
registry.register("ui.expectText", async (ctx, step) => {
|
|
20
|
+
const page = requirePage(ctx, "ui.expectText");
|
|
21
|
+
const input = (step.with ?? {});
|
|
22
|
+
if (!input.selector) {
|
|
23
|
+
throw new Error('Missing "selector" in step.with for op "ui.expectText"');
|
|
24
|
+
}
|
|
25
|
+
const text = await page.locator(input.selector).innerText();
|
|
26
|
+
if (input.equals !== undefined) {
|
|
27
|
+
if (text !== input.equals) {
|
|
28
|
+
throw new Error(`Expected text to equal "${input.equals}" but got "${text}"`);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (input.contains !== undefined) {
|
|
33
|
+
if (!text.includes(input.contains)) {
|
|
34
|
+
throw new Error(`Expected text to contain "${input.contains}" but got "${text}"`);
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
throw new Error('Missing "equals" or "contains" in step.with for op "ui.expectText"');
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=assertions.step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertions.step.js","sourceRoot":"","sources":["../../../../src/testing/steps/ui/assertions.step.ts"],"names":[],"mappings":";;AAcA,wDAuCC;AA9CD,SAAS,WAAW,CAAC,GAAgB,EAAE,EAAU;IAC/C,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,sCAAsC,EAAE,GAAG,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,SAAgB,sBAAsB,CAAC,QAAsB;IAC3D,QAAQ,CAAC,QAAQ,CAAC,kBAAkB,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QAC7E,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,kBAAkB,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAiB,CAAC;QAChD,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;QAC/E,CAAC;QACD,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IACnE,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,CAAC,eAAe,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QAC1E,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,eAAe,CAAC,CAAC;QAC/C,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAoB,CAAC;QACnD,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,SAAS,EAAE,CAAC;QAC5D,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,IAAI,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC1B,MAAM,IAAI,KAAK,CACb,2BAA2B,KAAK,CAAC,MAAM,cAAc,IAAI,GAAG,CAC7D,CAAC;YACJ,CAAC;YACD,OAAO;QACT,CAAC;QACD,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACnC,MAAM,IAAI,KAAK,CACb,6BAA6B,KAAK,CAAC,QAAQ,cAAc,IAAI,GAAG,CACjE,CAAC;YACJ,CAAC;YACD,OAAO;QACT,CAAC;QAED,MAAM,IAAI,KAAK,CACb,oEAAoE,CACrE,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { TestContext } from \"../../contracts/runtime-context.types\";\nimport type { OpStep } from \"../../contracts/testing-metadata.types\";\nimport { StepRegistry } from \"../../core/step-registry\";\n\ntype VisibleInput = { selector: string };\ntype ExpectTextInput = { selector: string; equals?: string; contains?: string };\n\nfunction requirePage(ctx: TestContext, op: string) {\n if (!ctx.ui || !ctx.ui.page) {\n throw new Error(`Missing UI page on context for op \"${op}\"`);\n }\n return ctx.ui.page;\n}\n\nexport function registerAssertionSteps(registry: StepRegistry): void {\n registry.register(\"ui.expectVisible\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.expectVisible\");\n const input = (step.with ?? {}) as VisibleInput;\n if (!input.selector) {\n throw new Error('Missing \"selector\" in step.with for op \"ui.expectVisible\"');\n }\n await page.waitForSelector(input.selector, { state: \"visible\" });\n });\n\n registry.register(\"ui.expectText\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.expectText\");\n const input = (step.with ?? {}) as ExpectTextInput;\n if (!input.selector) {\n throw new Error('Missing \"selector\" in step.with for op \"ui.expectText\"');\n }\n\n const text = await page.locator(input.selector).innerText();\n if (input.equals !== undefined) {\n if (text !== input.equals) {\n throw new Error(\n `Expected text to equal \"${input.equals}\" but got \"${text}\"`,\n );\n }\n return;\n }\n if (input.contains !== undefined) {\n if (!text.includes(input.contains)) {\n throw new Error(\n `Expected text to contain \"${input.contains}\" but got \"${text}\"`,\n );\n }\n return;\n }\n\n throw new Error(\n 'Missing \"equals\" or \"contains\" in step.with for op \"ui.expectText\"',\n );\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.step.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/ui/form.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYxD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAwB9D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerFormSteps = registerFormSteps;
|
|
4
|
+
function requirePage(ctx, op) {
|
|
5
|
+
if (!ctx.ui || !ctx.ui.page) {
|
|
6
|
+
throw new Error(`Missing UI page on context for op "${op}"`);
|
|
7
|
+
}
|
|
8
|
+
return ctx.ui.page;
|
|
9
|
+
}
|
|
10
|
+
function registerFormSteps(registry) {
|
|
11
|
+
registry.register("ui.fill", async (ctx, step) => {
|
|
12
|
+
const page = requirePage(ctx, "ui.fill");
|
|
13
|
+
const input = (step.with ?? {});
|
|
14
|
+
if (!input.selector) {
|
|
15
|
+
throw new Error('Missing "selector" in step.with for op "ui.fill"');
|
|
16
|
+
}
|
|
17
|
+
if (input.value === undefined) {
|
|
18
|
+
throw new Error('Missing "value" in step.with for op "ui.fill"');
|
|
19
|
+
}
|
|
20
|
+
await page.fill(input.selector, String(input.value));
|
|
21
|
+
});
|
|
22
|
+
registry.register("ui.select", async (ctx, step) => {
|
|
23
|
+
const page = requirePage(ctx, "ui.select");
|
|
24
|
+
const input = (step.with ?? {});
|
|
25
|
+
if (!input.selector) {
|
|
26
|
+
throw new Error('Missing "selector" in step.with for op "ui.select"');
|
|
27
|
+
}
|
|
28
|
+
if (input.value === undefined) {
|
|
29
|
+
throw new Error('Missing "value" in step.with for op "ui.select"');
|
|
30
|
+
}
|
|
31
|
+
await page.selectOption(input.selector, String(input.value));
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=form.step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form.step.js","sourceRoot":"","sources":["../../../../src/testing/steps/ui/form.step.ts"],"names":[],"mappings":";;AAcA,8CAwBC;AA/BD,SAAS,WAAW,CAAC,GAAgB,EAAE,EAAU;IAC/C,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,sCAAsC,EAAE,GAAG,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,SAAgB,iBAAiB,CAAC,QAAsB;IACtD,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QACpE,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAc,CAAC;QAC7C,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACnE,CAAC;QACD,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,CAAC,WAAW,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QACtE,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAgB,CAAC;QAC/C,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QACD,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC/D,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { TestContext } from \"../../contracts/runtime-context.types\";\nimport type { OpStep } from \"../../contracts/testing-metadata.types\";\nimport { StepRegistry } from \"../../core/step-registry\";\n\ntype FillInput = { selector: string; value: string };\ntype SelectInput = { selector: string; value: string };\n\nfunction requirePage(ctx: TestContext, op: string) {\n if (!ctx.ui || !ctx.ui.page) {\n throw new Error(`Missing UI page on context for op \"${op}\"`);\n }\n return ctx.ui.page;\n}\n\nexport function registerFormSteps(registry: StepRegistry): void {\n registry.register(\"ui.fill\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.fill\");\n const input = (step.with ?? {}) as FillInput;\n if (!input.selector) {\n throw new Error('Missing \"selector\" in step.with for op \"ui.fill\"');\n }\n if (input.value === undefined) {\n throw new Error('Missing \"value\" in step.with for op \"ui.fill\"');\n }\n await page.fill(input.selector, String(input.value));\n });\n\n registry.register(\"ui.select\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.select\");\n const input = (step.with ?? {}) as SelectInput;\n if (!input.selector) {\n throw new Error('Missing \"selector\" in step.with for op \"ui.select\"');\n }\n if (input.value === undefined) {\n throw new Error('Missing \"value\" in step.with for op \"ui.select\"');\n }\n await page.selectOption(input.selector, String(input.value));\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAMxD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAK5D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerUiSteps = registerUiSteps;
|
|
4
|
+
const navigation_step_1 = require("./navigation.step");
|
|
5
|
+
const form_step_1 = require("./form.step");
|
|
6
|
+
const actions_step_1 = require("./actions.step");
|
|
7
|
+
const assertions_step_1 = require("./assertions.step");
|
|
8
|
+
function registerUiSteps(registry) {
|
|
9
|
+
(0, navigation_step_1.registerNavigationSteps)(registry);
|
|
10
|
+
(0, form_step_1.registerFormSteps)(registry);
|
|
11
|
+
(0, actions_step_1.registerActionSteps)(registry);
|
|
12
|
+
(0, assertions_step_1.registerAssertionSteps)(registry);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/testing/steps/ui/index.ts"],"names":[],"mappings":";;AAMA,0CAKC;AAVD,uDAA4D;AAC5D,2CAAgD;AAChD,iDAAqD;AACrD,uDAA2D;AAE3D,SAAgB,eAAe,CAAC,QAAsB;IACpD,IAAA,yCAAuB,EAAC,QAAQ,CAAC,CAAC;IAClC,IAAA,6BAAiB,EAAC,QAAQ,CAAC,CAAC;IAC5B,IAAA,kCAAmB,EAAC,QAAQ,CAAC,CAAC;IAC9B,IAAA,wCAAsB,EAAC,QAAQ,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import { StepRegistry } from \"../../core/step-registry\";\nimport { registerNavigationSteps } from \"./navigation.step\";\nimport { registerFormSteps } from \"./form.step\";\nimport { registerActionSteps } from \"./actions.step\";\nimport { registerAssertionSteps } from \"./assertions.step\";\n\nexport function registerUiSteps(registry: StepRegistry): void {\n registerNavigationSteps(registry);\n registerFormSteps(registry);\n registerActionSteps(registry);\n registerAssertionSteps(registry);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.step.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/ui/navigation.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAYxD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAsCpE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerNavigationSteps = registerNavigationSteps;
|
|
4
|
+
function requirePage(ctx, op) {
|
|
5
|
+
if (!ctx.ui || !ctx.ui.page) {
|
|
6
|
+
throw new Error(`Missing UI page on context for op "${op}"`);
|
|
7
|
+
}
|
|
8
|
+
return ctx.ui.page;
|
|
9
|
+
}
|
|
10
|
+
function registerNavigationSteps(registry) {
|
|
11
|
+
registry.register("ui.goto", async (ctx, step) => {
|
|
12
|
+
const page = requirePage(ctx, "ui.goto");
|
|
13
|
+
const input = (step.with ?? {});
|
|
14
|
+
if (!input.url) {
|
|
15
|
+
throw new Error('Missing "url" in step.with for op "ui.goto"');
|
|
16
|
+
}
|
|
17
|
+
const url = ctx.ui?.resolveUrl(input.url) ?? input.url;
|
|
18
|
+
await page.goto(url);
|
|
19
|
+
});
|
|
20
|
+
registry.register("ui.expectUrl", async (ctx, step) => {
|
|
21
|
+
const page = requirePage(ctx, "ui.expectUrl");
|
|
22
|
+
const input = (step.with ?? {});
|
|
23
|
+
const current = page.url();
|
|
24
|
+
if (input.equals !== undefined) {
|
|
25
|
+
if (current !== input.equals) {
|
|
26
|
+
throw new Error(`Expected URL to equal "${input.equals}" but got "${current}"`);
|
|
27
|
+
}
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
if (input.contains !== undefined) {
|
|
31
|
+
if (!current.includes(input.contains)) {
|
|
32
|
+
throw new Error(`Expected URL to contain "${input.contains}" but got "${current}"`);
|
|
33
|
+
}
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
throw new Error('Missing "equals" or "contains" in step.with for op "ui.expectUrl"');
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=navigation.step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.step.js","sourceRoot":"","sources":["../../../../src/testing/steps/ui/navigation.step.ts"],"names":[],"mappings":";;AAcA,0DAsCC;AA7CD,SAAS,WAAW,CAAC,GAAgB,EAAE,EAAU;IAC/C,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,sCAAsC,EAAE,GAAG,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;AACrB,CAAC;AAED,SAAgB,uBAAuB,CAAC,QAAsB;IAC5D,QAAQ,CAAC,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QACpE,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;QACzC,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAc,CAAC;QAC7C,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACjE,CAAC;QACD,MAAM,GAAG,GAAG,GAAG,CAAC,EAAE,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC;QACvD,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QACzE,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAC9C,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAmB,CAAC;QAClD,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE3B,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC/B,IAAI,OAAO,KAAK,KAAK,CAAC,MAAM,EAAE,CAAC;gBAC7B,MAAM,IAAI,KAAK,CACb,0BAA0B,KAAK,CAAC,MAAM,cAAc,OAAO,GAAG,CAC/D,CAAC;YACJ,CAAC;YACD,OAAO;QACT,CAAC;QAED,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;YACjC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;gBACtC,MAAM,IAAI,KAAK,CACb,4BAA4B,KAAK,CAAC,QAAQ,cAAc,OAAO,GAAG,CACnE,CAAC;YACJ,CAAC;YACD,OAAO;QACT,CAAC;QAED,MAAM,IAAI,KAAK,CACb,mEAAmE,CACpE,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { TestContext } from \"../../contracts/runtime-context.types\";\nimport type { OpStep } from \"../../contracts/testing-metadata.types\";\nimport { StepRegistry } from \"../../core/step-registry\";\n\ntype GotoInput = { url: string };\ntype ExpectUrlInput = { equals?: string; contains?: string };\n\nfunction requirePage(ctx: TestContext, op: string) {\n if (!ctx.ui || !ctx.ui.page) {\n throw new Error(`Missing UI page on context for op \"${op}\"`);\n }\n return ctx.ui.page;\n}\n\nexport function registerNavigationSteps(registry: StepRegistry): void {\n registry.register(\"ui.goto\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.goto\");\n const input = (step.with ?? {}) as GotoInput;\n if (!input.url) {\n throw new Error('Missing \"url\" in step.with for op \"ui.goto\"');\n }\n const url = ctx.ui?.resolveUrl(input.url) ?? input.url;\n await page.goto(url);\n });\n\n registry.register(\"ui.expectUrl\", async (ctx: TestContext, step: OpStep) => {\n const page = requirePage(ctx, \"ui.expectUrl\");\n const input = (step.with ?? {}) as ExpectUrlInput;\n const current = page.url();\n\n if (input.equals !== undefined) {\n if (current !== input.equals) {\n throw new Error(\n `Expected URL to equal \"${input.equals}\" but got \"${current}\"`,\n );\n }\n return;\n }\n\n if (input.contains !== undefined) {\n if (!current.includes(input.contains)) {\n throw new Error(\n `Expected URL to contain \"${input.contains}\" but got \"${current}\"`,\n );\n }\n return;\n }\n\n throw new Error(\n 'Missing \"equals\" or \"contains\" in step.with for op \"ui.expectUrl\"',\n );\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKxD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAI9D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerUtilSteps = registerUtilSteps;
|
|
4
|
+
const log_step_1 = require("./log.step");
|
|
5
|
+
const sleep_step_1 = require("./sleep.step");
|
|
6
|
+
const require_step_1 = require("./require.step");
|
|
7
|
+
function registerUtilSteps(registry) {
|
|
8
|
+
(0, log_step_1.registerLogStep)(registry);
|
|
9
|
+
(0, sleep_step_1.registerSleepStep)(registry);
|
|
10
|
+
(0, require_step_1.registerRequireStep)(registry);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/testing/steps/util/index.ts"],"names":[],"mappings":";;AAKA,8CAIC;AARD,yCAA6C;AAC7C,6CAAiD;AACjD,iDAAqD;AAErD,SAAgB,iBAAiB,CAAC,QAAsB;IACtD,IAAA,0BAAe,EAAC,QAAQ,CAAC,CAAC;IAC1B,IAAA,8BAAiB,EAAC,QAAQ,CAAC,CAAC;IAC5B,IAAA,kCAAmB,EAAC,QAAQ,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { StepRegistry } from \"../../core/step-registry\";\nimport { registerLogStep } from \"./log.step\";\nimport { registerSleepStep } from \"./sleep.step\";\nimport { registerRequireStep } from \"./require.step\";\n\nexport function registerUtilSteps(registry: StepRegistry): void {\n registerLogStep(registry);\n registerSleepStep(registry);\n registerRequireStep(registry);\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.step.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/util/log.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIxD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAY5D"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerLogStep = registerLogStep;
|
|
4
|
+
function registerLogStep(registry) {
|
|
5
|
+
registry.register("util.log", async (_ctx, step) => {
|
|
6
|
+
const input = (step.with ?? {});
|
|
7
|
+
if (!input.message) {
|
|
8
|
+
throw new Error('Missing "message" in step.with for op "util.log"');
|
|
9
|
+
}
|
|
10
|
+
if (input.data !== undefined) {
|
|
11
|
+
console.log(input.message, input.data);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
console.log(input.message);
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=log.step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log.step.js","sourceRoot":"","sources":["../../../../src/testing/steps/util/log.step.ts"],"names":[],"mappings":";;AAMA,0CAYC;AAZD,SAAgB,eAAe,CAAC,QAAsB;IACpD,QAAQ,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,EAAE,IAAiB,EAAE,IAAY,EAAE,EAAE;QACtE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAa,CAAC;QAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { TestContext } from \"../../contracts/runtime-context.types\";\nimport type { OpStep } from \"../../contracts/testing-metadata.types\";\nimport { StepRegistry } from \"../../core/step-registry\";\n\ntype LogInput = { message: string; data?: unknown };\n\nexport function registerLogStep(registry: StepRegistry): void {\n registry.register(\"util.log\", async (_ctx: TestContext, step: OpStep) => {\n const input = (step.with ?? {}) as LogInput;\n if (!input.message) {\n throw new Error('Missing \"message\" in step.with for op \"util.log\"');\n }\n if (input.data !== undefined) {\n console.log(input.message, input.data);\n } else {\n console.log(input.message);\n }\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require.step.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/util/require.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAWhE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerRequireStep = registerRequireStep;
|
|
4
|
+
function registerRequireStep(registry) {
|
|
5
|
+
registry.register("util.require", async (ctx, step) => {
|
|
6
|
+
const input = (step.with ?? {});
|
|
7
|
+
if (!input.resource) {
|
|
8
|
+
throw new Error('Missing "resource" in step.with for op "util.require"');
|
|
9
|
+
}
|
|
10
|
+
if (!ctx.resources.has(input.resource)) {
|
|
11
|
+
const suffix = input.message ? ` ${input.message}` : "";
|
|
12
|
+
throw new Error(`Missing required resource: "${input.resource}".${suffix}`);
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=require.step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"require.step.js","sourceRoot":"","sources":["../../../../src/testing/steps/util/require.step.ts"],"names":[],"mappings":";;AAIA,kDAWC;AAXD,SAAgB,mBAAmB,CAAC,QAAsB;IACxD,QAAQ,CAAC,QAAQ,CAAC,cAAc,EAAE,KAAK,EAAE,GAAgB,EAAE,IAAY,EAAE,EAAE;QACzE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAA4C,CAAC;QAC3E,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CAAC,+BAA+B,KAAK,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;QAC9E,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { TestContext } from \"../../contracts/runtime-context.types\";\nimport type { OpStep } from \"../../contracts/testing-metadata.types\";\nimport { StepRegistry } from \"../../core/step-registry\";\n\nexport function registerRequireStep(registry: StepRegistry): void {\n registry.register(\"util.require\", async (ctx: TestContext, step: OpStep) => {\n const input = (step.with ?? {}) as { resource?: string; message?: string };\n if (!input.resource) {\n throw new Error('Missing \"resource\" in step.with for op \"util.require\"');\n }\n if (!ctx.resources.has(input.resource)) {\n const suffix = input.message ? ` ${input.message}` : \"\";\n throw new Error(`Missing required resource: \"${input.resource}\".${suffix}`);\n }\n });\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.step.d.ts","sourceRoot":"","sources":["../../../../src/testing/steps/util/sleep.step.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIxD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAQ9D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerSleepStep = registerSleepStep;
|
|
4
|
+
function registerSleepStep(registry) {
|
|
5
|
+
registry.register("util.sleep", async (_ctx, step) => {
|
|
6
|
+
const input = (step.with ?? {});
|
|
7
|
+
if (input.ms === undefined) {
|
|
8
|
+
throw new Error('Missing "ms" in step.with for op "util.sleep"');
|
|
9
|
+
}
|
|
10
|
+
await new Promise((resolve) => setTimeout(resolve, input.ms));
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=sleep.step.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sleep.step.js","sourceRoot":"","sources":["../../../../src/testing/steps/util/sleep.step.ts"],"names":[],"mappings":";;AAMA,8CAQC;AARD,SAAgB,iBAAiB,CAAC,QAAsB;IACtD,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,EAAE,IAAiB,EAAE,IAAY,EAAE,EAAE;QACxE,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,EAAE,CAAe,CAAC;QAC9C,IAAI,KAAK,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACnE,CAAC;QACD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { TestContext } from \"../../contracts/runtime-context.types\";\nimport type { OpStep } from \"../../contracts/testing-metadata.types\";\nimport { StepRegistry } from \"../../core/step-registry\";\n\ntype SleepInput = { ms: number };\n\nexport function registerSleepStep(registry: StepRegistry): void {\n registry.register(\"util.sleep\", async (_ctx: TestContext, step: OpStep) => {\n const input = (step.with ?? {}) as SleepInput;\n if (input.ms === undefined) {\n throw new Error('Missing \"ms\" in step.with for op \"util.sleep\"');\n }\n await new Promise((resolve) => setTimeout(resolve, input.ms));\n });\n}\n"]}
|
|
@@ -18,7 +18,7 @@ The commands below are the canonical flow.
|
|
|
18
18
|
|
|
19
19
|
Command:
|
|
20
20
|
```
|
|
21
|
-
npx @solidxai/solidctl test
|
|
21
|
+
npx @solidxai/solidctl test data --setup
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
What this does:
|
|
@@ -33,7 +33,7 @@ What this does:
|
|
|
33
33
|
|
|
34
34
|
Example output:
|
|
35
35
|
```
|
|
36
|
-
▶ Running solid test
|
|
36
|
+
▶ Running solid test data
|
|
37
37
|
Creating test datasource environment file and manifest.
|
|
38
38
|
Backed up .env to .env.backup.steady_wolf and applied new test datasource names to .env.
|
|
39
39
|
Creating test database/schema "default_20260201234402_steady_wolf" on datasource "default"...
|
|
@@ -55,7 +55,7 @@ Creating test database/schema "default_20260201234402_steady_wolf" on datasource
|
|
|
55
55
|
5) Tear down
|
|
56
56
|
============================================================
|
|
57
57
|
|
|
58
|
-
✔ solid test
|
|
58
|
+
✔ solid test data completed
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Rationale:
|
|
@@ -97,7 +97,7 @@ Rationale:
|
|
|
97
97
|
|
|
98
98
|
Command:
|
|
99
99
|
```
|
|
100
|
-
npx @solidxai/solidctl test
|
|
100
|
+
npx @solidxai/solidctl test data --load
|
|
101
101
|
```
|
|
102
102
|
|
|
103
103
|
What this does:
|
|
@@ -109,13 +109,13 @@ What this does:
|
|
|
109
109
|
|
|
110
110
|
Example output:
|
|
111
111
|
```
|
|
112
|
-
▶ Running solid test
|
|
112
|
+
▶ Running solid test data
|
|
113
113
|
Test data setup for all modules.
|
|
114
114
|
Processing test data for module: solid-core
|
|
115
115
|
✔ Test data setup complete for module: solid-core
|
|
116
116
|
Processing test data for module: venue
|
|
117
117
|
✔ Test data setup complete for module: venue
|
|
118
|
-
✔ solid test
|
|
118
|
+
✔ solid test data completed
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
Rationale:
|
|
@@ -123,11 +123,51 @@ Rationale:
|
|
|
123
123
|
|
|
124
124
|
---
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
|
|
127
|
+
## Step 4: Run Tests
|
|
128
|
+
```
|
|
129
|
+
npx @solidxai/solidctl test run --module venue --api-base-url http://localhost:3000 --ui-base-url http://localhost:5173 --headless false
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
npx @solidxai/solidctl test run --module venue --list-specs
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
What this does:
|
|
137
|
+
- Loads `testing.scenarios` from the module metadata file.
|
|
138
|
+
- Applies `--scenario-ids` or `--include-tags` filtering if provided.
|
|
139
|
+
- Boots API and UI adapters with the supplied base URLs.
|
|
140
|
+
- Registers any custom test specs listed in `testing.specs`.
|
|
141
|
+
- Executes scenarios in order with fail‑fast behavior.
|
|
142
|
+
|
|
143
|
+
Useful variants:
|
|
144
|
+
```
|
|
145
|
+
npx @solidxai/solidctl test run --module venue --scenario-ids api-authenticate-success,api-create-states
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
```
|
|
149
|
+
npx @solidxai/solidctl test run --module venue --include-tags smoke
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
npx @solidxai/solidctl test run --module venue --api-base-url http://localhost:3000 --headless true
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
npx @solidxai/solidctl test run --module venue --headless false
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Notes:
|
|
161
|
+
- If your scenario depends on a previous scenario’s `saveAs` output (e.g., `loginSuccess`), ensure the auth scenario runs first.
|
|
162
|
+
- For UI tests, `--ui-base-url` should point to a running frontend server.
|
|
163
|
+
- `--list-specs` prints registered custom `test.spec` ids and exits.
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## Step 5: Tear everything down
|
|
127
167
|
|
|
128
168
|
Command:
|
|
129
169
|
```
|
|
130
|
-
npx @solidxai/solidctl test
|
|
170
|
+
npx @solidxai/solidctl test data --teardown
|
|
131
171
|
```
|
|
132
172
|
|
|
133
173
|
What this does:
|
|
@@ -138,11 +178,11 @@ What this does:
|
|
|
138
178
|
|
|
139
179
|
Example output:
|
|
140
180
|
```
|
|
141
|
-
▶ Running solid test
|
|
181
|
+
▶ Running solid test data
|
|
142
182
|
Deleting test datasource environment and databases.
|
|
143
183
|
Dropping test database/schema "default_20260201234402_steady_wolf" on datasource "default"...
|
|
144
184
|
✔ Test datasource env files and manifest deleted; test databases dropped.
|
|
145
|
-
✔ solid test
|
|
185
|
+
✔ solid test data completed
|
|
146
186
|
```
|
|
147
187
|
|
|
148
188
|
Rationale:
|
|
@@ -154,7 +194,7 @@ Rationale:
|
|
|
154
194
|
|
|
155
195
|
You can restrict test data loading to a subset of modules:
|
|
156
196
|
```
|
|
157
|
-
npx @solidxai/solidctl test
|
|
197
|
+
npx @solidxai/solidctl test data --load --modules-to-test venue,reports
|
|
158
198
|
```
|
|
159
199
|
|
|
160
200
|
Only the listed modules are processed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solidxai/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5-beta.0",
|
|
4
4
|
"description": "This module is a NestJS module containing all the required core providers required by a Solid application",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"test:cov": "jest --coverage",
|
|
25
25
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
26
26
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
27
|
-
"prepare": "npm run build"
|
|
27
|
+
"prepare": "npm run build",
|
|
28
|
+
"prepack": "npm run build"
|
|
28
29
|
},
|
|
29
30
|
"author": "Oswald Rodrigues <oswald@logicloop.io>",
|
|
30
31
|
"license": "ISC",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"@nestjs/throttler": "^6.4.0",
|
|
41
42
|
"amqplib": "^0.10.4",
|
|
42
43
|
"axios": "^1.7.0",
|
|
44
|
+
"form-data": "^4.0.0",
|
|
43
45
|
"bcrypt": "^5.1.1",
|
|
44
46
|
"bson": "^6.10.1",
|
|
45
47
|
"cache-manager": "^5.5.2",
|
|
@@ -75,7 +77,13 @@
|
|
|
75
77
|
"uuid": "^9.0.1",
|
|
76
78
|
"xlsx": "^0.18.5"
|
|
77
79
|
},
|
|
80
|
+
"peerDependenciesMeta": {
|
|
81
|
+
"playwright": {
|
|
82
|
+
"optional": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
78
85
|
"peerDependencies": {
|
|
86
|
+
"playwright": ">=1.0.0",
|
|
79
87
|
"@nestjs/axios": "^3.0.2",
|
|
80
88
|
"@nestjs/cache-manager": "^2.2.2",
|
|
81
89
|
"@nestjs/common": "^10.0.0",
|