// Logout await userEvent.click(screen.getByRole('button', { name: /logout/i })) expect(screen.getByRole('button', { name: /login/i })).toBeInTheDocument() })
// Wait for loading to complete expect(screen.getByText(/loading/i)).toBeInTheDocument() react testing library
// Submit await userEvent.click(screen.getByRole('button', { name: /submit/i })) // Logout await userEvent