File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
react-typescript-vite/src/tests Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change 11import 'react'
22import { $ , expect } from '@wdio/globals'
3- import { render , screen } from '@testing-library/react'
3+ import { render } 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.
99 render ( < App /> )
1010
11- // getByText returns the first matching node for the provided text, and
12- // throws an error if no elements match or if more than one match is found.
13- const btn = screen . getByText ( 'count is 0' )
14- const button = $ ( btn )
11+ const button = $ ( 'button*=count is' )
1512
1613 // Dispatch a native click event to our button element.
1714 await button . click ( )
You can’t perform that action at this time.
0 commit comments