Does not use Selenium
Testing the beahvior of a button click
// component <button id="main" class="btn btn-large" name="submission" role="button" data-cy="submit" // how we tag for testing > Submit </button> // use cy.get('[data-cy="submit"]').click()
For Graphql testing
const mockedData = { mockedKey: mockedValue }; beforeEach(() => { (useQuery as jest.Mock).mockImplementation(() => { return { data: mockedData, loading: false } }) })
const { getByText, getByDataCy} = render(<Component />) const renderedText = getByText( `Testing rendering of this value: ${dynamicValue}`, { exact: false} ); const
const { container } = render()