elsa-core/src/common/Elsa.Testing.Shared.Component
Sipke Schoorstra a3278ccf97
Add BulkDispatchWorkflows tests and improve activity coverage (#7026)
* Refactor BulkDispatchWorkflows tests and improve activity coverage

- Migrate `BulkDispatchWorkflows` tests to a new structure under `Scenarios/BulkDispatch`.
- Introduce comprehensive test cases for bulk dispatch scenarios, including empty items, correlation IDs, child ports, dictionary items, and invalid definitions.
- Add multiple reusable workflows such as `BulkChildWorkflow`, `BulkDispatchAndWaitWorkflow`, and `BulkDispatchFireAndForgetWorkflow` for enhanced test coverage.
- Update namespaces and project files to reflect the restructuring and new workflow definitions.
- Enhance functionality for `IWorkflowInstanceVariableManager` by adding methods for variable retrieval from workflow states and instances.

* Add additional assertions for WriteLine activity tests and update workflow builder in BulkDispatch tests

- Enhanced `BulkDispatchWorkflowsTests` by validating written texts for accuracy.
- Refactored `BulkDispatchFireAndForgetWorkflow` to update activity and namespace references.

* Add `SlowBulkChildWorkflow` and update `BulkDispatchFireAndForgetWorkflow` test structure

- Introduced `SlowBulkChildWorkflow` with a delay and logging functionality for bulk dispatch testing.
- Modified `BulkDispatchFireAndForgetWorkflow` to use `SlowBulkChildWorkflow` and updated test items.
- Enhanced `BulkDispatchWorkflowsTests` with child workflow completion validation and timing assertions.

* Refactor BulkDispatch tests by removing dictionary item workflow and streamlining child workflow handling

- Removed `BulkDispatchWithDictionaryItemsWorkflow` and associated test cases.
- Updated `BulkChildWorkflow` to use input binding.
- Streamlined child workflow event handling in `BulkDispatchWorkflowsTests` using a reusable helper method.
- Enhanced `CorrelationIdFunction` support with JavaScript expression handling.

* Move unit test workflows to `Scenarios/Activities` and update namespace references

- Relocated all test workflows from `Scenarios/BulkDispatch` and `Scenarios/ExecuteWorkflows` to `Scenarios/Activities`.
- Updated namespaces and imports to reflect the new folder structure.

* Refactor BulkDispatch and FlowJoin test workflows:

- Moved `BulkDispatch` workflows to `Scenarios/Activities/BulkDispatchWorkflows`.
- Renamed `FlowJoins` to `FlowJoin` and updated namespaces to match.
- Adjusted imports and references to align with new folder structure and updated class definitions.

* Remove unused folder reference from `Elsa.Workflows.ComponentTests.csproj`.

* Update test/component/Elsa.Workflows.ComponentTests/Scenarios/Activities/BulkDispatchWorkflows/BulkDispatchWorkflowsTests.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-04 15:44:44 +01:00
..
Activities Add BulkDispatchWorkflows tests and improve activity coverage (#7026) 2025-11-04 15:44:44 +01:00
EventArgs Add WorkflowStateCommitted notification support and update state handling logic 2025-09-25 20:58:21 +02:00
Extensions Merge remote-tracking branch 'origin/blueberry' into enh/multi-tenancy-refactorings 2024-10-11 19:45:40 +02:00
Handlers Add WorkflowStateCommitted notification support and update state handling logic 2025-09-25 20:58:21 +02:00
Models Add BulkDispatchWorkflows tests and improve activity coverage (#7026) 2025-11-04 15:44:44 +01:00
Services Add BulkDispatchWorkflows tests and improve activity coverage (#7026) 2025-11-04 15:44:44 +01:00
Elsa.Testing.Shared.Component.csproj Remove obsolete modules and associated code 2025-06-02 20:05:10 +02:00
Elsa.Testing.Shared.Component.csproj.DotSettings Add WorkflowStateCommitted notification support and update state handling logic 2025-09-25 20:58:21 +02:00
FodyWeavers.xml Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00