Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync 3.0.0 (PMVP-M1) with 2.1.0 (MVP2-M3) #316

Merged
merged 7 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -40,7 +40,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"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",
"eject": "react-scripts eject",
"lint": "eslint . --ignore-path .gitignore",
"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 });
});
});
12 changes: 4 additions & 8 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 @@ -597,7 +593,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
Loading