fix(test): tighten IDE-tag e2e regression test and drop no-op cleanup · Entire

fix(test): tighten IDE-tag e2e regression test and drop no-op cleanup

edc88e2→main·

suhaanthayyil·4d ago·1 file·+3 added/-7 removed

Changes

1

2 unmodified lines
3
4
5
6
6
7
8
8 unmodified lines

17
18
19
21
20
21
22
12 unmodified lines

35
36
37
40
41
42
43
44
38
39
40
41
42

2 unmodified lines

package integration

import (
    "strings"
    "testing"
)

8 unmodified lines

func TestIssue1423_IDEContextTagStrippedFromSessionPrompt(t *testing.T) {
    t.Parallel()
    env := NewTestEnv(t)
    defer env.Cleanup()

env.InitRepo()
    env.WriteFile("README.md", "# Test")
12 unmodified lines

if err != nil {
        t.Fatalf("get session state: %v", err)
    }
    if strings.Contains(state.LastPrompt, "ide_opened_file") {
        t.Fatalf("IDE context tag leaked into the session prompt/title: %q (#1423)", state.LastPrompt)
    }
    if !strings.Contains(state.LastPrompt, "rewrite these docs as one plan") {
        t.Fatalf("user's actual prompt was lost: %q", state.LastPrompt)
    }
    const want = "rewrite these docs as one plan"
    if state.LastPrompt != want {
        t.Fatalf("session prompt/title not fully sanitized: got %q, want %q (#1423)", state.LastPrompt, want)
    }
}

Mcmd/entire/cli/integration_test/issue_1423_ide_tag_e2e_test.go+3/-7