Skip to content

Commit

Permalink
ignore(_specs): refactor logging
Browse files Browse the repository at this point in the history
start new operations spec
see evolvedbinary#413 evolvedbinary#403
  • Loading branch information
duncdrum committed May 21, 2021
1 parent 337044f commit 1491513
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/01_connection_spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// <reference types="Cypress" />
context('Fusion Studio', () => {
context('Connecting to Servers', () => {
describe('Connection Dialogue', () => {
after(() => {
// cleanup connections after test
Expand Down
6 changes: 3 additions & 3 deletions cypress/integration/02_api-spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/// <reference types="Cypress" />

context('Fusion Studio', function () {
describe('API version', function () {
it('should connect with newer api', function () {
context('Talking to the api directly', () => {
describe('API version', () => {
it('should connect with newer api', () => {
cy.visit('/')
// TODO: Why does this have UUID is the ID stable, this needs a meaningful selector
.get('#d184cace-9938-4ad5-b8df-925a91942661')
Expand Down
4 changes: 2 additions & 2 deletions cypress/integration/03_eval_spec.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/// <reference types="Cypress" />
context('Fusion Studio', () => {
context('Evaluation', () => {
before(() => {
cy.visit('/')
.get('#theia-top-panel')
.should('be.visible')
.get('.theia-preload').should('not.exist')
})

describe('Evaluation panel', () => {
describe('The Theia Panel', () => {
it('should be accessible from command panel', () => {
// invoke command panel and run the command
cy.get('body').trigger('keydown', { keyCode: 112, which: 112 })
Expand Down
68 changes: 68 additions & 0 deletions cypress/integration/04_operations_spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/// <reference types="Cypress" />
context('Basic Operations', () => {
describe('working with tree view', () => {
before(() => {
cy.connect()
})

describe('db context menu', () => {
// TODO #413
it('should display creation options', () => {
cy.visit('/')
cy.get('.ReactVirtualized__Grid')
.should('be.visible')
cy.get('.fusion-item')
.click()
// all we need is the final part of the node-id attribute
cy.get('[node-id$=db]')
.rightclick()
// TODO(DP): see if not using then allows for better flow
.then(() => {
cy.get('.p-Menu')
.should('be.visible')
.contains('New document')
.trigger('mousemove')
cy.get('[data-command="fusion.new-document"] > .p-Menu-itemLabel')
.should('be.visible')
.click()
})
// TODO(DP):
// - add test for #413,
// - check if tree view is deselected,
// - check if Explorer is updated properly,
// - check if editor window is opening the newly create doc in a new tab
// - two routes one with follow-up dialog (xquery lib) one without (txt, xml)
})

// Get rid of this:
// cy.addDocument(mkApiPathUrl('admin', '/db/test_col'), 'text_file.txt');

it.skip('should let users create documents', () => {
cy.get('[node-id$=db]')
.click()
.type('{enter}')
.contains('untitled')
})
})
})

describe('working with collections', () => {
it.skip('should create a connection', () => {
cy.visit('/')
// see it in action
cy.get('.ReactVirtualized__Grid')
.should('be.visible')
.should('contain', 'localhost')
cy.get('.fusion-item')
.click()
.then(() => {
cy.get('.ReactVirtualized__Grid__innerScrollContainer')
.should('contain', 'db')
.should('contain', 'RestXQ')
})
})

})


})

0 comments on commit 1491513

Please sign in to comment.