});
});
- 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'
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);
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) {
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));