Skip to content

Commit

Permalink
WP-68: Initial update of datafiles unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jalowe13 committed Oct 15, 2024
1 parent f946847 commit 8335d7f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
/* TODOv3 update this fixture https://jira.tacc.utexas.edu/browse/WP-68*/
// Updated fixture changes from endpoint https://cep.test/api/datafiles/systems/list/
/*
[
"name",
"system",
"scheme",
"api",
"homeDir",
"icon",
"default",
"siteSearchPriority",
"readOnly",
"hideSearchBar",
"integration"
]
*/
// Removed: Hidden, keyservice
// Removed
/*
error: false,
errorMessage: null,
loading: false,
Removed: definitions array
*/
const systemsFixture = {
storage: {
configuration: [
Expand All @@ -9,10 +33,8 @@ const systemsFixture = {
scheme: 'private',
api: 'tapis',
icon: null,
hidden: true,
homeDir: '/home/username',
default: true,
keyservice: true,
},
{
name: 'My Data (Frontera)',
Expand Down Expand Up @@ -65,35 +87,9 @@ const systemsFixture = {
integration: 'portal.apps.googledrive_integration',
},
],
error: false,
errorMessage: null,
loading: false,
defaultHost: 'frontera.tacc.utexas.edu',
defaultSystem: 'frontera',
},
definitions: {
list: [
{
id: 'frontera.home.username',
storage: {
host: 'frontera.tacc.utexas.edu',
rootDir: '/home1/012345/username',
},
effectiveUserId: 'username',
},
{
id: 'longhorn.home.username',
storage: {
host: 'longhorn.tacc.utexas.edu',
rootDir: '/home/012345/username',
},
effectiveUserId: 'username',
},
],
error: false,
errorMessage: null,
loading: false,
},
};

export default systemsFixture;
4 changes: 2 additions & 2 deletions client/src/components/DataFiles/tests/DataFiles.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('DataFiles', () => {
//);
expect(getAllByText(/My Data \(Frontera\)/)).toBeDefined();
expect(getByText(/My Data \(Longhorn\)/)).toBeDefined();
expect(queryByText(/My Data \(Work\)/)).toBeNull();
expect(queryByText(/My Data \(Work\)/)).toBeDefined(); // Changed to defined, hidden attribute removed and would be defined by default
});

it('should not render Data Files with no systems', () => {
Expand All @@ -61,7 +61,7 @@ describe('DataFiles', () => {
compress: '',
},
},
systems: {
systems: { // TODO: Remove rest of unused variables
storage: {
configuration: [
{
Expand Down

0 comments on commit 8335d7f

Please sign in to comment.