Skip to content

Commit ab9f81e

Browse files
committed
Fix tests
1 parent 52eba32 commit ab9f81e

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

webview-ui/src/components/account/__tests__/AccountView.spec.tsx

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ vi.mock("@src/i18n/TranslationContext", () => ({
1111
"settings:common.done": "Done",
1212
"account:signIn": "Connect to Roo Code Cloud",
1313
"account:cloudBenefitsTitle": "Connect to Roo Code Cloud",
14-
"account:cloudBenefitsSubtitle": "Sync your prompts and telemetry to enable:",
15-
"account:cloudBenefitHistory": "Online task history",
16-
"account:cloudBenefitSharing": "Sharing and collaboration features",
17-
"account:cloudBenefitMetrics": "Task, token, and cost-based usage metrics",
14+
"account:cloudBenefitWalkaway": "Follow and control tasks from anywhere with Roomote Control",
15+
"account:cloudBenefitSharing": "Share tasks with others",
16+
"account:cloudBenefitHistory": "Access your task history",
17+
"account:cloudBenefitMetrics": "Get a holistic view of your token consumption",
1818
"account:logOut": "Log out",
19-
"account:connect": "Connect",
20-
"account:visitCloudWebsite": "Visit Cloud Website",
21-
"account:remoteControl": "Remote Control",
22-
"account:remoteControlDescription": "Allow remote control of this extension",
23-
"account:profilePicture": "Profile Picture",
19+
"account:connect": "Connect Now",
20+
"account:visitCloudWebsite": "Visit Roo Code Cloud",
21+
"account:remoteControl": "Roomote Control",
22+
"account:remoteControlDescription":
23+
"Enable following and interacting with tasks in this workspace with Roo Code Cloud",
24+
"account:profilePicture": "Profile picture",
2425
}
2526
return translations[key] || key
2627
},
@@ -68,13 +69,13 @@ describe("AccountView", () => {
6869

6970
// Check that the benefits section is displayed
7071
expect(screen.getByRole("heading", { name: "Connect to Roo Code Cloud" })).toBeInTheDocument()
71-
expect(screen.getByText("Sync your prompts and telemetry to enable:")).toBeInTheDocument()
72-
expect(screen.getByText("Online task history")).toBeInTheDocument()
73-
expect(screen.getByText("Sharing and collaboration features")).toBeInTheDocument()
74-
expect(screen.getByText("Task, token, and cost-based usage metrics")).toBeInTheDocument()
72+
expect(screen.getByText("Follow and control tasks from anywhere with Roomote Control")).toBeInTheDocument()
73+
expect(screen.getByText("Share tasks with others")).toBeInTheDocument()
74+
expect(screen.getByText("Access your task history")).toBeInTheDocument()
75+
expect(screen.getByText("Get a holistic view of your token consumption")).toBeInTheDocument()
7576

7677
// Check that the connect button is also present
77-
expect(screen.getByText("Connect")).toBeInTheDocument()
78+
expect(screen.getByText("Connect Now")).toBeInTheDocument()
7879
})
7980

8081
it("should not display benefits when user is authenticated", () => {
@@ -93,10 +94,12 @@ describe("AccountView", () => {
9394
)
9495

9596
// Check that the benefits section is NOT displayed
96-
expect(screen.queryByText("Sync your prompts and telemetry to enable:")).not.toBeInTheDocument()
97-
expect(screen.queryByText("Online task history")).not.toBeInTheDocument()
98-
expect(screen.queryByText("Sharing and collaboration features")).not.toBeInTheDocument()
99-
expect(screen.queryByText("Task, token, and cost-based usage metrics")).not.toBeInTheDocument()
97+
expect(
98+
screen.queryByText("Follow and control tasks from anywhere with Roomote Control"),
99+
).not.toBeInTheDocument()
100+
expect(screen.queryByText("Share tasks with others")).not.toBeInTheDocument()
101+
expect(screen.queryByText("Access your task history")).not.toBeInTheDocument()
102+
expect(screen.queryByText("Get a holistic view of your token consumption")).not.toBeInTheDocument()
100103

101104
// Check that user info is displayed instead
102105
expect(screen.getByText("Test User")).toBeInTheDocument()
@@ -121,8 +124,10 @@ describe("AccountView", () => {
121124

122125
// Check that the remote control toggle is displayed
123126
expect(screen.getByTestId("remote-control-toggle")).toBeInTheDocument()
124-
expect(screen.getByText("Remote Control")).toBeInTheDocument()
125-
expect(screen.getByText("Allow remote control of this extension")).toBeInTheDocument()
127+
expect(screen.getByText("Roomote Control")).toBeInTheDocument()
128+
expect(
129+
screen.getByText("Enable following and interacting with tasks in this workspace with Roo Code Cloud"),
130+
).toBeInTheDocument()
126131
})
127132

128133
it("should not display remote control toggle when user does not have extension bridge enabled", () => {
@@ -143,6 +148,6 @@ describe("AccountView", () => {
143148

144149
// Check that the remote control toggle is NOT displayed
145150
expect(screen.queryByTestId("remote-control-toggle")).not.toBeInTheDocument()
146-
expect(screen.queryByText("Remote Control")).not.toBeInTheDocument()
151+
expect(screen.queryByText("Roomote Control")).not.toBeInTheDocument()
147152
})
148153
})

0 commit comments

Comments
 (0)