Skip to content

Commit d4a3094

Browse files
committed
fix: Correct workflow metadata test path and expected values
- Fix test to create workflow at StateBaseDir/workflows/ instead of sessions/ - Fix expected slashCommand from /command to /test.command (matches filename)
1 parent 8648dcb commit d4a3094

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

components/backend/handlers/content_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -830,12 +830,13 @@ var _ = Describe("Content Handler", Label(test_constants.LabelUnit, test_constan
830830
})
831831

832832
It("Should parse workflow metadata when available", func() {
833-
// Create test workflow structure
834-
sessionDir := filepath.Join(tempStateDir, "sessions", "test-session", "workspace", "workflows", "test-workflow")
835-
claudeDir := filepath.Join(sessionDir, ".claude")
833+
// Create test workflow structure at StateBaseDir/workflows/{workflow-name}
834+
// findActiveWorkflowDir looks in StateBaseDir/workflows/ for directories with .claude subdirectory
835+
workflowDir := filepath.Join(tempStateDir, "workflows", "test-workflow")
836+
claudeDir := filepath.Join(workflowDir, ".claude")
836837
commandsDir := filepath.Join(claudeDir, "commands")
837838
agentsDir := filepath.Join(claudeDir, "agents")
838-
ambientDir := filepath.Join(sessionDir, ".ambient")
839+
ambientDir := filepath.Join(workflowDir, ".ambient")
839840

840841
err := os.MkdirAll(commandsDir, 0755)
841842
Expect(err).NotTo(HaveOccurred())
@@ -917,7 +918,7 @@ This is a test agent.
917918

918919
slashCommandInterface, exists := command["slashCommand"]
919920
Expect(exists).To(BeTrue(), "Command should contain 'slashCommand' field")
920-
Expect(slashCommandInterface).To(Equal("/command"))
921+
Expect(slashCommandInterface).To(Equal("/test.command"))
921922

922923
iconInterface, exists := command["icon"]
923924
Expect(exists).To(BeTrue(), "Command should contain 'icon' field")

0 commit comments

Comments
 (0)