@@ -82,7 +82,7 @@ describe("CloudAgents", () => {
8282
8383 // Wait for the component to render agents
8484 await waitFor ( ( ) => {
85- expect ( screen . getByText ( "Cloud Agents " ) ) . toBeInTheDocument ( )
85+ expect ( screen . getByText ( "chat:cloudAgents.title " ) ) . toBeInTheDocument ( )
8686 expect ( screen . getByText ( "Code Assistant" ) ) . toBeInTheDocument ( )
8787 expect ( screen . getByText ( "Test Agent" ) ) . toBeInTheDocument ( )
8888 } )
@@ -120,10 +120,12 @@ describe("CloudAgents", () => {
120120 } )
121121
122122 await waitFor ( ( ) => {
123- expect ( screen . getByText ( "Cloud Agents" ) ) . toBeInTheDocument ( )
123+ expect ( screen . getByText ( "chat:cloudAgents.title" ) ) . toBeInTheDocument ( )
124+ expect ( screen . getByText ( "Code Assistant" ) ) . toBeInTheDocument ( )
125+ expect ( screen . getByText ( "Test Agent" ) ) . toBeInTheDocument ( )
124126 } )
125127
126- const createButton = screen . getByTitle ( "Create new agent " )
128+ const createButton = screen . getByTitle ( "chat:cloudAgents.create " )
127129 fireEvent . click ( createButton )
128130
129131 expect ( mockPostMessage ) . toHaveBeenCalledWith ( {
@@ -142,11 +144,11 @@ describe("CloudAgents", () => {
142144 } )
143145
144146 await waitFor ( ( ) => {
145- expect ( screen . getByText ( / a n y C l o u d A g e n t s y e t / ) ) . toBeInTheDocument ( )
147+ expect ( screen . getByText ( "chat:cloudAgents.createFirst" ) ) . toBeInTheDocument ( )
146148 } )
147149
148150 // Find and click the "Create your first" button in the empty state
149- const createFirstButton = screen . getByText ( "Create your first. " )
151+ const createFirstButton = screen . getByText ( "chat:cloudAgents.createFirst " )
150152 fireEvent . click ( createFirstButton )
151153
152154 expect ( mockPostMessage ) . toHaveBeenCalledWith ( {
@@ -168,7 +170,7 @@ describe("CloudAgents", () => {
168170 // Wait for the component to process the error
169171 await waitFor ( ( ) => {
170172 // Component should render nothing on error
171- expect ( screen . queryByText ( "Cloud Agents " ) ) . not . toBeInTheDocument ( )
173+ expect ( screen . queryByText ( "chat:cloudAgents.title " ) ) . not . toBeInTheDocument ( )
172174 } )
173175 } )
174176
0 commit comments