[ARVADOS-WORKBENCH2] updated: 2.3.0-154-g606119d8

Git user git at public.arvados.org
Thu Feb 3 21:41:26 UTC 2022


Summary of changes:
 cypress/integration/side-panel.spec.js        | 21 ++++------
 src/components/data-table/data-table.test.tsx |  2 +
 src/components/data-table/data-table.tsx      | 15 ++++---
 src/store/workbench/workbench-actions.ts      | 60 ++++++++++++++-------------
 4 files changed, 49 insertions(+), 49 deletions(-)

       via  606119d81b87f4e5e835c777b012f56e7d5c146d (commit)
       via  6159313a798f750d2e5d5c41b79b7a2a259611f8 (commit)
       via  df8b88b958c46cbf28c332bb05b3620ab1e819f2 (commit)
      from  bdb36daa28e58f24975c58b54eaecaa593c8ad95 (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 606119d81b87f4e5e835c777b012f56e7d5c146d
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Feb 3 13:16:09 2022 -0300

    18661: Fixes the '<div> cannot appear as a child of <tbody>' error.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/src/components/data-table/data-table.test.tsx b/src/components/data-table/data-table.test.tsx
index 85379e9a..866564ac 100644
--- a/src/components/data-table/data-table.test.tsx
+++ b/src/components/data-table/data-table.test.tsx
@@ -101,6 +101,7 @@ describe("<DataTable />", () => {
         ];
         const dataTable = mount(<DataTable
             columns={columns}
+            working={false}
             items={["item 1"]}
             onFiltersChange={jest.fn()}
             onRowClick={jest.fn()}
@@ -128,6 +129,7 @@ describe("<DataTable />", () => {
         ];
         const dataTable = mount(<DataTable
             columns={columns}
+            working={false}
             items={["item 1"]}
             onFiltersChange={jest.fn()}
             onRowClick={jest.fn()}
diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx
index 2119e53d..e8a6ce69 100644
--- a/src/components/data-table/data-table.tsx
+++ b/src/components/data-table/data-table.tsx
@@ -96,16 +96,15 @@ export const DataTable = withStyles(styles)(
                             </TableRow>
                         </TableHead>
                         <TableBody className={classes.tableBody}>
-                            {
-                                this.props.working ?
-                                <div className={classes.loader}>
-                                    <DataTableDefaultView
-                                        icon={PendingIcon}
-                                        messages={['Loading data, please wait.']} />
-                                </div> : items.map(this.renderBodyRow)
-                            }
+                            { this.props.working !== undefined && !this.props.working && items.map(this.renderBodyRow) }
                         </TableBody>
                     </Table>
+                    { this.props.working &&
+                        <div className={classes.loader}>
+                            <DataTableDefaultView
+                                icon={PendingIcon}
+                                messages={['Loading data, please wait.']} />
+                        </div> }
                     {items.length === 0 && this.props.working !== undefined && !this.props.working && this.renderNoItemsPlaceholder()}
                 </div>
             </div>;

commit 6159313a798f750d2e5d5c41b79b7a2a259611f8
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Feb 3 18:29:02 2022 -0300

    18661: Improves cypress test reliability avoiding possible race.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/cypress/integration/side-panel.spec.js b/cypress/integration/side-panel.spec.js
index f9d4dca3..afe326e3 100644
--- a/cypress/integration/side-panel.spec.js
+++ b/cypress/integration/side-panel.spec.js
@@ -104,7 +104,7 @@ describe('Side panel tests', function() {
         cy.getAll('@mySharedWritableProject')
             .then(function ([mySharedWritableProject]) {
                 cy.loginAs(activeUser);
-                
+
                 cy.get('[data-cy=side-panel-tree]').contains('Projects').click();
 
                 const newProjectName = `New project name ${mySharedWritableProject.name}`;
@@ -125,19 +125,16 @@ describe('Side panel tests', function() {
             addToFavorites: false
         });
 
-        cy.getAll('@writableProject')
-            .then(function ([writableProject]) {
-                cy.loginAs(activeUser);
-                
-                cy.get('[data-cy=side-panel-tree]').contains('Projects').click();
-
-                cy.get('[data-cy=side-panel-tree]').contains(writableProject.name).should('exist');
-
-                cy.trashGroup(activeUser.token, writableProject.uuid);
-
+        cy.getAll('@writableProject').then(function ([writableProject]) {
+            cy.loginAs(activeUser);
+            cy.get('[data-cy=side-panel-tree]')
+                .contains('Projects').click();
+            cy.get('[data-cy=side-panel-tree]')
+                .contains(writableProject.name).should('exist');
+            cy.trashGroup(activeUser.token, writableProject.uuid).then(() => {
                 cy.contains('Refresh').click();
-
                 cy.contains(writableProject.name).should('not.exist');
             });
+        });
     });
 })

commit df8b88b958c46cbf28c332bb05b3620ab1e819f2
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Feb 3 18:28:22 2022 -0300

    18661: Reorders action dispatching to ensure proper side tree panel refresh.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index 527d9d74..2de90644 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -194,35 +194,36 @@ export const loadProject = (uuid: string) =>
         async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
             const userUuid = getUserUuid(getState());
             dispatch(setIsProjectPanelTrashed(false));
-            if (userUuid) {
-                if (extractUuidKind(uuid) === ResourceKind.USER && userUuid !== uuid) {
-                    // Load another users home projects
-                    dispatch(finishLoadingProject(uuid));
-                } else if (userUuid !== uuid) {
-                    const match = await loadGroupContentsResource({ uuid, userUuid, services });
-                    match({
-                        OWNED: async project => {
-                            await dispatch(activateSidePanelTreeItem(uuid));
-                            dispatch<any>(setSidePanelBreadcrumbs(uuid));
-                            dispatch(finishLoadingProject(project));
-                        },
-                        SHARED: project => {
-                            dispatch<any>(setSharedWithMeBreadcrumbs(uuid));
-                            dispatch(activateSidePanelTreeItem(uuid));
-                            dispatch(finishLoadingProject(project));
-                        },
-                        TRASHED: project => {
-                            dispatch<any>(setTrashBreadcrumbs(uuid));
-                            dispatch(setIsProjectPanelTrashed(true));
-                            dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
-                            dispatch(finishLoadingProject(project));
-                        }
-                    });
-                } else {
-                    await dispatch(activateSidePanelTreeItem(userUuid));
-                    dispatch<any>(setSidePanelBreadcrumbs(userUuid));
-                    dispatch(finishLoadingProject(userUuid));
-                }
+            if (!userUuid) {
+                return;
+            }
+            if (extractUuidKind(uuid) === ResourceKind.USER && userUuid !== uuid) {
+                // Load another users home projects
+                dispatch(finishLoadingProject(uuid));
+            } else if (userUuid !== uuid) {
+                const match = await loadGroupContentsResource({ uuid, userUuid, services });
+                match({
+                    OWNED: async project => {
+                        await dispatch(finishLoadingProject(project));
+                        await dispatch(activateSidePanelTreeItem(uuid));
+                        dispatch<any>(setSidePanelBreadcrumbs(uuid));
+                    },
+                    SHARED: async project => {
+                        await dispatch(finishLoadingProject(project));
+                        await dispatch(activateSidePanelTreeItem(uuid));
+                        dispatch<any>(setSharedWithMeBreadcrumbs(uuid));
+                    },
+                    TRASHED: async project => {
+                        await dispatch(finishLoadingProject(project));
+                        await dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
+                        dispatch<any>(setTrashBreadcrumbs(uuid));
+                        dispatch(setIsProjectPanelTrashed(true));
+                    }
+                });
+            } else {
+                await dispatch(finishLoadingProject(userUuid));
+                await dispatch(activateSidePanelTreeItem(userUuid));
+                dispatch<any>(setSidePanelBreadcrumbs(userUuid));
             }
         });
 
@@ -444,6 +445,7 @@ export const couldNotLoadUser = snackbarActions.OPEN_SNACKBAR({
 
 export const reloadProjectMatchingUuid = (matchingUuids: string[]) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+        console.log("ReloadProjectMatchingUUID: ", matchingUuids);
         const currentProjectPanelUuid = getProjectPanelCurrentUuid(getState());
         if (currentProjectPanelUuid && matchingUuids.some(uuid => uuid === currentProjectPanelUuid)) {
             dispatch<any>(loadProject(currentProjectPanelUuid));

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list