import App from './components/App'; import { render, screen } from '@testing-library/react'; test('should show text content as Goodbye', async () => { // Render App render(<App />); // Extract button node const button = screen.getByRole('button'); // click button userEvent.click(button); // Wait for the text 'Goodbye!' to appear const header = await screen.findByText('Goodbye!'); // Assert header to exist in the DOM expect(header).toBeInTheDocument(); });