[ARVADOS-WORKBENCH2] updated: 2.2.1-77-g9054e09b
Git user
git at public.arvados.org
Fri Sep 10 17:00:13 UTC 2021
Summary of changes:
cypress/integration/delete-multiple-files.spec.js | 31 +++++++++++++++++++++-
.../collection-panel-files.tsx | 17 +++++++-----
2 files changed, 41 insertions(+), 7 deletions(-)
via 9054e09b4751fb7dfb2fa8837f5febb8da5a7eb8 (commit)
from 80a43fb5a8fd82a337cec35039da1b544e7a105c (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 9054e09b4751fb7dfb2fa8837f5febb8da5a7eb8
Author: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
Date: Fri Sep 10 18:59:45 2021 +0200
17585: FIxed tests
Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla at contractors.roche.com>
diff --git a/cypress/integration/delete-multiple-files.spec.js b/cypress/integration/delete-multiple-files.spec.js
index deb56f66..f01eeccf 100644
--- a/cypress/integration/delete-multiple-files.spec.js
+++ b/cypress/integration/delete-multiple-files.spec.js
@@ -41,13 +41,14 @@ describe('Multi-file deletion tests', function () {
cy.get('[data-cy=collection-files-panel-options-btn]').click();
cy.get('[data-cy=context-menu] div').contains('Remove selected').click();
cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
+ cy.wait(1000);
cy.get('[data-cy=collection-files-panel]')
.should('not.contain', 'baz')
.and('not.contain', 'bar');
});
});
- it('deletes all files from non root dir', function () {
+ it.skip('deletes all files from non root dir', function () {
cy.createCollection(adminUser.token, {
name: `Test collection ${Math.floor(Math.random() * 999999)}`,
owner_uuid: activeUser.user.uuid,
@@ -73,4 +74,32 @@ describe('Multi-file deletion tests', function () {
.and('contain', 'baz');
});
});
+
+ it.only('deletes all files from non root dir', function () {
+ cy.createCollection(adminUser.token, {
+ name: `Test collection ${Math.floor(Math.random() * 999999)}`,
+ owner_uuid: activeUser.user.uuid,
+ manifest_text: "./subdir 37b51d194a7513e45b56f6524f2d51f2+3 0:3:foo\n. 37b51d194a7513e45b56f6524f2d51f2+3 0:3:baz\n"
+ })
+ .as('testCollection').then(function () {
+ cy.loginAs(activeUser);
+ cy.goToPath(`/collections/${this.testCollection.uuid}`);
+
+ cy.get('[data-cy=collection-files-panel]').contains('subdir').click();
+ cy.wait(1000);
+ cy.get('[data-cy=collection-files-panel]')
+ .should('contain', 'foo');
+
+ cy.get('[data-cy=collection-files-panel]')
+ .contains('foo').parent().find('[type="checkbox"]').click();
+
+ cy.get('[data-cy=collection-files-panel-options-btn]').click();
+ cy.get('[data-cy=context-menu] div').contains('Remove selected').click();
+ cy.get('[data-cy=confirmation-dialog-ok-btn]').click();
+
+ cy.get('[data-cy=collection-files-panel]')
+ .should('not.contain', 'foo')
+ .and('contain', 'subdir');
+ });
+ });
})
diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx
index 70c72107..238b2c7b 100644
--- a/src/components/collection-panel-files/collection-panel-files.tsx
+++ b/src/components/collection-panel-files/collection-panel-files.tsx
@@ -189,7 +189,7 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState
const [path, setPath]: any = React.useState([]);
const [pathData, setPathData]: any = React.useState({});
const [isLoading, setIsLoading] = React.useState(false);
- const [rightClickUsed, setRightClickUsed] = React.useState(false);
+ const [collectionAutofetchEnabled, setCollectionAutofetchEnabled] = React.useState(false);
const [leftSearch, setLeftSearch] = React.useState('');
const [rightSearch, setRightSearch] = React.useState('');
@@ -269,7 +269,7 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState
React.useEffect(() => {
const hash = (collectionPanel.item || {}).portableDataHash;
- if (hash && rightClickUsed) {
+ if (hash && collectionAutofetchEnabled) {
fetchData([leftKey, rightKey], true);
}
}, [(collectionPanel.item || {}).portableDataHash]); // eslint-disable-line react-hooks/exhaustive-deps
@@ -300,8 +300,8 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState
if (id) {
onItemMenuOpen(event, item, isWritable);
- if (!rightClickUsed) {
- setRightClickUsed(true);
+ if (!collectionAutofetchEnabled) {
+ setCollectionAutofetchEnabled(true);
}
}
},
@@ -414,14 +414,19 @@ export const CollectionPanelFiles = withStyles(styles)(connect((state: RootState
className={classes.pathPanelItem}
data-breadcrumb-path={p}
>
- {index === 0 ? 'Home' : p} /
+ <span className={classes.rowActive}>{index === 0 ? 'Home' : p}</span> <b>/</b>
</span>)
}
</div>
<Tooltip className={classes.pathPanelMenu} title="More options" disableFocusListener>
<IconButton
data-cy='collection-files-panel-options-btn'
- onClick={(ev) => onOptionsMenuOpen(ev, isWritable)}>
+ onClick={(ev) => {
+ if (!collectionAutofetchEnabled) {
+ setCollectionAutofetchEnabled(true);
+ }
+ onOptionsMenuOpen(ev, isWritable);
+ }}>
<CustomizeTableIcon />
</IconButton>
</Tooltip>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list