Skip to content

Commit 4a976b5

Browse files
committed
test(e2e): restore provider profile after cross-profile subtasks
1 parent 57e9032 commit 4a976b5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/vscode-e2e/src/suite/subtasks.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ suite("Roo Code Subtasks", function () {
661661
openRouterModelId: "openai/gpt-4.1-mini",
662662
}
663663
const priorModeApiConfigs = api.getConfiguration().modeApiConfigs ?? {}
664+
const priorActiveProfile = api.getActiveProfile()
664665
const parentProfileId = await api.upsertProfile("subtask-parent-profile", parentProfile, true)
665666
const childProfileId = await api.upsertProfile("subtask-child-profile", childProfile, false)
666667
await api.setConfiguration({
@@ -736,6 +737,9 @@ suite("Roo Code Subtasks", function () {
736737
} finally {
737738
api.off(RooCodeEventName.Message, messageHandler)
738739
await api.setConfiguration({ modeApiConfigs: priorModeApiConfigs })
740+
if (priorActiveProfile) {
741+
await api.setActiveProfile(priorActiveProfile)
742+
}
739743
await api.deleteProfile("subtask-child-profile").catch(() => {})
740744
await api.deleteProfile("subtask-parent-profile").catch(() => {})
741745
while (api.getCurrentTaskStack().length > 0) {

0 commit comments

Comments
 (0)