Skip to content

Commit

Permalink
Added the facet count to the copy facet list button. Also updated tes…
Browse files Browse the repository at this point in the history
…t to pass with new facet count output. (#604)
  • Loading branch information
downiec committed Feb 6, 2024
1 parent ec78791 commit 136126b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/Facets/FacetsForm.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('test FacetsForm component', () => {

// Check the clipboard has items
const items = await navigator.clipboard.readText();
expect(items).toEqual('aims3.llnl.gov\nesgf1.dkrz.de');
expect(items).toEqual('aims3.llnl.gov (3)\nesgf1.dkrz.de (5)');

// Expect result message to show
const resultNotification = getByText('Data Nodes copied to clipboard!');
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Facets/FacetsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ const FacetsForm: React.FC<React.PropsWithChildren<Props>> = ({
navigator.clipboard.writeText(
facetOptions
.map((item) => {
return item[0];
return `${item[0]} (${item[1]})`;
})
.join('\n')
);
Expand Down

0 comments on commit 136126b

Please sign in to comment.