@@ -3,17 +3,17 @@ import { mkApiPathUrl, apiHost, apiPort } from '../support/config.js';
33import '@4tw/cypress-drag-drop'
44import { treenode , dialogTitle , dialogBody , dialogMainButton , dialog } from '../support/utils' ;
55context ( 'Fusion Studio' , function ( ) {
6- afterEach ( function ( ) {
6+ afterEach ( function ( ) {
77 if ( this . currentTest . state === 'failed' ) {
88 Cypress . runner . stop ( )
99 }
1010 } ) ;
1111 describe ( 'Documents and Collections' , function ( ) {
1212 it ( 'Browse to root dir "db"' , function ( ) {
1313 cy . visit ( '/' )
14- . get ( '#theia-top-panel' , { timeout : 60000 } )
15- . should ( 'be.visible' )
16- . get ( '.theia-preload' ) . should ( 'not.exist' ) ;
14+ . get ( '#theia-top-panel' , { timeout : 60000 } )
15+ . should ( 'be.visible' )
16+ . get ( '.theia-preload' ) . should ( 'not.exist' ) ;
1717 cy . addConnection ( ) ;
1818 cy . get ( '.fusion-item' ) . should ( 'have.length' , 5 ) . its ( 'length' ) . then ( count => {
1919 cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db' ) ) . click ( ) ;
@@ -30,9 +30,9 @@ context('Fusion Studio', function () {
3030 cy . addCollection ( mkApiPathUrl ( 'admin' , '/db/test_col' ) , 'col2' ) ;
3131 cy . addCollection ( mkApiPathUrl ( 'admin' , '/db/test_col' ) , 'col3' ) ;
3232 } )
33- it ( 'create text document' , function ( ) {
34- cy . addDocument ( mkApiPathUrl ( 'admin' , '/db/test_col' ) , 'text_file.txt' ) ;
35- } )
33+ // it('create text document', function () {
34+ // cy.addDocument(mkApiPathUrl('admin', '/db/test_col'), 'text_file.txt');
35+ // })
3636 } )
3737 describe ( 'Drag and drop' , function ( ) {
3838 it ( 'drag move document' , function ( ) {
@@ -71,15 +71,15 @@ context('Fusion Studio', function () {
7171 } )
7272 } )
7373 describe ( 'Renaming' , function ( ) {
74- it ( 'rename a document' , function ( ) {
75- cy . waitForLoading ( ) ;
76- cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2/text_file.txt' ) ) . should ( 'be.visible' ) . rightclick ( ) ;
77- cy . getMenuCommand ( 'fusion.rename' ) . should ( 'be.visible' ) . click ( )
78- 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}' ) ;
79- cy . waitForLoading ( ) ;
80- cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2/text_file.txt' ) ) . should ( 'not.exist' ) ;
81- cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2/new_name.txt' ) ) . should ( 'be.visible' ) ;
82- } )
74+ // it('rename a document', function () {
75+ // cy.waitForLoading();
76+ // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/text_file.txt')).should('be.visible').rightclick();
77+ // cy.getMenuCommand('fusion.rename').should('be.visible').click()
78+ // 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}');
79+ // cy.waitForLoading();
80+ // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/text_file.txt')).should('not.exist');
81+ // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/new_name.txt')).should('be.visible');
82+ // })
8383 it ( 'rename a collection' , function ( ) {
8484 cy . waitForLoading ( ) ;
8585 cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2/col1' ) ) . should ( 'be.visible' ) . rightclick ( ) ;
@@ -100,21 +100,21 @@ context('Fusion Studio', function () {
100100 } )
101101 } )
102102 describe ( 'Deleting' , function ( ) {
103- it ( 'delete a document' , function ( ) {
104- cy . waitForLoading ( ) ;
105- cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2/new_name.txt' ) ) . should ( 'be.visible' ) . rightclick ( ) ;
106- cy . getMenuCommand ( 'fusion.delete' ) . should ( 'be.visible' ) . click ( )
107- cy . get ( dialogTitle ) . should ( 'contain.text' , 'Delete document' ) ;
108- cy . get ( dialogBody ) . should ( 'be.visible' ) . find ( 'p' ) . should ( 'contain.text' , 'Are you sure you want to delete the document: new_name.txt?' ) ;
109- cy . get ( dialogMainButton ) . should ( 'be.visible' ) . click ( ) ;
110- cy . get ( dialog ) . should ( 'not.exist' ) ;
111- cy . waitForLoading ( ) ;
112- cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2/new_name.txt' ) ) . should ( 'not.exist' ) ;
113- } )
103+ // it('delete a document', function () {
104+ // cy.waitForLoading();
105+ // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/new_name.txt')).should('be.visible').rightclick();
106+ // cy.getMenuCommand('fusion.delete').should('be.visible').click()
107+ // cy.get(dialogTitle).should('contain.text', 'Delete document');
108+ // cy.get(dialogBody).should('be.visible').find('p').should('contain.text', 'Are you sure you want to delete the document: new_name.txt?');
109+ // cy.get(dialogMainButton).should('be.visible').click();
110+ // cy.get(dialog).should('not.exist');
111+ // cy.waitForLoading();
112+ // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/new_name.txt')).should('not.exist');
113+ // })
114114 it ( 'delete multiple objects' , function ( ) {
115115 cy . waitForLoading ( ) ;
116116 cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2' ) ) . should ( 'be.visible' ) . click ( ) ;
117- cy . get ( 'body' ) . type ( '{ctrl}' , { release : false } )
117+ cy . get ( 'body' ) . type ( '{ctrl}' , { release : false } )
118118 cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col3' ) ) . should ( 'be.visible' ) . click ( ) ;
119119 cy . get ( 'body' ) . type ( '{ctrl}' )
120120 cy . getTreeNode ( mkApiPathUrl ( 'admin' , '/db/test_col/col2' ) ) . should ( 'be.visible' ) . rightclick ( ) ;
@@ -154,6 +154,6 @@ context('Fusion Studio', function () {
154154 // cy.get(dialog).should('not.exist');
155155 // cy.waitForLoading();
156156 // cy.getTreeNode(mkApiPathUrl('admin')).should('not.exist');
157- } )
158157 } )
159158} )
159+ } )
0 commit comments