1+ /// <reference types="Cypress" />
2+ context ( 'Basic Operations' , ( ) => {
3+ describe ( 'working with tree view' , ( ) => {
4+ before ( ( ) => {
5+ cy . connect ( )
6+ } )
7+
8+ describe ( 'db context menu' , ( ) => {
9+ // TODO #413
10+ it ( 'should display creation options' , ( ) => {
11+ cy . visit ( '/' )
12+ cy . get ( '.ReactVirtualized__Grid' )
13+ . should ( 'be.visible' )
14+ cy . get ( '.fusion-item' )
15+ . click ( )
16+ // all we need is the final part of the node-id attribute
17+ cy . get ( '[node-id$=db]' )
18+ . rightclick ( )
19+ // TODO(DP): see if not using then allows for better flow
20+ . then ( ( ) => {
21+ cy . get ( '.p-Menu' )
22+ . should ( 'be.visible' )
23+ . contains ( 'New document' )
24+ . trigger ( 'mousemove' )
25+ cy . get ( '[data-command="fusion.new-document"] > .p-Menu-itemLabel' )
26+ . should ( 'be.visible' )
27+ . click ( )
28+ } )
29+ // TODO(DP):
30+ // - add test for #413,
31+ // - check if tree view is deselected,
32+ // - check if Explorer is updated properly,
33+ // - check if editor window is opening the newly create doc in a new tab
34+ // - two routes one with follow-up dialog (xquery lib) one without (txt, xml)
35+ } )
36+
37+ // Get rid of this:
38+ // cy.addDocument(mkApiPathUrl('admin', '/db/test_col'), 'text_file.txt');
39+
40+ it . skip ( 'should let users create documents' , ( ) => {
41+ cy . get ( '[node-id$=db]' )
42+ . click ( )
43+ . type ( '{enter}' )
44+ . contains ( 'untitled' )
45+ } )
46+ } )
47+ } )
48+
49+ describe ( 'working with collections' , ( ) => {
50+ it . skip ( 'should create a connection' , ( ) => {
51+ cy . visit ( '/' )
52+ // see it in action
53+ cy . get ( '.ReactVirtualized__Grid' )
54+ . should ( 'be.visible' )
55+ . should ( 'contain' , 'localhost' )
56+ cy . get ( '.fusion-item' )
57+ . click ( )
58+ . then ( ( ) => {
59+ cy . get ( '.ReactVirtualized__Grid__innerScrollContainer' )
60+ . should ( 'contain' , 'db' )
61+ . should ( 'contain' , 'RestXQ' )
62+ } )
63+ } )
64+
65+ } )
66+
67+
68+ } )
0 commit comments