1) Port Grant Wizard to react. Fixes #6687

2) Fixed an issue where grant wizard is unresponsive if the database size is huge. Fixes #2097
This commit is contained in:
Nikhil Mohite
2021-09-20 13:02:41 +05:30
committed by Akshay Joshi
parent 44e770aa0b
commit 7aa213a5ce
19 changed files with 1175 additions and 1098 deletions

View File

@@ -0,0 +1,58 @@
/////////////////////////////////////////////////////////////
//
// pgAdmin 4 - PostgreSQL Tools
//
// Copyright (C) 2013 - 2021, The pgAdmin Development Team
// This software is released under the PostgreSQL Licence
//
//////////////////////////////////////////////////////////////
import jasmineEnzyme from 'jasmine-enzyme';
import React from 'react';
import '../helper/enzyme.helper';
import { createMount } from '@material-ui/core/test-utils';
import pgAdmin from 'sources/pgadmin';
import { messages } from '../fake_messages';
// import GrantWizard from '../../../pgadmin/tools/grant_wizard/static/js/grant_wizard_view';
import Theme from 'sources/Theme';
import Wizard from '../../../pgadmin/browser/static/js/WizardView';
import WizardStep from '../../../pgadmin/browser/static/js/WizardStep';
describe('Wizard', () => {
let mount;
/* Use createMount so that material ui components gets the required context */
/* https://material-ui.com/guides/testing/#api */
beforeAll(() => {
mount = createMount();
});
afterAll(() => {
mount.cleanUp();
});
beforeEach(() => {
jasmineEnzyme();
/* messages used by validators */
pgAdmin.Browser = pgAdmin.Browser || {};
pgAdmin.Browser.messages = pgAdmin.Browser.messages || messages;
pgAdmin.Browser.utils = pgAdmin.Browser.utils || {};
});
it('WizardPanel', () => {
mount(
<Theme>
<Wizard
stepList={['Test']}
onStepChange={()=> {}}
onSave={()=>{}}
className={''}
disableNextStep={()=>{return false;}}
>
<WizardStep stepId={0} className={''}>
</WizardStep>
</Wizard>
</Theme>);
});
});