@@ -328,8 +328,14 @@ describe("Entity Modeling: Writer Role", () => {
328
328
// Node shows full name on hover
329
329
cy . findByText ( "ThisIsVeryLongNameHavingMoreThan20Characters" ) . should ( "exist" ) ;
330
330
} ) ;
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 ( ) ;
331
337
} ) ;
332
- it ( "Create another entity Patients and add a property " , { defaultCommandTimeout : 120000 } , ( ) => {
338
+ it ( "Create another entity Patients and add a properties " , { defaultCommandTimeout : 120000 } , ( ) => {
333
339
modelPage . selectView ( "table" ) ;
334
340
modelPage . getAddEntityButton ( ) . should ( "exist" ) . click ( ) ;
335
341
entityTypeModal . newEntityName ( "Patients" ) ;
@@ -355,8 +361,8 @@ describe("Entity Modeling: Writer Role", () => {
355
361
propertyModal . getForeignKey ( "id" ) . click ( ) ;
356
362
propertyModal . getSubmitButton ( ) . click ( ) ;
357
363
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
360
366
propertyTable . getAddPropertyButton ( "Patients" ) . click ( ) ;
361
367
propertyModal . newPropertyName ( "patientId" ) ;
362
368
propertyModal . openPropertyDropdown ( ) ;
@@ -368,8 +374,8 @@ describe("Entity Modeling: Writer Role", () => {
368
374
confirmationModal . getDeletePropertyWarnText ( ) . should ( "exist" ) ;
369
375
confirmationModal . getYesButton ( ConfirmationType . DeletePropertyWarn ) ;
370
376
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
373
379
propertyTable . getAddPropertyButton ( "Patients" ) . click ( ) ;
374
380
propertyModal . newPropertyName ( "health" ) ;
375
381
propertyModal . openPropertyDropdown ( ) ;
@@ -451,7 +457,7 @@ describe("Entity Modeling: Writer Role", () => {
451
457
452
458
graphView . getAddButton ( ) . click ( ) ;
453
459
graphView . addNewRelationship ( ) . click ( ) ;
454
- graphView . verifyEditInfoMessage ( ) . should ( "be.visible " ) ;
460
+ graphView . verifyEditInfoMessage ( ) . should ( "exist " ) ;
455
461
456
462
//verify create relationship via clicking a node in edit mode
457
463
graphVis . getPositionsOfNodes ( ) . then ( ( nodePositions : any ) => {
@@ -507,8 +513,9 @@ describe("Entity Modeling: Writer Role", () => {
507
513
cy . wait ( 2000 ) ;
508
514
cy . waitForAsyncRequest ( ) ;
509
515
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" ) ) ;
512
519
513
520
graphVis . getPositionsOfNodes ( ) . then ( ( nodePositions : any ) => {
514
521
let PersonCoordinates : any = nodePositions [ "Person" ] ;
@@ -530,13 +537,18 @@ describe("Entity Modeling: Writer Role", () => {
530
537
relationshipModal . editForeignKey ( "firstname" ) ;
531
538
relationshipModal . toggleCardinality ( ) ;
532
539
relationshipModal . addRelationshipSubmit ( ) ;
540
+
533
541
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" ) ) ;
535
547
536
548
//add second relationship
537
549
graphView . getAddButton ( ) . click ( ) ;
538
550
graphView . addNewRelationship ( ) . click ( ) ;
539
- graphView . verifyEditInfoMessage ( ) . should ( "be.visible " ) ;
551
+ graphView . verifyEditInfoMessage ( ) . should ( "exist " ) ;
540
552
541
553
graphVis . getPositionsOfNodes ( ) . then ( ( nodePositions : any ) => {
542
554
let PersonCoordinates : any = nodePositions [ "Person" ] ;
@@ -582,13 +594,6 @@ describe("Entity Modeling: Writer Role", () => {
582
594
propertyTable . verifyForeignKeyIcon ( "referredBy" ) . should ( "exist" ) ;
583
595
584
596
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" ) ;
592
597
} ) ;
593
598
594
599
it ( "Delete relationships from graph view" , { defaultCommandTimeout : 120000 } , ( ) => {
0 commit comments