File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
react-typescript-vite/src/tests Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import 'react'
22import { $ , expect } from '@wdio/globals'
3- import { render } from '@testing-library/react'
3+ import { render , screen } from '@testing-library/react'
44import App from '../App'
55
66describe ( 'React Component Testing' , ( ) => {
77 it ( 'increments value on click' , async ( ) => {
88 // The render method returns a collection of utilities to query your component.
9- const { getByText } = render ( < App /> )
9+ render ( < App /> )
1010
1111 // getByText returns the first matching node for the provided text, and
1212 // throws an error if no elements match or if more than one match is found.
13- const btn = getByText ( 'count is 0' )
14- const button = await $ ( btn )
13+ const btn = screen . getByText ( 'count is 0' )
14+ const button = $ ( btn )
1515
1616 // Dispatch a native click event to our button element.
1717 await button . click ( )
You can’t perform that action at this time.
0 commit comments