From 599610d8ea45aeda622a86820f84ec000ac35a57 Mon Sep 17 00:00:00 2001 From: Duncan Paterson Date: Fri, 4 Jun 2021 10:39:09 +0200 Subject: [PATCH 01/10] fix(doc_spec): make save shortcut OS specific --- cypress/integration/04_document_spec.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/cypress/integration/04_document_spec.js b/cypress/integration/04_document_spec.js index c2b49cc2..88caca78 100644 --- a/cypress/integration/04_document_spec.js +++ b/cypress/integration/04_document_spec.js @@ -45,12 +45,32 @@ context('Document Operations', () => { // TODO(DP): make this work on all OS by either adjusting the key sequence ctrl+s cmd+s … // or by using the file menu UI instead + // see https://github.com/cypress-io/cypress/pull/15388/files# // see #414 + + // it('sets focus on search files filters if user presses Cmd + F', () => { + // if (Cypress.platform === 'darwin') { + // cy.get('.filter').type('{cmd}F') + // cy.get('.filter').should('have.focus') + // } + // }) + + // it('sets focus on search files filter if user presses Ctrl + F', () => { + // if (Cypress.platform !== 'darwin') { + // cy.get('.filter').type('{ctrl}F') + // cy.get('.filter').should('have.focus') + // } + // }) it('should let users edit new document', () => { cy.get('[node-id$=untitled-1]') .dblclick() - cy.get('.view-line') + if( Cypress.platform === 'darwin') { + cy.get('.view-line') .type('asdf{meta+s}') + } else { + cy.get('.view-line') + .type('asdf{ctrl+s}') + } }) // see #414 workaround is to run this after editing and saving the document, // we should be able to rename before entering content From f9f7c1197964627bec27ce45068549419a23110f Mon Sep 17 00:00:00 2001 From: duncdrum Date: Fri, 4 Jun 2021 11:42:15 +0200 Subject: [PATCH 02/10] ci(config): bump timeout on CI cleanup TODOs (doc_spec) --- .circleci/config.yml | 2 +- cypress/integration/04_document_spec.js | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e3191ad..c8e22cb9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,7 +66,7 @@ jobs: command: | pwd sleep 15 - npx cypress run --config defaultCommandTimeout=55000 + npx cypress run --config defaultCommandTimeout=58000 no_output_timeout: 2m workflows: browser_build: diff --git a/cypress/integration/04_document_spec.js b/cypress/integration/04_document_spec.js index 88caca78..7ba6d0ae 100644 --- a/cypress/integration/04_document_spec.js +++ b/cypress/integration/04_document_spec.js @@ -43,24 +43,9 @@ context('Document Operations', () => { // - two file create routes one with follow-up dialog (xquery lib) one without (txt, xml) }) - // TODO(DP): make this work on all OS by either adjusting the key sequence ctrl+s cmd+s … - // or by using the file menu UI instead // see https://github.com/cypress-io/cypress/pull/15388/files# // see #414 - // it('sets focus on search files filters if user presses Cmd + F', () => { - // if (Cypress.platform === 'darwin') { - // cy.get('.filter').type('{cmd}F') - // cy.get('.filter').should('have.focus') - // } - // }) - - // it('sets focus on search files filter if user presses Ctrl + F', () => { - // if (Cypress.platform !== 'darwin') { - // cy.get('.filter').type('{ctrl}F') - // cy.get('.filter').should('have.focus') - // } - // }) it('should let users edit new document', () => { cy.get('[node-id$=untitled-1]') .dblclick() @@ -131,7 +116,6 @@ context('Document Operations', () => { }) }) - it('should let users delete documents', () => { cy.get('[node-id$=test\\.xml]') .rightclick() From 2d797b693d4b269442b89e4382af60bb1325036d Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sat, 5 Jun 2021 01:30:03 +0200 Subject: [PATCH 03/10] fix(perm_spec): add permisson tests --- cypress/integration/06_permission_spec.js | 161 +++++++++++++++------- 1 file changed, 114 insertions(+), 47 deletions(-) diff --git a/cypress/integration/06_permission_spec.js b/cypress/integration/06_permission_spec.js index 679ae130..41e7f3c2 100644 --- a/cypress/integration/06_permission_spec.js +++ b/cypress/integration/06_permission_spec.js @@ -1,52 +1,119 @@ /// - context('Permission Manager', () => { describe('working with tree view', () => { - before(() => { - cy.connect() - }) - - describe('db context menu', () => { - it('display users and groups', function () { - // expand users and groups - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security]').should('be.visible').click(); - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/user]').should('be.visible'); - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/group]').should('be.visible'); - // expand and check users - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/user]').click(); - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-user.fs-icon + [node-id*=security\\/user\\/]').should('have.length.gt', 0); - // expand and check groups - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/group]').click(); - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-users.fs-icon + [node-id*=security\\/group\\/]').should('have.length.gt', 0); - }) - it('open user information', function () { - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/user]').should('be.visible'); - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-user.fs-icon + [node-id*=security\\/user\\/]').should('have.length.gt', 0); - const firstUser = cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-user.fs-icon + [node-id*=security\\/user\\/]').first(); - firstUser.then(user => { - const userName = user.text(); - firstUser.rightclick(); - cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=command][data-command=fusion\\.edit-user]').should('be.visible').click(); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogTitle').should('contain.text', 'Edit User: ' + userName); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogContent .pb-body').should('be.visible').find('span + input.theia-input[type=text]').should('have.value', userName); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.secondary').should('be.visible').click(); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell').should('not.exist'); - }); - }) - it('open group information', function () { - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/group]').should('be.visible'); - cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-users.fs-icon + [node-id*=security\\/group\\/]').should('have.length.gt', 0); - const firstGroup = cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-users.fs-icon + [node-id*=security\\/group\\/]').first(); - firstGroup.then(group => { - const groupName = group.text(); - firstGroup.rightclick(); - cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=command][data-command=fusion\\.edit-group]').should('be.visible').click(); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogTitle').should('contain.text', 'Edit Group: ' + groupName); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogContent .pb-body').should('be.visible').find('span + input.theia-input[type=text]').should('have.value', groupName); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.secondary').should('be.visible').click(); - cy.get('.p-Widget.dialogOverlay#theia-dialog-shell').should('not.exist'); - }); - }) + before(() => { + cy.connect() + cy.visit('/') + cy.get(`[node-id=${CSS.escape('admin@' + Cypress.env('API_HOST'))}]`) + .click() + }) + + // TODO(DP): note how the tree expansion for groups and users is memorized we need to clean that up + + describe('the security item', () => { + it('should have user entries', () => { + cy.get('[node-id$=security]') + .click() + cy.get('.ReactVirtualized__Grid') + .contains('Users') + .click() + cy.get('[node-id$=guest]') + .should('be.visible') }) + + it('should let us create a new user', () => { + cy.get('[node-id$=security]') + .rightclick() + cy.get('[data-command="fusion.add-user"]') + .contains('Add') + .should('be.visible') + // TODO(DP): finish creating a test user + }) + + it('should display user properties card', () => { + cy.get('[node-id$=user\\/guest]') + .rightclick() + cy.get('.p-Menu > ul > .p-Menu-item') + .should('be.visible') + .should('have.length', 2) + cy.get('[data-command="fusion.edit-user"]') + .click() + cy.get('.dialogTitle') + .contains('guest') + cy.get('.pb-headers > a') + .should('have.length', 3) + cy.get('.dialogContent') + .contains('Username') + cy.get('.pb-headers > a:nth-child(2)') + .click() + cy.get('.dialogContent') + .contains('Primary group') + cy.get('.pb-headers > a:nth-child(3)') + .click() + cy.get('.active > .pb-tab > .keys > tr') + .should('have.length', 9) + cy.get('.secondary') + .click() + }) + + it.skip('should let us delete a user', () => { + cy.get('.ReactVirtualized__Grid') + .contains('Users') + .click() + cy.get('[node-id$=use\\/guest]') + .should('be.visible') + }) + + }) + + describe('the groups item', () => { + it('should have group entries', () => { + cy.get('.ReactVirtualized__Grid') + .contains('Groups') + .click() + cy.get('[node-id$=group\\/guest]') + .should('be.visible') + }) + + it('should let us create a new group', () => { + cy.get('[node-id$=security]') + .rightclick() + cy.get('[data-command="fusion.add-group"]') + .contains('Add') + .should('be.visible') + // TODO(DP): finish creating a test group + }) + + it('should display group properties card', () => { + cy.get('[node-id$=group\\/guest]') + .rightclick() + cy.get('.p-Menu > ul > .p-Menu-item') + .should('be.visible') + .should('have.length', 2) + cy.get('[data-command="fusion.edit-group"]') + .click() + cy.get('.dialogTitle') + .contains('guest') + cy.get('.pb-headers > a') + .should('have.length', 2) + cy.get('.dialogContent') + .contains('Group name') + cy.get('.pb-headers > a:nth-child(2)') + .click() + cy.get('.active > .pb-tab > .keys > tr') + .should('have.length', 3) + cy.get('.secondary') + .click() + }) + + it.skip('should let us delete a group', () => { + cy.get('.ReactVirtualized__Grid') + .contains('Users') + .click() + cy.get('[node-id$=use\\/guest]') + .should('be.visible') + }) + }) + }) -}) \ No newline at end of file + }) \ No newline at end of file From e3ed17f58334b485ba88a180530693757870d0ad Mon Sep 17 00:00:00 2001 From: duncdrum Date: Sat, 5 Jun 2021 01:32:29 +0200 Subject: [PATCH 04/10] refactor(cy-support): inline all the old things see #378 --- cypress/support/config.js | 18 ++++---- cypress/support/index.d.ts | 50 +++++++++++----------- cypress/support/utils.js | 86 +++++++++++++++++++------------------- 3 files changed, 77 insertions(+), 77 deletions(-) diff --git a/cypress/support/config.js b/cypress/support/config.js index 10db4144..77a02282 100644 --- a/cypress/support/config.js +++ b/cypress/support/config.js @@ -1,15 +1,15 @@ // (DP) rewrite -export const apiHost = 'http://localhost:'; -export const apiPort = '8080'; -export const apiUrl = apiHost + apiPort + "/exist/restxq/fusiondb"; +// export const apiHost = 'http://localhost:'; +// export const apiPort = '8080'; +// export const apiUrl = apiHost + apiPort + "/exist/restxq/fusiondb"; -export function mkApiUrl(apiService) { - return apiHost + apiService; -}; -export function mkApiPathUrl(username, dbPath = '') { - return username + '@' + apiHost + apiPort + dbPath; -}; +// export function mkApiUrl(apiService) { +// return apiHost + apiService; +// }; +// export function mkApiPathUrl(username, dbPath = '') { +// return username + '@' + apiHost + apiPort + dbPath; +// }; // Connection details for the Fusion Studio API diff --git a/cypress/support/index.d.ts b/cypress/support/index.d.ts index 169448e4..2f084e93 100644 --- a/cypress/support/index.d.ts +++ b/cypress/support/index.d.ts @@ -1,27 +1,27 @@ /// -declare namespace Cypress { - interface Cypress { - formatDate(date?: Date): string; - } - interface Chainable { - getMenuCommand(command: string, options: any): Chainable; - getSubMenu(text: string, options: any): Chainable; - getTreeNode(id: string, options: any): Chainable; - getTreeNode(id: string, options: any): Chainable; - addConnection(name?: string, server?: string, username?: string, password?: string): Chainable; - addCollection(id: string, name: string): Chainable; - getDialogOverlay(): Chainable; - getDialog(): Chainable; - getDialogTitle(): Chainable; - getDialogBody(): Chainable; - getDialogFooter(): Chainable; - getDialogButtons(): Chainable; - getDialogMainButton(): Chainable; - getCheckbox(label, options): Chainable; - findCheckbox(label, options): Chainable; - checked(): Chainable; - notChecked(): Chainable; - addDocument(collection: string, name: string, type?: string): Chainable; - } -} \ No newline at end of file +// declare namespace Cypress { +// interface Cypress { +// formatDate(date?: Date): string; +// } +// interface Chainable { +// getMenuCommand(command: string, options: any): Chainable; +// getSubMenu(text: string, options: any): Chainable; +// getTreeNode(id: string, options: any): Chainable; +// getTreeNode(id: string, options: any): Chainable; +// addConnection(name?: string, server?: string, username?: string, password?: string): Chainable; +// addCollection(id: string, name: string): Chainable; +// getDialogOverlay(): Chainable; +// getDialog(): Chainable; +// getDialogTitle(): Chainable; +// getDialogBody(): Chainable; +// getDialogFooter(): Chainable; +// getDialogButtons(): Chainable; +// getDialogMainButton(): Chainable; +// getCheckbox(label, options): Chainable; +// findCheckbox(label, options): Chainable; +// checked(): Chainable; +// notChecked(): Chainable; +// addDocument(collection: string, name: string, type?: string): Chainable; +// } +// } \ No newline at end of file diff --git a/cypress/support/utils.js b/cypress/support/utils.js index 7eb2806a..a119575b 100644 --- a/cypress/support/utils.js +++ b/cypress/support/utils.js @@ -1,41 +1,41 @@ -import { apiHost, apiPort } from '../support/config.js'; +// import { apiHost, apiPort } from '../support/config.js'; // CSS does not require custom approach // see https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-use-special-characters-with-cy-get -export function treenode(id) { - return '[node-id=' + CSS.escape(id) + ']'; -} -export function checkbox() { - return 'span.checkbox'; -} -Cypress.formatDate = (date) => { - if (!date) { - date = new Date(); - } - var month = (date.getMonth() + 1).toString(); - var day = date.getDate().toString(); - if (month.length < 2) { - month = '0' + month; - } - if (day.length < 2) { - day = '0' + day; - } - return day + '-' + month + '-' + date.getUTCFullYear().toString() -} -Cypress.Commands.add('waitForLoading', (options) => cy.wait(50).get('.fs-icon.fa-spinner', { ...options, timeout: options?.timeout || 10000 }).should('not.exist').wait(50)); -Cypress.Commands.add('getMenuCommand', (command, options) => cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=command][data-command=' + CSS.escape(command) + ']', options).should('exist').should('not.have.class', 'p-mod-disabled')); -Cypress.Commands.add('getSubMenu', (text, options) => cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=submenu]', options).should('contain.text', text).should('not.have.class', 'p-mod-disabled')); -Cypress.Commands.add('getTreeNode', (id, options) => cy.get(treenode(id), options)); -Cypress.Commands.add('getCheckbox', (label, options) => { - const result = cy.get(checkbox(label), options); - return label ? result.contains(label) : result; -}); -Cypress.Commands.add('findCheckbox', { prevSubject: true }, (subject, label, options) => { - const result = cy.wrap(subject).find(checkbox(label), options); - return label ? result.contains(label) : result; -}); -Cypress.Commands.add('checked', { prevSubject: true }, subject => cy.wrap(subject).find('.checkbox-box').should('have.class', 'checked')); -Cypress.Commands.add('notChecked', { prevSubject: true }, subject => cy.wrap(subject).find('.checkbox-box').should('not.have.class', 'checked')); +// export function treenode(id) { +// return '[node-id=' + CSS.escape(id) + ']'; +// } +// export function checkbox() { +// return 'span.checkbox'; +// } +// Cypress.formatDate = (date) => { +// if (!date) { +// date = new Date(); +// } +// var month = (date.getMonth() + 1).toString(); +// var day = date.getDate().toString(); +// if (month.length < 2) { +// month = '0' + month; +// } +// if (day.length < 2) { +// day = '0' + day; +// } +// return day + '-' + month + '-' + date.getUTCFullYear().toString() +// } +// Cypress.Commands.add('waitForLoading', (options) => cy.wait(50).get('.fs-icon.fa-spinner', { ...options, timeout: options?.timeout || 10000 }).should('not.exist').wait(50)); +// Cypress.Commands.add('getMenuCommand', (command, options) => cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=command][data-command=' + CSS.escape(command) + ']', options).should('exist').should('not.have.class', 'p-mod-disabled')); +// Cypress.Commands.add('getSubMenu', (text, options) => cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=submenu]', options).should('contain.text', text).should('not.have.class', 'p-mod-disabled')); +// Cypress.Commands.add('getTreeNode', (id, options) => cy.get(treenode(id), options)); +// Cypress.Commands.add('getCheckbox', (label, options) => { +// const result = cy.get(checkbox(label), options); +// return label ? result.contains(label) : result; +// }); +// Cypress.Commands.add('findCheckbox', { prevSubject: true }, (subject, label, options) => { +// const result = cy.wrap(subject).find(checkbox(label), options); +// return label ? result.contains(label) : result; +// }); +// Cypress.Commands.add('checked', { prevSubject: true }, subject => cy.wrap(subject).find('.checkbox-box').should('have.class', 'checked')); +// Cypress.Commands.add('notChecked', { prevSubject: true }, subject => cy.wrap(subject).find('.checkbox-box').should('not.have.class', 'checked')); // Cypress.Commands.add('addConnection', (name = 'localhost', server = apiHost + apiPort, username = 'admin', password = '') => { // cy.get('#theia-top-panel .p-MenuBar-item').contains('File') // .click() @@ -82,11 +82,11 @@ Cypress.Commands.add('notChecked', { prevSubject: true }, subject => cy.wrap(sub // }); // TODO: All of these need to replaced by meaningful selectors in the source-code -export const dialogOverlay = '.p-Widget.dialogOverlay#theia-dialog-shell'; -export const dialog = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock'; -export const dialogTitle = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogTitle'; -export const dialogBody = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogContent'; -export const dialogFooter = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl'; -export const dialogButtons = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button'; -export const dialogMainButton = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.main'; -export const dialogSecondaryButton = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.secondary'; +// export const dialogOverlay = '.p-Widget.dialogOverlay#theia-dialog-shell'; +// export const dialog = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock'; +// export const dialogTitle = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogTitle'; +// export const dialogBody = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogContent'; +// export const dialogFooter = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl'; +// export const dialogButtons = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button'; +// export const dialogMainButton = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.main'; +// export const dialogSecondaryButton = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.secondary'; From a119cec1eedd6a2f4206896aad564a0f30fc1966 Mon Sep 17 00:00:00 2001 From: Charafeddine Cheraa Date: Fri, 4 Jun 2021 10:55:38 +0100 Subject: [PATCH 05/10] updated collection tests and added spies --- cypress/integration/05_collection_spec.js | 273 ++++++++++++---------- 1 file changed, 144 insertions(+), 129 deletions(-) diff --git a/cypress/integration/05_collection_spec.js b/cypress/integration/05_collection_spec.js index ae271990..30e3253c 100644 --- a/cypress/integration/05_collection_spec.js +++ b/cypress/integration/05_collection_spec.js @@ -1,141 +1,156 @@ /// context('Collection Operations', () => { - describe('working with tree view', () => { - before(() => { - cy.connect() - }) + let fetchSpy; + describe('working with tree view', () => { + before(() => { + cy.connect() + cy.visit('/'); + }) + beforeEach(() => { + cy.window().then(win => fetchSpy = cy.spy(win, 'fetch').as('fetch')); + }) - describe('db context menu', () => { - 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() - .then(() => { - cy.get('.p-Menu') - .should('be.visible') - .contains('New collection') - .trigger('mousemove') - cy.get('[data-command="fusion.new-collection"] > .p-Menu-itemLabel') - .should('be.visible') - .click() - }) - // (DP): start workaround for #413 - cy.get('[node-id$=db]') - .trigger('mousemove') - .type('{enter}') - // end workaround for #413 - cy.get('.ReactVirtualized__Grid') - .contains('untitled-1') - }) + describe('db context menu', () => { + it('should display creation options', () => { + cy.get('.fusion-view') + .should('be.visible') + cy.get('.fusion-item') + .click() + // all we need is the final part of the node-id attribute + // (DP): start workaround for #413 + cy.get('[node-id$=db]') + .click() + cy.get('.fa-spinner') + .should('not.exist') + // (DP): end workaround for #413 + cy.get('@fetch').should('be.calledWith', Cypress.env('API_HOST') + '/exist/restxq/fusiondb/explorer?uri=/db'); + cy.get('[node-id$=db]') + .rightclick(); + cy.get('.p-Menu') + .should('be.visible') + .find('[data-command="fusion.new-collection"]') + .should('be.visible') + .contains('New collection') + .click() + cy.focused() + .type('{enter}') + cy.get('.fusion-view') + .contains('untitled-1') + cy.get('@fetch').should('be.calledWithMatch', Cypress.env('API_HOST') + '/exist/restxq/fusiondb/collection?uri=/db/untitled-1', { method: 'PUT' }); + }) - it('should let users rename collection', () => { - cy.get('[node-id$=untitled-1]') - .rightclick() - cy.get('[data-command="fusion.rename"] > .p-Menu-itemLabel') - .should('be.visible') - .click() - .focused() - .type('test_col{enter}') - }) + it('should let users rename collection', () => { + cy.get('[node-id$=untitled-1]') + .rightclick() + cy.get('[data-command="fusion.rename"]') + .should('be.visible') + .contains('Rename') + .click() + cy.focused() + .type('test_col{enter}') + cy.get('@fetch').should('be.calledWithMatch', Cypress.env('API_HOST') + '/exist/restxq/fusiondb/collection?uri=/db/test_col', { + method: 'PUT', + headers: { 'x-fs-move-source': '/db/untitled-1' }, + }); + cy.get('.fusion-view') + .contains('test_col') + cy.get('[node-id$=untitled-1]') + .should('not.exist') + }) - it('should display collection properties', () => { - cy.get('[node-id$=test_col]') - .rightclick() - .type('{alt+enter}', { force: true }) - cy.get('.dialogTitle') - .should('contain.text', 'Properties') - // rename file -> text.xml - cy.get('.value > .theia-input') - .clear() - .type('test_col2') - // check properties table - cy.get('.dialogContent') - .find('.keys > tr') - .should('have.length', 7) - .contains('Created') - cy.get('.dialogContent') - .find('.keys > tr') - .contains('Owner') - // check permissions table - cy.get('.dialogContent') - .find('.permissions-editor > tr') - .should('have.length', 3) - .contains('user') - cy.get('.main') - .click() - }) + it('should display collection properties', () => { + cy.get('[node-id$=test_col]') + .click() + .type('{alt+enter}', { force: true }) + cy.get('.dialogTitle') + .should('contain.text', 'Properties') + // rename file -> text.xml + cy.get('.value > .theia-input') + .should('have.value', 'test_col') + .clear() + .type('test_col2') + // check properties table + cy.get('.dialogContent') + .find('.keys > tr') + .should('have.length', 7) + .should('contain', 'Created') + .should('contain', 'Owner') + .should('contain', 'Group') + // check permissions table + cy.get('.dialogContent') + .find('.permissions-editor > tr') + .should('have.length', 3) + .should('contain', 'user') + .should('contain', 'group') + .should('contain', 'other') + cy.get('.main') + .click() + cy.get('.dialogBlock') + .should('not.exist'); + cy.get('[node-id$=test_col2]') + .should('exist') + cy.get('[node-id$=test_col]') + .should('not.exist') + }) - it('should not create duplicate collection', () => { - cy.get('[node-id$=db]') - .rightclick() - .then(() => { - cy.get('.p-Menu') - .should('be.visible') - .contains('New collection') - .trigger('mousemove') - cy.get('[data-command="fusion.new-collection"] > .p-Menu-itemLabel') - .should('be.visible') - .click() - cy.get('.fs-inline-input > .theia-input') - .clear() - .type('test_col2{enter}') - cy.get('.error') - .should('exist') - .should('contain.text', 'Item already exists') - }) - }) + it('should not create duplicate collection', () => { + cy.get('[node-id$=db]') + .rightclick() + .then(() => { + cy.get('.p-Menu') + .should('be.visible') + .contains('New collection') + .trigger('mousemove') + cy.get('[data-command="fusion.new-collection"]') + .should('be.visible') + .click() + cy.focused() + .clear() + .type('test_col2{enter}') + cy.get('.error') + .should('exist') + .should('contain.text', 'Item already exists') + }) + }) - it('should create nested collection', () => { - cy.get('[node-id$=test_col2]') - .rightclick() - .then(() => { - cy.get('.p-Menu') - .should('be.visible') - .contains('New collection') - .trigger('mousemove') - cy.get('[data-command="fusion.new-collection"] > .p-Menu-itemLabel') - .should('be.visible') - .click() - cy.get('.fs-inline-input > .theia-input') - .clear() - .type('test_colA{enter}') - // TODO(DP): we migh want to check the proper nesting more explicitely, - // but that is already covered by checking for this collection after deleting - // its parent collection - cy.get('.ReactVirtualized__Grid') - .contains('test_colA') - }) - }) + it('should create nested collection', () => { + cy.get('[node-id$=test_col2]') + .click() + .rightclick() + cy.get('.p-Menu') + .should('be.visible') + .contains('New collection') + cy.get('[data-command="fusion.new-collection"]') + .should('be.visible') + .click() + cy.focused() + .clear() + .type('test_colA{enter}') + // TODO(DP): we migh want to check the proper nesting more explicitely, + // but that is already covered by checking for this collection after deleting + // its parent collection + cy.get('.fusion-view') + .contains('test_colA') + }) - it('should let users delete collection', () => { - cy.get('[node-id$=test_col2]') - .rightclick() - cy.get('[data-command="fusion.delete"] > .p-Menu-itemLabel') - .should('be.visible') - .click() - cy.get('.main') - .click() - // make sure all test files are gone see #400 - cy.get('[node-id$=untitled-1]') - .should('not.exist') - cy.get('[node-id$=untitled-2]') - .should('not.exist') - cy.get('[node-id$=test_col]') - .should('not.exist') - cy.get('[node-id$=test_col1]') - .should('not.exist') - cy.get('[node-id$=test_col2]') - .should('not.exist') - cy.get('[node-id$=test_colA]') - .should('not.exist') - }) - }) + it('should let users delete collection', () => { + cy.get('[node-id$=test_col2]') + .rightclick() + cy.get('[data-command="fusion.delete"]') + .should('be.visible') + .contains('Delete') + .click() + cy.get('.main') + .click() + cy.get('@fetch').should('be.calledWithMatch', Cypress.env('API_HOST') + '/exist/restxq/fusiondb/collection?uri=/db/test_col2', { method: 'DELETE' }); + // make sure all test files are gone see #400 + cy.get('[node-id$=test_col2]') + .should('not.exist') + cy.get('[node-id$=test_colA]') + .should('not.exist') + }) }) + }) }) \ No newline at end of file From 9866319c9c4e41f53a86849b89d69399fd41aa7a Mon Sep 17 00:00:00 2001 From: duncdrum Date: Mon, 7 Jun 2021 13:12:20 +0200 Subject: [PATCH 06/10] fix(perm_spec): finish user and groups see #411 #430 --- cypress/integration/06_permission_spec.js | 253 ++++++++++++---------- 1 file changed, 139 insertions(+), 114 deletions(-) diff --git a/cypress/integration/06_permission_spec.js b/cypress/integration/06_permission_spec.js index 41e7f3c2..885e7457 100644 --- a/cypress/integration/06_permission_spec.js +++ b/cypress/integration/06_permission_spec.js @@ -1,119 +1,144 @@ /// context('Permission Manager', () => { - describe('working with tree view', () => { - before(() => { - cy.connect() - cy.visit('/') - cy.get(`[node-id=${CSS.escape('admin@' + Cypress.env('API_HOST'))}]`) - .click() - }) - - // TODO(DP): note how the tree expansion for groups and users is memorized we need to clean that up - - describe('the security item', () => { - it('should have user entries', () => { - cy.get('[node-id$=security]') - .click() - cy.get('.ReactVirtualized__Grid') - .contains('Users') - .click() - cy.get('[node-id$=guest]') - .should('be.visible') - }) - - it('should let us create a new user', () => { - cy.get('[node-id$=security]') - .rightclick() - cy.get('[data-command="fusion.add-user"]') - .contains('Add') - .should('be.visible') - // TODO(DP): finish creating a test user - }) - - it('should display user properties card', () => { - cy.get('[node-id$=user\\/guest]') - .rightclick() - cy.get('.p-Menu > ul > .p-Menu-item') - .should('be.visible') - .should('have.length', 2) - cy.get('[data-command="fusion.edit-user"]') - .click() - cy.get('.dialogTitle') - .contains('guest') - cy.get('.pb-headers > a') - .should('have.length', 3) - cy.get('.dialogContent') - .contains('Username') - cy.get('.pb-headers > a:nth-child(2)') - .click() - cy.get('.dialogContent') - .contains('Primary group') - cy.get('.pb-headers > a:nth-child(3)') - .click() - cy.get('.active > .pb-tab > .keys > tr') - .should('have.length', 9) - cy.get('.secondary') - .click() - }) - - it.skip('should let us delete a user', () => { - cy.get('.ReactVirtualized__Grid') - .contains('Users') - .click() - cy.get('[node-id$=use\\/guest]') - .should('be.visible') - }) - + describe('working with security item', () => { + before(() => { + cy.connect() + cy.visit('/') + cy.get(`[node-id=${CSS.escape('admin@' + Cypress.env('API_HOST'))}]`) + .click() + }) + + it('should have user entries', () => { + cy.get('[node-id$=security]') + .click() + cy.get('.ReactVirtualized__Grid') + .contains('Users') + .click() + cy.get('[node-id$=user\\/guest]') + .should('be.visible') + }) + + it('should have group entries', () => { + cy.get('.ReactVirtualized__Grid') + .contains('Groups') + .click() + cy.get('[node-id$=group\\/guest]') + .should('be.visible') + }) + + // TODO(DP): note how the tree expansion for groups and users is memorized we need to clean that up + describe('the user item', () => { + it('should let us create a new user', () => { + cy.get('[node-id$=security]') + .rightclick() + cy.get('[data-command="fusion.add-user"]') + .contains('Add') + .should('be.visible') + .click() + cy.get(':nth-child(1) > .theia-input') + .type('cy-usr', { force: true }) + // TODO(DP): better selector see #411 + cy.get(':nth-child(2) > :nth-child(1) > .checkbox > .checkbox-box') + .click() + cy.get('.pb-headers > :nth-child(2)') + .click() + // s.a. #411 + cy.get('.awesomplete > .theia-input') + .type('guest{enter}') + cy.get('.main') + .click() + cy.get('[node-id$=user\\/cy-usr]') + .should('be.visible') + }) + + it('should display user properties card', () => { + cy.get('[node-id$=user\\/guest]') + .rightclick() + cy.get('.p-Menu > ul > .p-Menu-item') + .should('be.visible') + .should('have.length', 2) + cy.get('[data-command="fusion.edit-user"]') + .click() + cy.get('.dialogTitle') + .contains('guest') + cy.get('.pb-headers > a') + .should('have.length', 3) + cy.get('.dialogContent') + .contains('Username') + cy.get('.pb-headers > a:nth-child(2)') + .click() + cy.get('.dialogContent') + .contains('Primary group') + cy.get('.pb-headers > a:nth-child(3)') + .click() + cy.get('.active > .pb-tab > .keys > tr') + .should('have.length', 9) + cy.get('.secondary') + .click() }) - - describe('the groups item', () => { - it('should have group entries', () => { - cy.get('.ReactVirtualized__Grid') - .contains('Groups') - .click() - cy.get('[node-id$=group\\/guest]') - .should('be.visible') - }) - - it('should let us create a new group', () => { - cy.get('[node-id$=security]') - .rightclick() - cy.get('[data-command="fusion.add-group"]') - .contains('Add') - .should('be.visible') - // TODO(DP): finish creating a test group - }) - - it('should display group properties card', () => { - cy.get('[node-id$=group\\/guest]') - .rightclick() - cy.get('.p-Menu > ul > .p-Menu-item') - .should('be.visible') - .should('have.length', 2) - cy.get('[data-command="fusion.edit-group"]') - .click() - cy.get('.dialogTitle') - .contains('guest') - cy.get('.pb-headers > a') - .should('have.length', 2) - cy.get('.dialogContent') - .contains('Group name') - cy.get('.pb-headers > a:nth-child(2)') - .click() - cy.get('.active > .pb-tab > .keys > tr') - .should('have.length', 3) - cy.get('.secondary') - .click() - }) - - it.skip('should let us delete a group', () => { - cy.get('.ReactVirtualized__Grid') - .contains('Users') - .click() - cy.get('[node-id$=use\\/guest]') - .should('be.visible') - }) + + it('should let us delete a user', () => { + cy.get('[node-id$=user\\/cy-usr]') + .rightclick() + cy.get('[data-command="fusion.delete-user"]') + .click() + cy.get('.dialogContent') + .contains('Are you sure') + cy.get('.main') + .click() + cy.get('[node-id$=user\\/cy-usr]') + .should('not.exist') + }) + }) + + describe('the groups item', () => { + it('should let us create a new group', () => { + cy.get('[node-id$=security]') + .rightclick() + cy.get('[data-command="fusion.add-group"]') + .contains('Add') + .should('be.visible') + .click() + .focused() + .type('cy-group{enter}', { force: true }) + cy.get('[node-id$=group\\/cy-group]') + .should('be.visible') + }) + + it('should display group properties card', () => { + cy.get('[node-id$=group\\/guest]') + .rightclick() + cy.get('.p-Menu > ul > .p-Menu-item') + .should('be.visible') + .should('have.length', 2) + cy.get('[data-command="fusion.edit-group"]') + .click() + cy.get('.dialogTitle') + .contains('guest') + cy.get('.pb-headers > a') + .should('have.length', 2) + cy.get('.dialogContent') + .contains('Group name') + cy.get('.pb-headers > a:nth-child(2)') + .click() + cy.get('.active > .pb-tab > .keys > tr') + .should('have.length', 3) + cy.get('.secondary') + .click() + }) + + it('should let us delete a group', () => { + cy.get('[node-id$=group\\/cy-group]') + .rightclick() + cy.get('[data-command="fusion.delete-group"]') + .click() + cy.get('.dialogContent') + .contains('Are you sure') + cy.get('.main') + .click() + cy.get('[node-id$=user\\/cy-group]') + .should('not.exist') }) - }) - }) \ No newline at end of file + }) +}) \ No newline at end of file From f2139618fea3b952043ab79ce0e316471d607431 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Mon, 7 Jun 2021 13:29:59 +0200 Subject: [PATCH 07/10] fix(05): make cleanup actualy do its job again --- cypress/integration/05_collection_spec.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cypress/integration/05_collection_spec.js b/cypress/integration/05_collection_spec.js index 30e3253c..3a561b75 100644 --- a/cypress/integration/05_collection_spec.js +++ b/cypress/integration/05_collection_spec.js @@ -145,7 +145,15 @@ context('Collection Operations', () => { cy.get('.main') .click() cy.get('@fetch').should('be.calledWithMatch', Cypress.env('API_HOST') + '/exist/restxq/fusiondb/collection?uri=/db/test_col2', { method: 'DELETE' }); - // make sure all test files are gone see #400 + // make sure all test files are gone see #400, including those produced by failed create commands + cy.get('[node-id$=untitled-1]') + .should('not.exist') + cy.get('[node-id$=untitled-2]') + .should('not.exist') + cy.get('[node-id$=test_col]') + .should('not.exist') + cy.get('[node-id$=test_col1]') + .should('not.exist') cy.get('[node-id$=test_col2]') .should('not.exist') cy.get('[node-id$=test_colA]') From de2e58a468aa465c24f60949d896cca42a0a4931 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Mon, 7 Jun 2021 13:55:19 +0200 Subject: [PATCH 08/10] fix(01-03): reorder based on connection required --- cypress/integration/{02_api-spec.js => 01_api-spec.js} | 0 cypress/integration/{03_eval_spec.js => 02_eval_spec.js} | 0 .../{01_connection_spec.js => 03_connection_spec.js} | 0 cypress/integration/04_document_spec.js | 3 ++- 4 files changed, 2 insertions(+), 1 deletion(-) rename cypress/integration/{02_api-spec.js => 01_api-spec.js} (100%) rename cypress/integration/{03_eval_spec.js => 02_eval_spec.js} (100%) rename cypress/integration/{01_connection_spec.js => 03_connection_spec.js} (100%) diff --git a/cypress/integration/02_api-spec.js b/cypress/integration/01_api-spec.js similarity index 100% rename from cypress/integration/02_api-spec.js rename to cypress/integration/01_api-spec.js diff --git a/cypress/integration/03_eval_spec.js b/cypress/integration/02_eval_spec.js similarity index 100% rename from cypress/integration/03_eval_spec.js rename to cypress/integration/02_eval_spec.js diff --git a/cypress/integration/01_connection_spec.js b/cypress/integration/03_connection_spec.js similarity index 100% rename from cypress/integration/01_connection_spec.js rename to cypress/integration/03_connection_spec.js diff --git a/cypress/integration/04_document_spec.js b/cypress/integration/04_document_spec.js index 7ba6d0ae..22a5e3e7 100644 --- a/cypress/integration/04_document_spec.js +++ b/cypress/integration/04_document_spec.js @@ -4,13 +4,14 @@ context('Document Operations', () => { describe('working with tree view', () => { before(() => { cy.connect() + cy.visit('/') + cy.get(`[node-id=${CSS.escape('admin@' + Cypress.env('API_HOST'))}]`) // TODO(DP): might have to improve by adding more before / after hooks to prevent dangling documents // see #400 }) describe('db context menu', () => { it('should display creation options', () => { - cy.visit('/') cy.get('.ReactVirtualized__Grid', { timeout: 55000 }) .should('be.visible') cy.get('.fusion-item') From f9d2164272488ff87d190382f666e92fe92fcdfc Mon Sep 17 00:00:00 2001 From: duncdrum Date: Mon, 7 Jun 2021 13:57:17 +0200 Subject: [PATCH 09/10] refactor(cypress): delete dead code, treeshaking --- cypress.json | 1 - cypress/integration/00_temp_spec.js | 26 --- cypress/integration/api.js | 65 -------- cypress/integration/operations_spec.js | 159 ------------------ cypress/integration/properties.js | 213 ------------------------- cypress/integration/tree_spec.js | 79 --------- cypress/support/commands.js | 2 +- cypress/support/config.js | 31 ---- cypress/support/index.d.ts | 27 ---- cypress/support/index.js | 2 - cypress/support/utils.js | 92 ----------- package.json | 1 - yarn.lock | 5 - 13 files changed, 1 insertion(+), 702 deletions(-) delete mode 100644 cypress/integration/00_temp_spec.js delete mode 100644 cypress/integration/api.js delete mode 100644 cypress/integration/operations_spec.js delete mode 100644 cypress/integration/properties.js delete mode 100644 cypress/integration/tree_spec.js delete mode 100644 cypress/support/config.js delete mode 100644 cypress/support/index.d.ts delete mode 100644 cypress/support/utils.js diff --git a/cypress.json b/cypress.json index 078b157b..601f65ef 100644 --- a/cypress.json +++ b/cypress.json @@ -2,7 +2,6 @@ "baseUrl": "http://localhost:3000", "ignoreTestFiles": "**/integration/examples/*.*", "projectId": "ftw148", - "experimentalFetchPolyfill": true, "env": { "API_HOST": "http://localhost:8080" } diff --git a/cypress/integration/00_temp_spec.js b/cypress/integration/00_temp_spec.js deleted file mode 100644 index 089f8903..00000000 --- a/cypress/integration/00_temp_spec.js +++ /dev/null @@ -1,26 +0,0 @@ -/// -context('Fusion Studio', () => { - describe('Connection Dialogue', () => { - before(() => { - cy.connect() - }) - - it('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') - }) - }) - - }) - - -}) \ No newline at end of file diff --git a/cypress/integration/api.js b/cypress/integration/api.js deleted file mode 100644 index 97353dd7..00000000 --- a/cypress/integration/api.js +++ /dev/null @@ -1,65 +0,0 @@ -/// -import { mkApiUrl, mkApiPathUrl } from '../support/config.js'; -import { dialogTitle, dialogBody, dialogMainButton, dialog } from '../support/utils'; - -context('Fusion Studio', function () { - describe('API minimum version', function () { - it('should connect with newer api', function () { - cy.visit('/', { - onBeforeLoad(win) { - cy.stub(win, 'fetch').callThrough().withArgs(mkApiUrl('/version')).as('version api').resolves({ - status: 200, - ok: true, - json: () => ({ - "server" : { - "product-name" : "eXist", - "build" : "20200123123609", - "version" : "5.2.0", - "revision" : "c58d04ec45de50e7738489dee072fcc863dc8b1b" - }, - "exist-db" : { - "compatible-version" : null - } - - }), - }); - }, - }).get('#theia-top-panel', {timeout: 60000}) - .should('be.visible') - .get('.theia-preload').should('not.exist'); - cy.addConnection(); - cy.getTreeNode(mkApiPathUrl('admin', '/db')).should('exist'); - }) - // TODO(DP) this test is failing properly it seems, figure out why and adjust test logic - it('shouldn\'t connect with older api', function () { - cy.visit('/', { - onBeforeLoad(win) { - cy.stub(win, 'fetch').callThrough().withArgs(mkApiUrl('/version')).as('version api').resolves({ - status: 200, - ok: true, - json: () => ({ - "server" : { - "product-name" : "eXist", - "build" : "20200123123609", - "version" : "5.2.0", - "revision" : "c58d04ec45de50e7738489dee072fcc863dc8b1b" - }, - "exist-db": { - "compatible-version" : "0.0.1" - } - }), - }); - }, - }).get('#theia-top-panel', {timeout: 60000}) - .should('be.visible') - .get('.theia-preload').should('not.exist'); - cy.addConnection(); - cy.get(dialogTitle).should('contain.text', 'New Connection'); - cy.get(dialogBody).should('be.visible') - .should('contain.text', 'Outdated API "0.0.1"') - .should('contain.text', 'You need to update your API to version "0.2.0" or higher'); - cy.get(dialogMainButton).should('be.visible').click(); - cy.get(dialog).should('not.exist'); - }) - }) -}) diff --git a/cypress/integration/operations_spec.js b/cypress/integration/operations_spec.js deleted file mode 100644 index 56e40a83..00000000 --- a/cypress/integration/operations_spec.js +++ /dev/null @@ -1,159 +0,0 @@ -/// -import { mkApiPathUrl, apiHost, apiPort } from '../support/config.js'; -import '@4tw/cypress-drag-drop' -import { treenode, dialogTitle, dialogBody, dialogMainButton, dialog } from '../support/utils'; -context('Fusion Studio', function () { - afterEach(function () { - if (this.currentTest.state === 'failed') { - Cypress.runner.stop() - } - }); - describe('Documents and Collections', function () { - it('Browse to root dir "db"', function () { - cy.visit('/') - .get('#theia-top-panel', { timeout: 60000 }) - .should('be.visible') - .get('.theia-preload').should('not.exist'); - cy.addConnection(); - cy.get('.fusion-item').should('have.length', 5).its('length').then(count => { - cy.getTreeNode(mkApiPathUrl('admin', '/db')).click(); - cy.get('.fusion-item').should('have.length.gt', count); - }); - }) - // TODO(DP): - // - this needs to clean up after itself to allow for repeated runs in case of failures - // - the "item already exists" warning needs its own test to check if it is visible in case of name clashes - // it('create test collections', function () { - // cy.addCollection(mkApiPathUrl('admin', '/db'), 'test_col'); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).click(); - // cy.addCollection(mkApiPathUrl('admin', '/db/test_col'), 'col1'); - // cy.addCollection(mkApiPathUrl('admin', '/db/test_col'), 'col2'); - // cy.addCollection(mkApiPathUrl('admin', '/db/test_col'), 'col3'); - // }) - // it('create text document', function () { - // cy.addDocument(mkApiPathUrl('admin', '/db/test_col'), 'text_file.txt'); - // }) - }) - describe('Drag and drop', function () { - it('drag move document', function () { - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/text_file.txt')).should('be.visible') - .drag(treenode(mkApiPathUrl('admin', '/db/test_col/col1')), { hoverTime: 1000 }); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/text_file.txt')).should('not.exist'); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col1/text_file.txt')).should('be.visible'); - }) - it('drag copy document', function () { - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col1/text_file.txt')) - .drag(treenode(mkApiPathUrl('admin', '/db/test_col/col2')), { ctrlKey: true, hoverTime: 1000 }); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col1/text_file.txt')).should('be.visible'); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/text_file.txt')).should('be.visible'); - }) - it('drag copy collection', function () { - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col1')).should('be.visible') - .drag(treenode(mkApiPathUrl('admin', '/db/test_col/col2')), { ctrlKey: true, hoverTime: 1000 }); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col1')).should('be.visible'); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/col1')).should('be.visible').click(); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/col1/text_file.txt')).should('be.visible'); - }) - it('drag move collection', function () { - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col1')).should('be.visible') - .drag(treenode(mkApiPathUrl('admin', '/db/test_col/col3')), { hoverTime: 1000 }); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col3/col1')).should('be.visible'); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col1')).should('not.exist'); - }) - }) - describe('Renaming', function () { - // it('rename a document', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/text_file.txt')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.rename').should('be.visible').click() - // 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}'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/text_file.txt')).should('not.exist'); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/new_name.txt')).should('be.visible'); - // }) - // it('rename a collection', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/col1')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.rename').should('be.visible').click() - // cy.get('.fs-inline-input').should('exist').find('input.theia-input[type=text]').should('contain.value', 'col1').clear().type('other_col1{enter}'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/col1')).should('not.exist'); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/other_col1')).should('be.visible'); - // }) - // TODO(DP): add to connection_spec - // it('rename a connection', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.rename').should('be.visible').click() - // cy.get('.fs-inline-input').should('exist').find('input.theia-input[type=text]').should('contain.value', 'localhost').clear().type('new_name{enter}'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin')).should('be.visible').contains('new_name'); - // }) - }) - describe('Deleting', function () { - // it('delete a document', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/new_name.txt')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.delete').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Delete document'); - // cy.get(dialogBody).should('be.visible').find('p').should('contain.text', 'Are you sure you want to delete the document: new_name.txt?'); - // cy.get(dialogMainButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2/new_name.txt')).should('not.exist'); - // }) - it('delete multiple objects', function () { - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2')).should('be.visible').click(); - cy.get('body').type('{ctrl}', { release: false }) - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col3')).should('be.visible').click(); - cy.get('body').type('{ctrl}') - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2')).should('be.visible').rightclick(); - cy.getMenuCommand('fusion.delete').should('be.visible').click() - cy.get(dialogTitle).should('contain.text', 'Delete items'); - cy.get(dialogBody).should('be.visible').find('p') - .should('contain.text', 'Are you sure you want to delete the following items?') - .should('contain.text', 'col2') - .should('contain.text', 'col3'); - cy.get(dialogMainButton).should('be.visible').click(); - cy.get(dialog).should('not.exist'); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col2')).should('not.exist'); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/col3')).should('not.exist'); - }) - // it('delete a collection', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.delete').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Delete collection'); - // cy.get(dialogBody).should('be.visible').find('p').should('contain.text', 'Are you sure you want to delete the collection: test_col?'); - // cy.get(dialogMainButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).should('not.exist'); - // }) - // it('delete a connection', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.disconnect').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Remove Connection'); - // cy.get(dialogBody).should('be.visible').find('p') - // .should('contain.text', 'Are you sure you want to remove the connection: new_name?') - // .should('contain.text', `Server URI: ${apiHost}${apiPort}`) - // .should('contain.text', 'Username: admin'); - // cy.get(dialogMainButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin')).should('not.exist'); - }) -}) -}) diff --git a/cypress/integration/properties.js b/cypress/integration/properties.js deleted file mode 100644 index 66d49453..00000000 --- a/cypress/integration/properties.js +++ /dev/null @@ -1,213 +0,0 @@ -/// -import { mkApiPathUrl, apiHost, apiPort } from '../support/config.js'; -import '@4tw/cypress-drag-drop' -import { dialogTitle, dialogBody, dialogMainButton, dialogSecondaryButton, dialog } from '../support/utils'; - -// TODO(DP): these tests need to be folded into the operations_spec where we create object in the first place, -// no need to repeat 90% of actions, just to check visbility of a single pane -// this will also take care of the repeated runs problem, where collection already exist warning pollute the db -context('Properties dialog', function () { - afterEach(function () { - if (this.currentTest.state === 'failed') { - Cypress.runner.stop() - } - }); - after(function () { - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/new_test_col')).rightclick(); - cy.getMenuCommand('fusion.delete').click() - cy.get(dialogMainButton).click(); - }); - before(function () { - cy.visit('/') - .get('#theia-top-panel', { timeout: 60000 }) - .should('be.visible') - .get('.theia-preload').should('not.exist'); - cy.addConnection(); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db')).click(); - cy.addCollection(mkApiPathUrl('admin', '/db'), 'test_col'); - cy.waitForLoading(); - cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).click(); - cy.addDocument(mkApiPathUrl('admin', '/db/test_col'), 'text_file.txt') - cy.addDocument(mkApiPathUrl('admin', '/db/test_col'), 'xml_file.xml', 'xml') - }) - describe('Correct information', function () { - // TODO(DP): decide what to do with this add to operations_spec - // switch to bevaior testing, sumary testing every single box that is visible - // it('Document properties', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/text_file.txt')).rightclick() - // .getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Properties'); - // cy.get(dialogBody).should('be.visible').then(body => { - // cy.wrap(body).find('td.label').contains('Name') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'text_file.txt'); - // cy.wrap(body).find('td.label').contains('Collection') - // .find('+ td.value').should('contain.text', '/db/test_col'); - // cy.wrap(body).find('td.label').contains('Created') - // .find('+ td.value').should('contain.text', Cypress.formatDate()); - // cy.wrap(body).find('td.label').contains('Modified') - // .find('+ td.value').should('contain.text', Cypress.formatDate()); - // cy.wrap(body).find('td.label').contains('Media Type') - // .find('+ td.value').should('contain.text', 'text/plain'); - // cy.wrap(body).find('td.label').contains('Binary') - // .find('+ td.value').should('contain.text', 'Yes') - // .find('button.theia-button').should('contain.text', 'Convert to non-binary'); - // cy.wrap(body).find('td.label').contains('Size') - // .find('+ td.value').should('contain.text', '24 B'); - // cy.wrap(body).find('td.label').contains('Owner') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'admin'); - // cy.wrap(body).find('td.label').contains('Group') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'dba'); - // cy.wrap(body).find('table.permissions-editor tr').then(trs => { - // cy.wrap(trs).eq(0).find('td').then(tds => { - // cy.wrap(tds).eq(0).should('contain.text', 'user'); - // cy.wrap(tds).eq(1).findCheckbox().should('contain.text', 'read').checked(); - // cy.wrap(tds).eq(2).findCheckbox().should('contain.text', 'write').checked(); - // cy.wrap(tds).eq(3).findCheckbox().should('contain.text', 'execute').notChecked(); - // cy.wrap(tds).eq(4).findCheckbox().should('contain.text', 'setUID').notChecked(); - // }); - // cy.wrap(trs).eq(1).find('td').then(tds => { - // cy.wrap(tds).eq(0).should('contain.text', 'group'); - // cy.wrap(tds).eq(1).findCheckbox().should('contain.text', 'read').checked(); - // cy.wrap(tds).eq(2).findCheckbox().should('contain.text', 'write').notChecked(); - // cy.wrap(tds).eq(3).findCheckbox().should('contain.text', 'execute').notChecked(); - // cy.wrap(tds).eq(4).findCheckbox().should('contain.text', 'setGID').notChecked(); - // }); - // cy.wrap(trs).eq(2).find('td').then(tds => { - // cy.wrap(tds).eq(0).should('contain.text', 'other'); - // cy.wrap(tds).eq(1).findCheckbox().should('contain.text', 'read').checked(); - // cy.wrap(tds).eq(2).findCheckbox().should('contain.text', 'write').notChecked(); - // cy.wrap(tds).eq(3).findCheckbox().should('contain.text', 'execute').notChecked(); - // cy.wrap(tds).eq(4).findCheckbox().should('contain.text', 'sticky').notChecked(); - // }); - // }); - // }); - // cy.get(dialogSecondaryButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/xml_file.xml')).rightclick() - // .getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogBody).should('be.visible').find('td.label').contains('Binary') - // .find('+ td.value').should('contain.text', 'No') - // .find('button.theia-button').should('contain.text', 'Convert to binary'); - // cy.get(dialogSecondaryButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // }) - // it('Collection properties', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).rightclick() - // .getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Properties'); - // cy.get(dialogBody).should('be.visible').then(body => { - // cy.wrap(body).find('td.label').contains('Name') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'test_col'); - // cy.wrap(body).find('td.label').contains('Collection') - // .find('+ td.value').should('contain.text', '/db'); - // cy.wrap(body).find('td.label').contains('Created') - // .find('+ td.value').should('contain.text', Cypress.formatDate()); - // cy.wrap(body).find('td.label').contains('Owner') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'admin'); - // cy.wrap(body).find('td.label').contains('Group') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'dba'); - // cy.wrap(body).find('table.permissions-editor tr').then(trs => { - // cy.wrap(trs).eq(0).find('td').then(tds => { - // cy.wrap(tds).eq(0).should('contain.text', 'user'); - // cy.wrap(tds).eq(1).findCheckbox().should('contain.text', 'read').checked(); - // cy.wrap(tds).eq(2).findCheckbox().should('contain.text', 'write').checked(); - // cy.wrap(tds).eq(3).findCheckbox().should('contain.text', 'execute').checked(); - // cy.wrap(tds).eq(4).findCheckbox().should('contain.text', 'setUID').notChecked(); - // }); - // cy.wrap(trs).eq(1).find('td').then(tds => { - // cy.wrap(tds).eq(0).should('contain.text', 'group'); - // cy.wrap(tds).eq(1).findCheckbox().should('contain.text', 'read').checked(); - // cy.wrap(tds).eq(2).findCheckbox().should('contain.text', 'write').notChecked(); - // cy.wrap(tds).eq(3).findCheckbox().should('contain.text', 'execute').checked(); - // cy.wrap(tds).eq(4).findCheckbox().should('contain.text', 'setGID').notChecked(); - // }); - // cy.wrap(trs).eq(2).find('td').then(tds => { - // cy.wrap(tds).eq(0).should('contain.text', 'other'); - // cy.wrap(tds).eq(1).findCheckbox().should('contain.text', 'read').checked(); - // cy.wrap(tds).eq(2).findCheckbox().should('contain.text', 'write').notChecked(); - // cy.wrap(tds).eq(3).findCheckbox().should('contain.text', 'execute').checked(); - // cy.wrap(tds).eq(4).findCheckbox().should('contain.text', 'sticky').notChecked(); - // }); - // }); - // cy.get(dialogSecondaryButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // cy.getTreeNode(mkApiPathUrl('admin', '/db')).rightclick() - // .getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogBody).should('be.visible').find('td.label').should('not.contain.text', 'Collection'); - // cy.get(dialogSecondaryButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // }); - // }) - // it('Connection properties', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin')).rightclick() - // .getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Edit Connection'); - // cy.get(dialogBody).should('be.visible').then(body => { - // cy.wrap(body).find('.vertical-form .name-field span').contains('Connection Name:') - // .find('+ input.theia-input[type=text]').should('have.value', 'localhost'); - // cy.wrap(body).find('.vertical-form .server-field span').contains('Server URI:') - // .find('+ input.theia-input[type=text]').should('have.value', apiHost + apiPort); - // cy.wrap(body).find('.vertical-form .username-field span').contains('Username:') - // .find('+ input.theia-input[type=text]').should('have.value', 'admin'); - // cy.wrap(body).find('.vertical-form .password-field span').contains('Password') - // .find('+ input.theia-input[type=password]').should('have.value', ''); - // cy.get(dialogSecondaryButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // }); - // }) - }) - describe('Renaming objects', function () { - // it('Rename a connection', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin')).rightclick() - // .getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Edit Connection'); - // cy.get(dialogBody).should('be.visible').then(body => { - // cy.wrap(body).find('.vertical-form .name-field span').contains('Connection Name:') - // .find('+ input.theia-input[type=text]').should('have.value', 'localhost').clear().type('new_name'); - // cy.get(dialogMainButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // }); - // cy.getTreeNode(mkApiPathUrl('admin')).should('be.visible').contains('new_name'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db')).click(); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).click(); - // }) - - // // TODO(DP): Add second rename route via properties to document_spec - // it('rename a document', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/text_file.txt')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Properties'); - // cy.get(dialogBody).should('be.visible') - // .find('td.label').contains('Name') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'text_file.txt').type('new_name.txt'); - // cy.get(dialogMainButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/text_file.txt')).should('not.exist'); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col/new_name.txt')).should('be.visible'); - // }) - // it('rename a collection', function () { - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).should('be.visible').rightclick(); - // cy.getMenuCommand('fusion.properties').should('be.visible').click() - // cy.get(dialogTitle).should('contain.text', 'Properties'); - // cy.get(dialogBody).should('be.visible') - // .find('td.label').contains('Name') - // .find('+ td.value input.theia-input[type=text]').should('contain.value', 'test_col').type('new_test_col'); - // cy.get(dialogMainButton).should('be.visible').click(); - // cy.get(dialog).should('not.exist'); - // cy.waitForLoading(); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/test_col')).should('not.exist'); - // cy.getTreeNode(mkApiPathUrl('admin', '/db/new_test_col')).should('be.visible'); - // }) - }) -}) diff --git a/cypress/integration/tree_spec.js b/cypress/integration/tree_spec.js deleted file mode 100644 index f55e9cf5..00000000 --- a/cypress/integration/tree_spec.js +++ /dev/null @@ -1,79 +0,0 @@ -/// -import { apiHost, apiPort } from '../support/config.js'; -// TODO(DP): more folding in here -context('Fusion Studio', function() { - describe('Security', function() { - before('Connect', function () { - cy.visit('/') - .get('#theia-top-panel', {timeout: 60000}) - .should('be.visible') - .get('.theia-preload').should('not.exist'); - cy.get(':nth-child(1) > .p-MenuBar-itemLabel') - .click() - .then(() => { - cy.get('[data-command="fusion.connect"] > .p-Menu-itemLabel') - .contains('New Server.') - .trigger('mousemove') - .click() - }) - // set connection credentials - cy.get('div.name-field > input').clear().type(apiHost) - cy.get('div.server-field > input').clear().type(apiHost + apiPort) - cy.get('div.username-field > input').clear().type('admin') - cy.get('div.password-field > input').clear() - // open connection - cy.get('.main').click() - // see it in action - cy.get('.ReactVirtualized__Grid') - .should('be.visible') - .should('contain', apiHost) - cy.get('.fusion-item') - .click() - .then(() => { - cy.get('.ReactVirtualized__Grid__innerScrollContainer') - .should('contain', 'db') - .should('contain', 'RestXQ') - }) - }); - // it('display users and groups', function() { - // // expand users and groups - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security]').should('be.visible').click(); - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/user]').should('be.visible'); - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/group]').should('be.visible'); - // // expand and check users - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/user]').click(); - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-user.fs-icon + [node-id*=security\\/user\\/]').should('have.length.gt', 0); - // // expand and check groups - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/group]').click(); - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-users.fs-icon + [node-id*=security\\/group\\/]').should('have.length.gt', 0); - // }) - // it('open user information', function() { - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/user]').should('be.visible'); - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-user.fs-icon + [node-id*=security\\/user\\/]').should('have.length.gt', 0); - // const firstUser = cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-user.fs-icon + [node-id*=security\\/user\\/]').first(); - // firstUser.then(user => { - // const userName = user.text(); - // firstUser.rightclick(); - // cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=command][data-command=fusion\\.edit-user]').should('be.visible').click(); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogTitle').should('contain.text', 'Edit User: ' + userName); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogContent .pb-body').should('be.visible').find('span + input.theia-input[type=text]').should('have.value', userName); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.secondary').should('be.visible').click(); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell').should('not.exist'); - // }); - // }) - // it('open group information', function() { - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item [node-id$=security\\/group]').should('be.visible'); - // cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-users.fs-icon + [node-id*=security\\/group\\/]').should('have.length.gt', 0); - // const firstGroup = cy.get('.p-Widget.theia-Tree .theia-TreeNode.fusion-item .fa-users.fs-icon + [node-id*=security\\/group\\/]').first(); - // firstGroup.then(group => { - // const groupName = group.text(); - // firstGroup.rightclick(); - // cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=command][data-command=fusion\\.edit-group]').should('be.visible').click(); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogTitle').should('contain.text', 'Edit Group: ' + groupName); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogContent .pb-body').should('be.visible').find('span + input.theia-input[type=text]').should('have.value', groupName); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.secondary').should('be.visible').click(); - // cy.get('.p-Widget.dialogOverlay#theia-dialog-shell').should('not.exist'); - // }); - // }) - }) -}) diff --git a/cypress/support/commands.js b/cypress/support/commands.js index 8697e81e..8a7a327f 100644 --- a/cypress/support/commands.js +++ b/cypress/support/commands.js @@ -10,7 +10,7 @@ // // // see https://github.com/javierbrea/cypress-localstorage-commands -import "cypress-localstorage-commands" +// import "cypress-localstorage-commands" // -- This is a parent command -- // populate localStorage with a default connection, automatically cleared before each spec diff --git a/cypress/support/config.js b/cypress/support/config.js deleted file mode 100644 index 77a02282..00000000 --- a/cypress/support/config.js +++ /dev/null @@ -1,31 +0,0 @@ -// (DP) rewrite - -// export const apiHost = 'http://localhost:'; -// export const apiPort = '8080'; -// export const apiUrl = apiHost + apiPort + "/exist/restxq/fusiondb"; - -// export function mkApiUrl(apiService) { -// return apiHost + apiService; -// }; -// export function mkApiPathUrl(username, dbPath = '') { -// return username + '@' + apiHost + apiPort + dbPath; -// }; - - -// Connection details for the Fusion Studio API -// export const apiScheme = "http"; -// export const apiHost = "localhost"; -// export const apiPort = Cypress.env('API_PORT'); -// export const apiUrl = apiScheme + "://" + apiHost + ":" + apiPort + "/exist/restxq/fusiondb"; -// export function mkApiUrl(apiService) { -// return apiUrl + apiService; -// }; -// export function mkApiPathUrl(username, dbPath = '') { -// return username + '@' + apiScheme + '://' + apiHost + ':' + apiPort + dbPath; -// }; - -// Connection details for the Fusion Studio Browser App -// export const fsScheme = "http"; -// export const fsHost = "localhost"; -// export const fsPort = Cypress.env('FS_PORT'); -// export const fsUrl = fsScheme + "://" + fsHost + ":" + fsPort; diff --git a/cypress/support/index.d.ts b/cypress/support/index.d.ts deleted file mode 100644 index 2f084e93..00000000 --- a/cypress/support/index.d.ts +++ /dev/null @@ -1,27 +0,0 @@ -/// - -// declare namespace Cypress { -// interface Cypress { -// formatDate(date?: Date): string; -// } -// interface Chainable { -// getMenuCommand(command: string, options: any): Chainable; -// getSubMenu(text: string, options: any): Chainable; -// getTreeNode(id: string, options: any): Chainable; -// getTreeNode(id: string, options: any): Chainable; -// addConnection(name?: string, server?: string, username?: string, password?: string): Chainable; -// addCollection(id: string, name: string): Chainable; -// getDialogOverlay(): Chainable; -// getDialog(): Chainable; -// getDialogTitle(): Chainable; -// getDialogBody(): Chainable; -// getDialogFooter(): Chainable; -// getDialogButtons(): Chainable; -// getDialogMainButton(): Chainable; -// getCheckbox(label, options): Chainable; -// findCheckbox(label, options): Chainable; -// checked(): Chainable; -// notChecked(): Chainable; -// addDocument(collection: string, name: string, type?: string): Chainable; -// } -// } \ No newline at end of file diff --git a/cypress/support/index.js b/cypress/support/index.js index e0c00f9a..d68db96d 100644 --- a/cypress/support/index.js +++ b/cypress/support/index.js @@ -14,9 +14,7 @@ // *********************************************************** // Import commands.js using ES2015 syntax: -import './config' import './commands' -import './utils' // Alternatively you can use CommonJS syntax: // require('./commands') diff --git a/cypress/support/utils.js b/cypress/support/utils.js deleted file mode 100644 index a119575b..00000000 --- a/cypress/support/utils.js +++ /dev/null @@ -1,92 +0,0 @@ -// import { apiHost, apiPort } from '../support/config.js'; - -// CSS does not require custom approach -// see https://docs.cypress.io/faq/questions/using-cypress-faq#How-do-I-use-special-characters-with-cy-get -// export function treenode(id) { -// return '[node-id=' + CSS.escape(id) + ']'; -// } -// export function checkbox() { -// return 'span.checkbox'; -// } -// Cypress.formatDate = (date) => { -// if (!date) { -// date = new Date(); -// } -// var month = (date.getMonth() + 1).toString(); -// var day = date.getDate().toString(); -// if (month.length < 2) { -// month = '0' + month; -// } -// if (day.length < 2) { -// day = '0' + day; -// } -// return day + '-' + month + '-' + date.getUTCFullYear().toString() -// } -// Cypress.Commands.add('waitForLoading', (options) => cy.wait(50).get('.fs-icon.fa-spinner', { ...options, timeout: options?.timeout || 10000 }).should('not.exist').wait(50)); -// Cypress.Commands.add('getMenuCommand', (command, options) => cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=command][data-command=' + CSS.escape(command) + ']', options).should('exist').should('not.have.class', 'p-mod-disabled')); -// Cypress.Commands.add('getSubMenu', (text, options) => cy.get('.p-Widget.p-Menu .p-Menu-item[data-type=submenu]', options).should('contain.text', text).should('not.have.class', 'p-mod-disabled')); -// Cypress.Commands.add('getTreeNode', (id, options) => cy.get(treenode(id), options)); -// Cypress.Commands.add('getCheckbox', (label, options) => { -// const result = cy.get(checkbox(label), options); -// return label ? result.contains(label) : result; -// }); -// Cypress.Commands.add('findCheckbox', { prevSubject: true }, (subject, label, options) => { -// const result = cy.wrap(subject).find(checkbox(label), options); -// return label ? result.contains(label) : result; -// }); -// Cypress.Commands.add('checked', { prevSubject: true }, subject => cy.wrap(subject).find('.checkbox-box').should('have.class', 'checked')); -// Cypress.Commands.add('notChecked', { prevSubject: true }, subject => cy.wrap(subject).find('.checkbox-box').should('not.have.class', 'checked')); -// Cypress.Commands.add('addConnection', (name = 'localhost', server = apiHost + apiPort, username = 'admin', password = '') => { -// cy.get('#theia-top-panel .p-MenuBar-item').contains('File') -// .click() -// .then(() => { -// cy.get('[data-command="fusion.connect"] > .p-Menu-itemLabel') -// .contains('New Server.') -// .trigger('mousemove') -// .click() -// }) -// // set connection credentials -// cy.get('div.name-field > input').clear().type(name) -// cy.get('div.server-field > input').clear().type(server) -// cy.get('div.username-field > input').clear().type(username) -// const passwordField = cy.get('div.password-field > input').clear(); -// if (password) { -// passwordField.type(password); -// } -// cy.get(dialogMainButton).click(); -// cy.getTreeNode(username + '@' + server).click(); -// // TODO get rid of custom commands for this, use inbuild functions for waiting where necessary -// cy.waitForLoading(); -// }); -// Cypress.Commands.add('addCollection', (id, name) => { -// cy.waitForLoading(); -// cy.getTreeNode(id).rightclick() -// cy.getMenuCommand('fusion.new-collection').should('be.visible').click(); -// cy.get('.fs-inline-input').should('exist').find('input.theia-input[type=text]').should('contain.value', 'untitled').type(name + '{enter}'); -// cy.get('.fs-inline-input').should('not.exist'); -// cy.waitForLoading(); -// cy.getTreeNode(id + '/' + name).should('be.visible'); -// }); -// Cypress.Commands.add('addDocument', (collection, name, type = '') => { -// cy.waitForLoading(); -// const command = 'fusion.new-document' + (type ? '-template:' + type : ''); -// cy.getTreeNode(collection).rightclick() -// cy.getSubMenu('New document...').trigger('mousemove').getMenuCommand(command).should('be.visible').click(); -// cy.get('.fs-inline-input').should('exist').find('input.theia-input[type=text]').should('contain.value', 'untitled').clear().type(name + '{enter}'); -// if (type === '') { -// cy.get('.p-Widget.p-TabBar li[title=' + CSS.escape(collection + '/' + name) + ']').click(); -// cy.get('[role=presentation].editor-scrollable').click().type('Sample text file content'); -// } -// cy.get('#theia-top-panel .p-MenuBar-item').contains('File').click() -// cy.get('.p-Menu-item[data-type=command][data-command=core\\.save]').click() -// }); - -// TODO: All of these need to replaced by meaningful selectors in the source-code -// export const dialogOverlay = '.p-Widget.dialogOverlay#theia-dialog-shell'; -// export const dialog = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock'; -// export const dialogTitle = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogTitle'; -// export const dialogBody = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogContent'; -// export const dialogFooter = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl'; -// export const dialogButtons = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button'; -// export const dialogMainButton = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.main'; -// export const dialogSecondaryButton = '.p-Widget.dialogOverlay#theia-dialog-shell .dialogBlock .dialogControl .theia-button.secondary'; diff --git a/package.json b/package.json index 2e7d22e5..20fb6cc8 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "@4tw/cypress-drag-drop": "https://github.com/ccheraa/cypress-drag-drop", "chai": "^4.3.4", "cypress": "7.4.0", - "cypress-localstorage-commands": "^1.4.4", "lerna": "4.0.0", "mocha": "^8.4.0", "node-sass": "6.0.0", diff --git a/yarn.lock b/yarn.lock index 214e805a..d94a9efc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5623,11 +5623,6 @@ cyclist@^1.0.1: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= -cypress-localstorage-commands@^1.4.4: - version "1.4.4" - resolved "https://registry.yarnpkg.com/cypress-localstorage-commands/-/cypress-localstorage-commands-1.4.4.tgz#96ebce71b78895bd34a96c6d424b5de18a257b82" - integrity sha512-j502dbaQxTkz8iXYPClpYn2AIFyMZvvODNNHVZVoKBSkKOEuWAx3/RT4RvH0naV4/T05oUw2O9Cm5VxeZbyxiw== - cypress@7.4.0: version "7.4.0" resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.4.0.tgz#679bfe75335b9a4873d44f0d989e9f0367f00665" From 0616399558ef6e8dff7e72be4c8259e6d5d08020 Mon Sep 17 00:00:00 2001 From: duncdrum Date: Tue, 8 Jun 2021 12:00:15 +0200 Subject: [PATCH 10/10] chore(deps): bump cypress close #431 --- package.json | 2 +- yarn.lock | 147 ++++++++++++++++++++------------------------------- 2 files changed, 59 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 20fb6cc8..1e0f2cc1 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "devDependencies": { "@4tw/cypress-drag-drop": "https://github.com/ccheraa/cypress-drag-drop", "chai": "^4.3.4", - "cypress": "7.4.0", + "cypress": "7.5.0", "lerna": "4.0.0", "mocha": "^8.4.0", "node-sass": "6.0.0", diff --git a/yarn.lock b/yarn.lock index d94a9efc..30050dd3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1919,13 +1919,6 @@ dependencies: prop-types "^15.6.1" -"@samverschueren/stream-to-observable@^0.3.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz#a21117b19ee9be70c379ec1877537ef2e1c63301" - integrity sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ== - dependencies: - any-observable "^0.3.0" - "@sindresorhus/df@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@sindresorhus/df/-/df-1.0.1.tgz#c69b66f52f6fcdd287c807df210305dbaf78500d" @@ -3009,7 +3002,7 @@ ansi-escapes@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== -ansi-escapes@^4.2.1: +ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -3065,11 +3058,6 @@ any-observable@^0.2.0: resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.2.0.tgz#c67870058003579009083f54ac0abafb5c33d242" integrity sha1-xnhwBYADV5AJCD9UrAq6+1wz0kI= -any-observable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b" - integrity sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog== - anymatch@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb" @@ -3275,6 +3263,11 @@ ast-types@^0.9.2: resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.9.14.tgz#d34ba5dffb9d15a44351fd2a9d82e4ab2838b5ba" integrity sha512-Ebvx7/0lLboCdyEmAw/4GqwBeKIijPveXNiVGhCGCNxc7z26T5he7DC6ARxu8ByKuzUZZcLog+VP8GMyZrBzJw== +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + async-each@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" @@ -4853,7 +4846,7 @@ cli-cursor@^1.0.2: dependencies: restore-cursor "^1.0.1" -cli-cursor@^2.0.0, cli-cursor@^2.1.0: +cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" integrity sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= @@ -4902,6 +4895,14 @@ cli-truncate@^0.2.1: slice-ansi "0.0.4" string-width "^1.0.1" +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + cli-width@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" @@ -5623,10 +5624,10 @@ cyclist@^1.0.1: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= -cypress@7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.4.0.tgz#679bfe75335b9a4873d44f0d989e9f0367f00665" - integrity sha512-+CmSoT5DS88e92YDfc6aDA3Zf3uCBRKVB92caWsjXMilz0tf6NpByFvIbLLVWXiYOwrhtWV0m/k93+rzodYwRQ== +cypress@7.5.0: + version "7.5.0" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-7.5.0.tgz#72dd342e3b45f54b63cd46819f38d126feff5954" + integrity sha512-tw3v6nrTJoEzT37+Nf6RK+DvdTfhMb8EJYskZx7oskZ+J9qQ1QHWA4dH8Eoe/Mr/wE47o+7PK6O9tgqhRy6IHg== dependencies: "@cypress/listr-verbose-renderer" "^0.4.1" "@cypress/request" "^2.88.5" @@ -5654,7 +5655,7 @@ cypress@7.4.0: is-ci "^3.0.0" is-installed-globally "~0.4.0" lazy-ass "^1.6.0" - listr "^0.14.3" + listr2 "^3.8.3" lodash "^4.17.21" log-symbols "^4.0.0" minimist "^1.2.5" @@ -8477,13 +8478,6 @@ is-observable@^0.2.0: dependencies: symbol-observable "^0.2.2" -is-observable@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e" - integrity sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA== - dependencies: - symbol-observable "^1.1.0" - is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" @@ -9056,20 +9050,6 @@ listr-update-renderer@^0.4.0: log-update "^1.0.2" strip-ansi "^3.0.1" -listr-update-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-update-renderer/-/listr-update-renderer-0.5.0.tgz#4ea8368548a7b8aecb7e06d8c95cb45ae2ede6a2" - integrity sha512-tKRsZpKz8GSGqoI/+caPmfrypiaq+OQCbd+CovEC24uk1h952lVj5sC7SqyFUm+OaJ5HN/a1YLt5cit2FMNsFA== - dependencies: - chalk "^1.1.3" - cli-truncate "^0.2.1" - elegant-spinner "^1.0.1" - figures "^1.7.0" - indent-string "^3.0.0" - log-symbols "^1.0.2" - log-update "^2.3.0" - strip-ansi "^3.0.1" - listr-verbose-renderer@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35" @@ -9080,15 +9060,18 @@ listr-verbose-renderer@^0.4.0: date-fns "^1.27.2" figures "^1.7.0" -listr-verbose-renderer@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.5.0.tgz#f1132167535ea4c1261102b9f28dac7cba1e03db" - integrity sha512-04PDPqSlsqIOaaaGZ+41vq5FejI9auqTInicFRndCBgE3bXG8D6W1I+mWhk+1nqbHmyhla/6BUrd5OSiHwKRXw== +listr2@^3.8.3: + version "3.10.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.10.0.tgz#58105a53ed7fa1430d1b738c6055ef7bb006160f" + integrity sha512-eP40ZHihu70sSmqFNbNy2NL1YwImmlMmPh9WO5sLmPDleurMHt3n+SwEWNu2kzKScexZnkyFtc1VI0z/TGlmpw== dependencies: - chalk "^2.4.1" - cli-cursor "^2.1.0" - date-fns "^1.27.2" - figures "^2.0.0" + cli-truncate "^2.1.0" + colorette "^1.2.2" + log-update "^4.0.0" + p-map "^4.0.0" + rxjs "^6.6.7" + through "^2.3.8" + wrap-ansi "^7.0.0" listr@^0.13.0: version "0.13.0" @@ -9113,21 +9096,6 @@ listr@^0.13.0: stream-to-observable "^0.2.0" strip-ansi "^3.0.1" -listr@^0.14.3: - version "0.14.3" - resolved "https://registry.yarnpkg.com/listr/-/listr-0.14.3.tgz#2fea909604e434be464c50bddba0d496928fa586" - integrity sha512-RmAl7su35BFd/xoMamRjpIE4j3v+L28o8CT5YhAXQJm1fD+1l9ngXY8JAQRJ+tFK2i5njvi0iRUKV09vPwA0iA== - dependencies: - "@samverschueren/stream-to-observable" "^0.3.0" - is-observable "^1.1.0" - is-promise "^2.1.0" - is-stream "^1.1.0" - listr-silent-renderer "^1.1.1" - listr-update-renderer "^0.5.0" - listr-verbose-renderer "^0.5.0" - p-map "^2.0.0" - rxjs "^6.3.3" - load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -9327,14 +9295,15 @@ log-update@^1.0.2: ansi-escapes "^1.0.0" cli-cursor "^1.0.2" -log-update@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" - integrity sha1-iDKP19HOeTiykoN0bwsbwSayRwg= +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== dependencies: - ansi-escapes "^3.0.0" - cli-cursor "^2.0.0" - wrap-ansi "^3.0.1" + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" @@ -10803,11 +10772,6 @@ p-map@^1.1.1: resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== - p-map@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" @@ -12521,7 +12485,7 @@ rxjs@^5.4.2, rxjs@^5.5.2: dependencies: symbol-observable "1.0.1" -rxjs@^6.3.1, rxjs@^6.3.3, rxjs@^6.6.0: +rxjs@^6.3.1, rxjs@^6.6.0, rxjs@^6.6.7: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -12864,6 +12828,24 @@ slice-ansi@0.0.4: resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + slide@^1.1.5, slide@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707" @@ -13481,11 +13463,6 @@ symbol-observable@^0.2.2: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" integrity sha1-lag9smGG1q9+ehjb2XYKL4bQj0A= -symbol-observable@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804" - integrity sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ== - tapable@^1.0.0, tapable@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -14529,14 +14506,6 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" -wrap-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-3.0.1.tgz#288a04d87eda5c286e060dfe8f135ce8d007f8ba" - integrity sha1-KIoE2H7aXChuBg3+jxNc6NAH+Lo= - dependencies: - string-width "^2.1.1" - strip-ansi "^4.0.0" - wrap-ansi@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09"