File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
ansible_ai_connect_chatbot/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import React from "react";
1111import { beforeEach , expect , test , vi } from "vitest" ;
1212import { render } from "vitest-browser-react" ;
1313import { MemoryRouter } from "react-router-dom" ;
14+ import { screen } from "@testing-library/react" ;
1415import { App } from "./App" ;
1516import { ColorThemeSwitch } from "./ColorThemeSwitch/ColorThemeSwitch" ;
1617import { userEvent , page } from "@vitest/browser/context" ;
@@ -184,12 +185,12 @@ test("ThumbsDown icon test", async () => {
184185
185186 await expect . element ( page . getByText ( "Create variables" ) ) . toBeVisible ( ) ;
186187
187- const thumbsDownIcon = view . getByRole ( "button" , {
188+ const thumbsDownIcon = await screen . findByRole ( "button" , {
188189 name : "Bad response" ,
189190 } ) ;
190191 await thumbsDownIcon . click ( ) ;
191192
192- const sureButton = page . getByText ( "sure !") ;
193+ const sureButton = await screen . findByText ( "Sure !") ;
193194 await expect . element ( sureButton ) . toBeVisible ( ) ;
194195 await sureButton . click ( ) ;
195196
You can’t perform that action at this time.
0 commit comments