2023-06-30 16:08:33 +05:30
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
|
|
|
|
// pgAdmin 4 - PostgreSQL Tools
|
|
|
|
|
//
|
2024-01-01 14:13:48 +05:30
|
|
|
// Copyright (C) 2013 - 2024, The pgAdmin Development Team
|
2023-06-30 16:08:33 +05:30
|
|
|
// This software is released under the PostgreSQL Licence
|
|
|
|
|
//
|
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
|
|
|
|
2023-10-23 17:43:17 +05:30
|
|
|
|
2023-06-30 16:08:33 +05:30
|
|
|
import React from 'react';
|
2023-10-23 17:43:17 +05:30
|
|
|
|
|
|
|
|
import { render } from '@testing-library/react';
|
2023-06-30 16:08:33 +05:30
|
|
|
import Theme from '../../../pgadmin/static/js/Theme';
|
|
|
|
|
import ForgotPasswordPage from '../../../pgadmin/static/js/SecurityPages/ForgotPasswordPage';
|
|
|
|
|
|
|
|
|
|
describe('ForgotPasswordPage', ()=>{
|
|
|
|
|
let ctrlMount = (props)=>{
|
2023-10-23 17:43:17 +05:30
|
|
|
return render(<Theme>
|
2023-06-30 16:08:33 +05:30
|
|
|
<ForgotPasswordPage {...props}/>
|
|
|
|
|
</Theme>);
|
|
|
|
|
};
|
|
|
|
|
|
2023-10-23 17:43:17 +05:30
|
|
|
it('basic', ()=>{
|
2023-06-30 16:08:33 +05:30
|
|
|
const ctrl = ctrlMount({
|
|
|
|
|
actionUrl: '/forgot/url',
|
|
|
|
|
csrfToken: 'some-token',
|
|
|
|
|
});
|
2023-10-23 17:43:17 +05:30
|
|
|
expect(ctrl.container.querySelector('form').getAttribute('action')).toBe('/forgot/url');
|
|
|
|
|
expect(ctrl.container.querySelector('input[name="email"]')).not.toBeNull();
|
2023-06-30 16:08:33 +05:30
|
|
|
});
|
|
|
|
|
});
|