import React from 'react'
import { render, screen } from '@testing-library/react'
import { unityTheme } from '@ntpkunity/controls'
import ForgotPasswordComponent from './forgotPasswordComponent'

test('renders learn react link', () => {
  const [response, setResponse] = React.useState<any>(undefined)

  React.useEffect(() => {
    console.log(response, 'change in response')
  }, [response])

  render(<ForgotPasswordComponent
  setResponse={setResponse}
  nextScreenUrl={'http://localhost:3000/'}
  theme={unityTheme}
  heading = 'Forgot Password?'
  label = 'Enter Your Registered Email Address'
  buttonText = 'Send Reset Link'
  message = 'Please enter your registered email address for security purposes. When you receive the reset password email, please follow the instructions.'
  onChange={(e: any) => {
    console.log('change val', e)
  }}
  />)
  const linkElement = screen.getByText(/forgotPassword Component/)
  expect(linkElement).toBeInTheDocument()
})
