mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Replace Alertify alert and confirm with React-based model dialog. Fixes #7053
This commit is contained in:
@@ -17,9 +17,9 @@ import SchemaView, { SCHEMA_STATE_ACTIONS } from '../../../pgadmin/static/js/Sch
|
||||
import BaseUISchema from '../../../pgadmin/static/js/SchemaView/base_schema.ui';
|
||||
import _ from 'lodash';
|
||||
import { getNodeExclusionConstraintSchema } from '../../../pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/exclusion_constraint/static/js/exclusion_constraint.ui';
|
||||
import * as legacyConnector from 'sources/helpers/legacyConnector';
|
||||
import * as nodeAjax from '../../../pgadmin/browser/static/js/node_ajax';
|
||||
import TableSchema from '../../../pgadmin/browser/server_groups/servers/databases/schemas/tables/static/js/table.ui';
|
||||
import Notify from '../../../pgadmin/static/js/helpers/Notifier';
|
||||
|
||||
class SchemaInColl extends BaseUISchema {
|
||||
constructor(schemaObj) {
|
||||
@@ -259,7 +259,7 @@ describe('ExclusionConstraintSchema', ()=>{
|
||||
beforeEach(()=>{
|
||||
spyOn(schemaObj.exColumnSchema, 'setOperClassOptions').and.callThrough();
|
||||
spyOn(schemaObj.fieldOptions, 'getOperClass').and.returnValue(operClassOptions);
|
||||
confirmSpy = spyOn(legacyConnector.pgAlertify(), 'confirm').and.callThrough();
|
||||
confirmSpy = spyOn(Notify, 'confirm').and.callThrough();
|
||||
deferredDepChange = _.find(schemaObj.fields, (f)=>f.id=='amname')?.deferredDepChange;
|
||||
});
|
||||
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user