Skip to content

Commit bb936be

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

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ suite("Roo Code Subtasks", function () {
660660
...parentProfile,
661661
openRouterModelId: "openai/gpt-4.1-mini",
662662
}
663-
const priorModeApiConfigs = api.getConfiguration().modeApiConfigs ?? {}
663+
const priorConfiguration = api.getConfiguration()
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({
@@ -735,7 +736,10 @@ suite("Roo Code Subtasks", function () {
735736
)
736737
} finally {
737738
api.off(RooCodeEventName.Message, messageHandler)
738-
await api.setConfiguration({ modeApiConfigs: priorModeApiConfigs })
739+
await api.setConfiguration(priorConfiguration)
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)