@@ -12,7 +12,7 @@ context('Fusion Studio', function () {
1212 cy . visit ( 'http://localhost:3000' )
1313 . get ( '#theia-top-panel' , { timeout : 30000 } )
1414 . should ( 'be.visible' )
15- . get ( '.theia-preload' ) . should ( 'not.be.visible ' ) ;
15+ . get ( '.theia-preload' ) . should ( 'not.exist ' ) ;
1616 cy . addConnection ( ) ;
1717 cy . get ( '.fusion-item' ) . should ( 'have.length' , 5 ) . its ( 'length' ) . then ( count => {
1818 cy . getTreeNode ( 'admin@http://localhost:8080/db' ) . click ( ) ;
@@ -27,21 +27,7 @@ context('Fusion Studio', function () {
2727 cy . addCollection ( 'admin@http://localhost:8080/db/test_col' , 'col3' ) ;
2828 } )
2929 it ( 'create text document' , function ( ) {
30- cy . waitForLoading ( ) ;
31- cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col' ) . rightclick ( )
32- cy . getSubMenu ( 'New document...' ) . should ( 'be.visible' ) . trigger ( 'mousemove' )
33- cy . getMenuCommand ( 'fusion.new-document' ) . should ( 'be.visible' ) . click ( )
34- cy . get ( dialogTitle ) . should ( 'contain.text' , 'New document' ) ;
35- cy . get ( dialogBody ) . should ( 'be.visible' ) . find ( 'input.theia-input[type=text]' ) . should ( 'contain.value' , 'untitled' ) . type ( 'text_file.txt' ) ;
36- cy . get ( dialogMainButton ) . should ( 'be.visible' ) . click ( ) ;
37- cy . get ( dialog ) . should ( 'not.be.visible' ) ;
38- cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/text_file.txt' ) . should ( 'be.visible' ) ;
39- cy . get ( '.p-Widget.p-TabBar li[title=' + CSS . escape ( 'admin@http://localhost:8080/db/test_col/text_file.txt' ) + ']' )
40- . should ( 'be.visible' ) . click ( )
41- . should ( 'have.class' , 'p-mod-current' ) ;
42- cy . get ( '[role=presentation].editor-scrollable' ) . click ( ) . type ( 'Sample text file content' ) ;
43- cy . get ( '#theia-top-panel .p-MenuBar-item' ) . contains ( 'File' ) . click ( )
44- cy . get ( '.p-Menu-item[data-type=command][data-command=core\\.save]' ) . click ( )
30+ cy . addDocument ( 'admin@http://localhost:8080/db/test_col' , 'text_file.txt' ) ;
4531 } )
4632 } )
4733 describe ( 'Drag and drop' , function ( ) {
@@ -85,24 +71,18 @@ context('Fusion Studio', function () {
8571 cy . waitForLoading ( ) ;
8672 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/text_file.txt' ) . should ( 'be.visible' ) . rightclick ( ) ;
8773 cy . getMenuCommand ( 'fusion.rename' ) . should ( 'be.visible' ) . click ( )
88- cy . get ( dialogTitle ) . should ( 'contain.text' , 'Rename document' ) ;
89- cy . get ( dialogBody ) . should ( 'be.visible' ) . find ( 'input.theia-input[type=text]' ) . should ( 'contain.value' , 'text_file.txt' ) . type ( 'new_name.txt' ) ;
90- cy . get ( dialogMainButton ) . should ( 'be.visible' ) . click ( ) ;
91- cy . get ( dialog ) . should ( 'not.be.visible' ) ;
74+ cy . get ( '.fs-inline-input' ) . should ( 'exist' ) . find ( 'input.theia-input[type=text]' ) . should ( 'contain.value' , 'text_file.txt' ) . clear ( ) . type ( 'new_name.txt{enter}' ) ;
9275 cy . waitForLoading ( ) ;
93- cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/text_file.txt' ) . should ( 'not.be.visible ' ) ;
76+ cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/text_file.txt' ) . should ( 'not.exist ' ) ;
9477 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/new_name.txt' ) . should ( 'be.visible' ) ;
9578 } )
9679 it ( 'rename a collection' , function ( ) {
9780 cy . waitForLoading ( ) ;
9881 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/col1' ) . should ( 'be.visible' ) . rightclick ( ) ;
9982 cy . getMenuCommand ( 'fusion.rename' ) . should ( 'be.visible' ) . click ( )
100- cy . get ( dialogTitle ) . should ( 'contain.text' , 'Rename collection' ) ;
101- cy . get ( dialogBody ) . should ( 'be.visible' ) . find ( 'input.theia-input[type=text]' ) . should ( 'contain.value' , 'col1' ) . type ( 'other_col1' ) ;
102- cy . get ( dialogMainButton ) . should ( 'be.visible' ) . click ( ) ;
103- cy . get ( dialog ) . should ( 'not.be.visible' ) ;
83+ cy . get ( '.fs-inline-input' ) . should ( 'exist' ) . find ( 'input.theia-input[type=text]' ) . should ( 'contain.value' , 'col1' ) . clear ( ) . type ( 'other_col1{enter}' ) ;
10484 cy . waitForLoading ( ) ;
105- cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/col1' ) . should ( 'not.be.visible ' ) ;
85+ cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/col1' ) . should ( 'not.exist ' ) ;
10686 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/other_col1' ) . should ( 'be.visible' ) ;
10787 } )
10888 } )
@@ -114,7 +94,7 @@ context('Fusion Studio', function () {
11494 cy . get ( dialogTitle ) . should ( 'contain.text' , 'Delete document' ) ;
11595 cy . get ( dialogBody ) . should ( 'be.visible' ) . find ( 'p' ) . should ( 'contain.text' , 'Are you sure you want to delete the document: new_name.txt?' ) ;
11696 cy . get ( dialogMainButton ) . should ( 'be.visible' ) . click ( ) ;
117- cy . get ( dialog ) . should ( 'not.be.visible ' ) ;
97+ cy . get ( dialog ) . should ( 'not.exist ' ) ;
11898 cy . waitForLoading ( ) ;
11999 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2/new_name.txt' ) . should ( 'not.exist' ) ;
120100 } )
@@ -132,7 +112,7 @@ context('Fusion Studio', function () {
132112 . should ( 'contain.text' , 'col2' )
133113 . should ( 'contain.text' , 'col3' ) ;
134114 cy . get ( dialogMainButton ) . should ( 'be.visible' ) . click ( ) ;
135- cy . get ( dialog ) . should ( 'not.be.visible ' ) ;
115+ cy . get ( dialog ) . should ( 'not.exist ' ) ;
136116 cy . waitForLoading ( ) ;
137117 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col2' ) . should ( 'not.exist' ) ;
138118 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col/col3' ) . should ( 'not.exist' ) ;
@@ -144,7 +124,7 @@ context('Fusion Studio', function () {
144124 cy . get ( dialogTitle ) . should ( 'contain.text' , 'Delete collection' ) ;
145125 cy . get ( dialogBody ) . should ( 'be.visible' ) . find ( 'p' ) . should ( 'contain.text' , 'Are you sure you want to delete the collection: test_col?' ) ;
146126 cy . get ( dialogMainButton ) . should ( 'be.visible' ) . click ( ) ;
147- cy . get ( dialog ) . should ( 'not.be.visible ' ) ;
127+ cy . get ( dialog ) . should ( 'not.exist ' ) ;
148128 cy . waitForLoading ( ) ;
149129 cy . getTreeNode ( 'admin@http://localhost:8080/db/test_col' ) . should ( 'not.exist' ) ;
150130 } )
0 commit comments