Skip to content

Commit

Permalink
feat(teamProjectsHeader): Reorganized file locations
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvisraymond-uchicago committed Oct 25, 2023
1 parent cf2a422 commit 972a695
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Analysis/Analysis.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { QueryClient, QueryClientProvider } from 'react-query';
import { analysisApps } from '../localconf';
import AppCard from './AppCard';
import TeamProjectHeader from './SharedUtils/TeamProject/TeamProjectHeader/TeamProjectHeader';
import CheckForTeamProjectApplication from './SharedUtils/TeamProject/CheckForTeamProjectApplication';
import CheckForTeamProjectApplication from './SharedUtils/TeamProject/Utils/CheckForTeamProjectApplication';
import './Analysis.less';

class Analysis extends React.Component {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
import { useQuery } from 'react-query';
import queryConfig from '../../QueryConfig';
import LoadingErrorMessage from '../../LoadingErrorMessage/LoadingErrorMessage';
import fetchArboristTeamProjectRoles from '../../teamProjectApi';
import fetchArboristTeamProjectRoles from '../Utils/teamProjectApi';
import './TeamProjectModal.css';

const TeamProjectModal = ({ isModalOpen, setIsModalOpen, setBannerText }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import CheckForTeamProjectApplication from './CheckForTeamProjectApplication';

describe('CheckForTeamProjectApplication', () => {
it('should return true if the analysisApps contain a team project application', () => {
const analysisApps = {
'OHDSI Atlas': 1,
'SomeOtherApp': 2,
};
const result = CheckForTeamProjectApplication(analysisApps);
expect(result).toBe(true);
});

it('should return false if the analysisApps do not contain any team project application', () => {
const analysisApps = {
'SomeOtherApp': 1,
'AnotherApp': 2,
};
const result = CheckForTeamProjectApplication(analysisApps);
expect(result).toBe(false);
});

it('should return false for an empty analysisApps object', () => {
const analysisApps = {};
const result = CheckForTeamProjectApplication(analysisApps);
expect(result).toBe(false);
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { authzMappingPath } from '../../configs';
import { authzMappingPath } from '../../../../configs';

const fetchAuthorizationMappingsForCurrentUser = async () => {
const response = await fetch(authzMappingPath);
Expand Down

0 comments on commit 972a695

Please sign in to comment.