Replace Alertify alert and confirm with React-based model dialog. Fixes #7053

This commit is contained in:
Akshay Joshi
2021-12-07 18:52:40 +05:30
parent e327066523
commit fd53e4f5f9
62 changed files with 393 additions and 398 deletions

View File

@@ -16,8 +16,8 @@ import {messages} from '../fake_messages';
import SchemaView, { SCHEMA_STATE_ACTIONS } from '../../../pgadmin/static/js/SchemaView';
import _ from 'lodash';
import { getNodeTableSchema, LikeSchema } from '../../../pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.ui';
import * as legacyConnector from 'sources/helpers/legacyConnector';
import * as nodeAjax from '../../../pgadmin/browser/static/js/node_ajax';
import Notify from '../../../pgadmin/static/js/helpers/Notifier';
function getFieldDepChange(schema, id) {
return _.find(schema.fields, (f)=>f.id==id)?.depChange;
@@ -154,7 +154,7 @@ describe('TableSchema', ()=>{
beforeEach(()=>{
spyOn(schemaObj,'changeColumnOptions').and.callThrough();
spyOn(schemaObj, 'getTableOid').and.returnValue(140391);
confirmSpy = spyOn(legacyConnector.pgAlertify(), 'confirm').and.callThrough();
confirmSpy = spyOn(Notify, 'confirm').and.callThrough();
deferredDepChange = _.find(schemaObj.fields, (f)=>f.id=='typname')?.deferredDepChange;
schemaObj.ofTypeTables = [
{label: 'type1', oftype_columns: oftypeColumns}