Added support to specify the background fill color to the table nodes in the ERD tool. #4392

This commit is contained in:
Aditya Toshniwal
2022-10-12 10:07:30 +05:30
committed by GitHub
parent 5b09122676
commit 794cbed57c
17 changed files with 302 additions and 141 deletions

View File

@@ -25,6 +25,7 @@ export class FakeNode {
retVal.name = tabName;
return retVal;
}
setMetadata() {/* no-op */}
getMetadata() {
return {
is_promise: false,

View File

@@ -132,6 +132,7 @@ describe('ERDTool', ()=>{
body = erd.find('ERDTool');
bodyInstance = body.instance();
spyOn(bodyInstance, 'getDialog').and.callFake(getDialog);
spyOn(bodyInstance, 'onChangeColors').and.callFake(()=>{/*no op*/});
});
afterAll(() => {
@@ -248,7 +249,7 @@ describe('ERDTool', ()=>{
let saveCallback = tableDialog.calls.mostRecent().args[3];
let newData = {key: 'value'};
saveCallback(newData);
expect(bodyInstance.diagram.addNode).toHaveBeenCalledWith(newData);
expect(bodyInstance.diagram.addNode.calls.mostRecent().args[0]).toEqual(newData);
/* Existing */
tableDialog.calls.reset();