mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-22 00:37:36 -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={{
|
||||
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>
|
||||
</div>
|
||||
</Box>
|
||||
@ -1001,7 +1001,7 @@ ERDTool.propTypes = {
|
||||
pgAdmin: PropTypes.object.isRequired,
|
||||
panel: PropTypes.object,
|
||||
classes: PropTypes.object,
|
||||
inTest: PropTypes.bool,
|
||||
isTest: PropTypes.bool,
|
||||
};
|
||||
|
||||
export const ERDCanvasSettings = React.createContext({});
|
||||
|
@ -15,7 +15,7 @@ import { PortModelAlignment } from '@projectstorm/react-diagrams';
|
||||
describe('ERDCore', ()=>{
|
||||
let eleFactory = jasmine.createSpyObj('nodeFactories', {
|
||||
'registerFactory': null,
|
||||
'getFactory': jasmine.createSpyObj('getFactory', ['generateModel', 'calculateRoutingMatrix']),
|
||||
'getFactory': jasmine.createSpyObj('getFactory', ['generateModel']),
|
||||
});
|
||||
let erdEngine = jasmine.createSpyObj('engine', {
|
||||
'getNodeFactories': eleFactory,
|
||||
|
Loading…
Reference in New Issue
Block a user