mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 08:46:39 -06:00
Attempt to fix failing JS test cases with error related to ERD.
This commit is contained in:
parent
32fb3f3c1f
commit
4c2ae44e4c
@ -973,7 +973,7 @@ class ERDTool extends React.Component {
|
|||||||
<ERDCanvasSettings.Provider value={{
|
<ERDCanvasSettings.Provider value={{
|
||||||
cardinality_notation: this.state.cardinality_notation
|
cardinality_notation: this.state.cardinality_notation
|
||||||
}}>
|
}}>
|
||||||
{!this.props.inTest && <CanvasWidget className={this.props.classes.diagramCanvas} ref={(ele)=>{this.canvasEle = ele?.ref?.current;}} engine={this.diagram.getEngine()} />}
|
{!this.props.isTest && <CanvasWidget className={this.props.classes.diagramCanvas} ref={(ele)=>{this.canvasEle = ele?.ref?.current;}} engine={this.diagram.getEngine()} />}
|
||||||
</ERDCanvasSettings.Provider>
|
</ERDCanvasSettings.Provider>
|
||||||
</div>
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
@ -1001,7 +1001,7 @@ ERDTool.propTypes = {
|
|||||||
pgAdmin: PropTypes.object.isRequired,
|
pgAdmin: PropTypes.object.isRequired,
|
||||||
panel: PropTypes.object,
|
panel: PropTypes.object,
|
||||||
classes: PropTypes.object,
|
classes: PropTypes.object,
|
||||||
inTest: PropTypes.bool,
|
isTest: PropTypes.bool,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ERDCanvasSettings = React.createContext({});
|
export const ERDCanvasSettings = React.createContext({});
|
||||||
|
@ -15,7 +15,7 @@ import { PortModelAlignment } from '@projectstorm/react-diagrams';
|
|||||||
describe('ERDCore', ()=>{
|
describe('ERDCore', ()=>{
|
||||||
let eleFactory = jasmine.createSpyObj('nodeFactories', {
|
let eleFactory = jasmine.createSpyObj('nodeFactories', {
|
||||||
'registerFactory': null,
|
'registerFactory': null,
|
||||||
'getFactory': jasmine.createSpyObj('getFactory', ['generateModel', 'calculateRoutingMatrix']),
|
'getFactory': jasmine.createSpyObj('getFactory', ['generateModel']),
|
||||||
});
|
});
|
||||||
let erdEngine = jasmine.createSpyObj('engine', {
|
let erdEngine = jasmine.createSpyObj('engine', {
|
||||||
'getNodeFactories': eleFactory,
|
'getNodeFactories': eleFactory,
|
||||||
|
Loading…
Reference in New Issue
Block a user