[ARVADOS-WORKBENCH2] updated: 2.3.0-163-gb68d6b62

Git user git at public.arvados.org
Tue Feb 15 20:16:38 UTC 2022


Summary of changes:
 cypress/integration/collection.spec.js | 3 +--
 src/websocket/websocket.ts             | 7 +++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

       via  b68d6b620d1e442bd2a231fa8a6d50b2678215f5 (commit)
      from  e4dd4d0e84d0b14c9e71cd72f45e0099273476f1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b68d6b620d1e442bd2a231fa8a6d50b2678215f5
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Tue Feb 15 17:15:57 2022 -0300

    18315: Adds websocket collection event handling. Updates test.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/cypress/integration/collection.spec.js b/cypress/integration/collection.spec.js
index a6146ba2..b451fd66 100644
--- a/cypress/integration/collection.spec.js
+++ b/cypress/integration/collection.spec.js
@@ -626,7 +626,7 @@ describe('Collection panel tests', function () {
             });
     });
 
-    it('updates the collection UI contents by using the Refresh button', function () {
+    it('automatically updates the collection UI contents without using the Refresh button', function () {
         const collName = `Test Collection ${Math.floor(Math.random() * 999999)}`;
         const fileName = 'foobar'
 
@@ -647,7 +647,6 @@ describe('Collection panel tests', function () {
                 manifest_text: `. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:${fileName}\n`,
             }).as('updatedCollection');
             cy.getAll('@updatedCollection').then(function ([updatedCollection]) {
-                cy.contains('Refresh').click();
                 expect(updatedCollection.name).to.equal(`${collName + ' updated'}`);
                 cy.get('[data-cy=collection-info-panel]').should('contain', updatedCollection.name);
                 cy.get('[data-cy=collection-files-panel]').should('contain', fileName);
diff --git a/src/websocket/websocket.ts b/src/websocket/websocket.ts
index b1265808..7c8e0171 100644
--- a/src/websocket/websocket.ts
+++ b/src/websocket/websocket.ts
@@ -15,6 +15,7 @@ import { subprocessPanelActions } from "store/subprocess-panel/subprocess-panel-
 import { projectPanelActions } from "store/project-panel/project-panel-action";
 import { getProjectPanelCurrentUuid } from 'store/project-panel/project-panel-action';
 import { allProcessesPanelActions } from 'store/all-processes-panel/all-processes-panel-action';
+import { loadCollection } from 'store/workbench/workbench-actions';
 
 export const initWebSocket = (config: Config, authService: AuthService, store: RootStore) => {
     if (config.websocketUrl) {
@@ -29,6 +30,12 @@ export const initWebSocket = (config: Config, authService: AuthService, store: R
 const messageListener = (store: RootStore) => (message: ResourceEventMessage) => {
     if (message.eventType === LogEventType.CREATE || message.eventType === LogEventType.UPDATE) {
         switch (message.objectKind) {
+            case ResourceKind.COLLECTION:
+                const currentCollection = store.getState().collectionPanel.item;
+                if (currentCollection && currentCollection.uuid === message.objectUuid) {
+                    store.dispatch(loadCollection(message.objectUuid));
+                }
+                return;
             case ResourceKind.CONTAINER_REQUEST:
                 if (store.getState().processPanel.containerRequestUuid === message.objectUuid) {
                     store.dispatch(loadProcess(message.objectUuid));

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list