Fixed Jasmine test cases.

This commit is contained in:
Aditya Toshniwal 2021-09-29 16:36:49 +05:30 committed by Akshay Joshi
parent 28892bb07f
commit c57fc74e18
2 changed files with 11 additions and 2 deletions

View File

@ -407,9 +407,16 @@ export default class TableSchema extends BaseUISchema {
readonly: this.inCatalog, readonly: this.inCatalog,
},{ },{
id: 'spcname', label: gettext('Tablespace'), id: 'spcname', label: gettext('Tablespace'),
type: 'select', options: this.fieldOptions.spcname,
mode: ['properties', 'create', 'edit'], deps: ['is_partitioned'], mode: ['properties', 'create', 'edit'], deps: ['is_partitioned'],
readonly: this.inCatalog, readonly: this.inCatalog, type: (state)=>{
return {
type: 'select', options: this.fieldOptions.spcname,
controlProps: {
allowClear: obj.isNew(state) ? true : false,
}
};
}
},{ },{
id: 'partition', type: 'group', label: gettext('Partitions'), id: 'partition', type: 'group', label: gettext('Partitions'),
mode: ['edit', 'create'], min_version: 100000, mode: ['edit', 'create'], min_version: 100000,

View File

@ -171,6 +171,7 @@ describe('TableSchema', ()=>{
deferredPromise.then((depChange)=>{ deferredPromise.then((depChange)=>{
expect(depChange()).toEqual({ expect(depChange()).toEqual({
columns: oftypeColumns, columns: oftypeColumns,
primary_key: [],
}); });
expect(schemaObj.changeColumnOptions).toHaveBeenCalledWith(oftypeColumns); expect(schemaObj.changeColumnOptions).toHaveBeenCalledWith(oftypeColumns);
done(); done();
@ -206,6 +207,7 @@ describe('TableSchema', ()=>{
deferredPromise.then((depChange)=>{ deferredPromise.then((depChange)=>{
expect(depChange()).toEqual({ expect(depChange()).toEqual({
columns: oftypeColumns, columns: oftypeColumns,
primary_key: [],
}); });
expect(schemaObj.changeColumnOptions).toHaveBeenCalledWith(oftypeColumns); expect(schemaObj.changeColumnOptions).toHaveBeenCalledWith(oftypeColumns);
done(); done();