You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add rollback handling and error collection in tests
Introduce an optional «onRollback» callback to the «TestStep» class, enabling custom rollback logic during test execution. Update the «rollback» method to invoke this callback if provided.
Add a new test case to verify proper rollback execution order for failed and completed steps. Ensure rollback errors are collected and validated.
Enhances test coverage and ensures consistent behavior during rollback scenarios.
Copy file name to clipboardExpand all lines: public/dashboard-assistant/modules/installation-manager/domain/entities/installation-progress-manager.test.ts
+47-5Lines changed: 47 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,12 @@ class TestStep extends InstallationAIAssistantStep {
13
13
constructor(
14
14
name: string,
15
15
privatereadonlysuccessMsg: string='ok',
16
-
privatereadonlyfailureMsg: string='fail'
16
+
privatereadonlyfailureMsg: string='fail',
17
+
privatereadonlyonRollback?: (
18
+
request: InstallAIDashboardAssistantDto,
19
+
context: InstallationContext,
20
+
error: Error
21
+
)=>Promise<void>|void
17
22
){
18
23
super({ name });
19
24
}
@@ -27,11 +32,13 @@ class TestStep extends InstallationAIAssistantStep {
0 commit comments