Skip to content

Commit

Permalink
Merge branch '3.0.0' into eslint-linting
Browse files Browse the repository at this point in the history
  • Loading branch information
amattu2 committed Mar 21, 2024
2 parents 38d01ee + c38c024 commit 7ac4408
Show file tree
Hide file tree
Showing 8 changed files with 302 additions and 67 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
contents: read

jobs:
certify:
lint:
name: Lint Changes
runs-on: ubuntu-latest
steps:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
contents: read

jobs:
certify:
test:
name: Test Changes
runs-on: ubuntu-latest
steps:
Expand All @@ -43,3 +43,6 @@ jobs:

- name: Run Jest
run: npm run test:ci

- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"build": "react-scripts build",
"eject": "react-scripts eject",
"test": "TZ=UTC react-scripts test",
"test:ci": "TZ=UTC CI=true react-scripts test --passWithNoTests",
"test:ci": "TZ=UTC CI=true react-scripts test --passWithNoTests --coverage",
"lint": "eslint . --ignore-path .gitignore",
"lint:ci": "eslint . --ignore-path .gitignore --max-warnings 0",
"lint:fix": "eslint --fix . --ignore-path .gitignore",
Expand Down
5 changes: 3 additions & 2 deletions src/components/Contexts/AuthContext.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ describe("AuthContext > AuthProvider Tests", () => {

await waitFor(() => expect(screen.getByTestId("isLoggedIn").textContent).toEqual("false"));

expect(screen.getByTestId("isLoggedIn").textContent).toEqual("false");
expect(localStorage.getItem("userDetails")).toBeNull();
await waitFor(() => {
expect(localStorage.getItem("userDetails")).toBeNull();
}, { timeout: 1000 });
});
});
18 changes: 5 additions & 13 deletions src/content/dataSubmissions/DataSubmission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Button,
Card,
CardActions,
CardActionsProps,
CardContent,
Container,
IconButton,
Expand Down Expand Up @@ -117,13 +116,10 @@ const StyledMainContentArea = styled("div")(() => ({
padding: "21px 40px 0",
}));

const StyledCardActions = styled(CardActions, {
shouldForwardProp: (prop) => prop !== "isVisible"
})<CardActionsProps & { isVisible: boolean; }>(({ isVisible }) => ({
const StyledCardActions = styled(CardActions)(() => ({
"&.MuiCardActions-root": {
visibility: isVisible ? "visible" : "hidden",
paddingTop: 0,
}
},
}));

const StyledTabs = styled(Tabs)(() => ({
Expand Down Expand Up @@ -337,7 +333,7 @@ type Props = {
tab: string;
};

const DataSubmission: FC<Props> = ({ submissionId, tab }) => {
const DataSubmission: FC<Props> = ({ submissionId, tab = URLTabs.DATA_ACTIVITY }) => {
usePageTitle(`Data Submission ${submissionId || ""}`);

const { user } = useAuthContext();
Expand Down Expand Up @@ -372,11 +368,7 @@ const DataSubmission: FC<Props> = ({ submissionId, tab }) => {
return { disable: true, isAdminOverride: false };
}

return shouldDisableSubmit(
data.getSubmission.metadataValidationStatus,
data.getSubmission.fileValidationStatus,
user?.role
);
return shouldDisableSubmit(data.getSubmission, user?.role);
},
[data?.getSubmission, user]
);
Expand Down Expand Up @@ -597,7 +589,7 @@ const DataSubmission: FC<Props> = ({ submissionId, tab }) => {
<BackButton navigateTo="/data-submissions" text="Back to Data Submissions" />
</StyledMainContentArea>
</StyledCardContent>
<StyledCardActions isVisible={tab === URLTabs.DATA_ACTIVITY}>
<StyledCardActions>
<DataSubmissionActions
submission={data?.getSubmission}
onAction={updateSubmissionAction}
Expand Down
1 change: 1 addition & 0 deletions src/content/dataSubmissions/ErrorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const StyledErrorItem = styled(Typography)({
fontStyle: "normal",
fontWeight: 400,
lineHeight: "22px",
wordBreak: "break-word"
});

const StyledErrors = styled(Stack)({
Expand Down
Loading

0 comments on commit 7ac4408

Please sign in to comment.