@@ -328,8 +328,14 @@ describe("Entity Modeling: Writer Role", () => {
328328 // Node shows full name on hover
329329 cy . findByText ( "ThisIsVeryLongNameHavingMoreThan20Characters" ) . should ( "exist" ) ;
330330 } ) ;
331+ graphViewSidePanel . getDeleteIcon ( "ThisIsVeryLongNameHavingMoreThan20Characters" ) . click ( ) ;
332+ confirmationModal . getYesButton ( ConfirmationType . DeleteEntity ) ;
333+ confirmationModal . getDeleteEntityText ( ) . should ( "not.exist" ) ;
334+ cy . waitForAsyncRequest ( ) ;
335+ graphViewSidePanel . getSelectedEntityHeading ( "ThisIsVeryLongNameHavingMoreThan20Characters" ) . should ( "not.exist" ) ;
336+ cy . publishEntityModel ( ) ;
331337 } ) ;
332- it ( "Create another entity Patients and add a property " , { defaultCommandTimeout : 120000 } , ( ) => {
338+ it ( "Create another entity Patients and add a properties " , { defaultCommandTimeout : 120000 } , ( ) => {
333339 modelPage . selectView ( "table" ) ;
334340 modelPage . getAddEntityButton ( ) . should ( "exist" ) . click ( ) ;
335341 entityTypeModal . newEntityName ( "Patients" ) ;
@@ -355,8 +361,8 @@ describe("Entity Modeling: Writer Role", () => {
355361 propertyModal . getForeignKey ( "id" ) . click ( ) ;
356362 propertyModal . getSubmitButton ( ) . click ( ) ;
357363 propertyTable . getProperty ( "personType" ) . should ( "exist" ) ;
358- } ) ;
359- it ( " Add second property to Patients Entity and delete it" , ( ) => {
364+
365+ // Add second property to Patients Entity and delete it
360366 propertyTable . getAddPropertyButton ( "Patients" ) . click ( ) ;
361367 propertyModal . newPropertyName ( "patientId" ) ;
362368 propertyModal . openPropertyDropdown ( ) ;
@@ -368,8 +374,8 @@ describe("Entity Modeling: Writer Role", () => {
368374 confirmationModal . getDeletePropertyWarnText ( ) . should ( "exist" ) ;
369375 confirmationModal . getYesButton ( ConfirmationType . DeletePropertyWarn ) ;
370376 propertyTable . getProperty ( "patientId" ) . should ( "not.exist" ) ;
371- } ) ;
372- it ( " Add third property to Patients Entity, publish the changes" , { defaultCommandTimeout : 120000 } , ( ) => {
377+
378+ // Add third property to Patients Entity, publish the changes
373379 propertyTable . getAddPropertyButton ( "Patients" ) . click ( ) ;
374380 propertyModal . newPropertyName ( "health" ) ;
375381 propertyModal . openPropertyDropdown ( ) ;
@@ -451,7 +457,7 @@ describe("Entity Modeling: Writer Role", () => {
451457
452458 graphView . getAddButton ( ) . click ( ) ;
453459 graphView . addNewRelationship ( ) . click ( ) ;
454- graphView . verifyEditInfoMessage ( ) . should ( "be.visible " ) ;
460+ graphView . verifyEditInfoMessage ( ) . should ( "exist " ) ;
455461
456462 //verify create relationship via clicking a node in edit mode
457463 graphVis . getPositionsOfNodes ( ) . then ( ( nodePositions : any ) => {
@@ -507,8 +513,9 @@ describe("Entity Modeling: Writer Role", () => {
507513 cy . wait ( 2000 ) ;
508514 cy . waitForAsyncRequest ( ) ;
509515 graphView . getAddButton ( ) . click ( ) ;
510- graphView . addNewRelationship ( ) . click ( ) ;
511- graphView . verifyEditInfoMessage ( ) . should ( "be.visible" ) ;
516+ cy . waitUntil ( ( ) => graphView . addNewRelationship ( ) . should ( "be.visible" ) ) ;
517+ graphView . addNewRelationship ( ) . click ( { force : true } ) ;
518+ cy . waitUntil ( ( ) => graphView . verifyEditInfoMessage ( ) . should ( "exist" ) ) ;
512519
513520 graphVis . getPositionsOfNodes ( ) . then ( ( nodePositions : any ) => {
514521 let PersonCoordinates : any = nodePositions [ "Person" ] ;
@@ -530,13 +537,18 @@ describe("Entity Modeling: Writer Role", () => {
530537 relationshipModal . editForeignKey ( "firstname" ) ;
531538 relationshipModal . toggleCardinality ( ) ;
532539 relationshipModal . addRelationshipSubmit ( ) ;
540+
533541 cy . waitForAsyncRequest ( ) ;
534- relationshipModal . getModalHeader ( ) . should ( "not.exist" ) ;
542+ cy . wait ( 2000 ) ;
543+ graphView . getAddButton ( ) . click ( ) ;
544+ cy . waitUntil ( ( ) => graphView . addNewRelationship ( ) . should ( "be.visible" ) ) ;
545+ graphView . addNewRelationship ( ) . click ( { force : true } ) ;
546+ cy . waitUntil ( ( ) => graphView . verifyEditInfoMessage ( ) . should ( "exist" ) ) ;
535547
536548 //add second relationship
537549 graphView . getAddButton ( ) . click ( ) ;
538550 graphView . addNewRelationship ( ) . click ( ) ;
539- graphView . verifyEditInfoMessage ( ) . should ( "be.visible " ) ;
551+ graphView . verifyEditInfoMessage ( ) . should ( "exist " ) ;
540552
541553 graphVis . getPositionsOfNodes ( ) . then ( ( nodePositions : any ) => {
542554 let PersonCoordinates : any = nodePositions [ "Person" ] ;
@@ -582,13 +594,6 @@ describe("Entity Modeling: Writer Role", () => {
582594 propertyTable . verifyForeignKeyIcon ( "referredBy" ) . should ( "exist" ) ;
583595
584596 entityTypeTable . viewEntityInGraphView ( "Person" ) ;
585- cy . waitForAsyncRequest ( ) ;
586- //re-enter graph edit mode, verify can exit with {esc}
587- graphView . getAddButton ( ) . click ( ) ;
588- graphView . addNewRelationship ( ) . click ( ) ;
589- graphView . verifyEditInfoMessage ( ) . should ( "be.visible" ) ;
590- graphVis . getGraphVisCanvas ( ) . type ( "{esc}" ) ;
591- graphView . verifyEditInfoMessage ( ) . should ( "not.exist" ) ;
592597 } ) ;
593598
594599 it ( "Delete relationships from graph view" , { defaultCommandTimeout : 120000 } , ( ) => {
0 commit comments