• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CSCfi / metadata-submitter-frontend / 17127431596

21 Aug 2025 12:50PM UTC coverage: 57.962% (+1.6%) from 56.325%
17127431596

push

github

Hang Le
Remove legacy components. Remove metadataObjects and drafts from unit tests (merge commit)

Merge branch 'feature/remove-legacy-codes' into 'main'
* Remove legacy components and add extra explanation for components

* Remove metadataObjects and drafts from unit tests

Closes #1086 and #1088
See merge request https://gitlab.ci.csc.fi/sds-dev/sd-submit/metadata-submitter-frontend/-/merge_requests/1160

Approved-by: Monika Radaviciute <mradavic@csc.fi>
Merged by Hang Le <lhang@csc.fi>

580 of 805 branches covered (72.05%)

Branch coverage included in aggregate %.

12 of 16 new or added lines in 2 files covered. (75.0%)

7 existing lines in 2 files now uncovered.

5313 of 9362 relevant lines covered (56.75%)

5.37 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

87.23
/src/components/SubmissionWizard/WizardSteps/WizardAddObjectStep.tsx
1
/* XML upload is disabled for MVP */
1✔
2
import CircularProgress from "@mui/material/CircularProgress"
1✔
3
import Grid from "@mui/material/Grid"
1✔
4
import { styled } from "@mui/system"
1✔
5

6
import WizardAddObjectCard from "../WizardComponents/WizardAddObjectCard"
1✔
7

8
import WizardDacPoliciesStep from "components/SubmissionWizard/WizardSteps/WizardDacPoliciesStep"
1✔
9
import { ObjectTypes } from "constants/wizardObject"
1✔
10
import { useAppSelector } from "hooks"
1✔
11
import type { HandlerRef } from "types"
12

13
const GridContainer = styled(Grid)({
1✔
14
  margin: 0,
1✔
15
  width: "100%",
1✔
16
  "& > :first-of-type": {
1✔
17
    paddingLeft: 0,
1✔
18
  },
1✔
19
  "& > :last-child": {
1✔
20
    paddingRight: 0,
1✔
21
  },
1✔
22
  "& .MuiGrid-item": {
1✔
23
    paddingTop: 0,
1✔
24
  },
1✔
25
})
1✔
26

27
/*
28
 * Show the correct content of the form based on selected object or step (in the Accordion)
29
 */
30
const WizardAddObjectStep = ({ formRef }: { formRef?: HandlerRef }) => {
1✔
31
  const objectType = useAppSelector(state => state.objectType)
1✔
32
  const loading = useAppSelector(state => state.loading)
1✔
33
  const openedXMLModal = useAppSelector(state => state.openedXMLModal)
1✔
34

35
  return (
1✔
36
    <GridContainer container spacing={2}>
1✔
37
      <Grid size={{ xs: 12 }}>
1✔
38
        {objectType === ObjectTypes.dacPolicies ? (
1!
NEW
39
          <WizardDacPoliciesStep />
×
40
        ) : (
41
          <WizardAddObjectCard formRef={formRef} />
1✔
42
        )}
43
      </Grid>
1✔
44

45
      <Grid>
1✔
46
        {!openedXMLModal && loading && (
1!
NEW
47
          <Grid container justifyContent="center">
×
NEW
48
            <CircularProgress />
×
NEW
49
          </Grid>
×
50
        )}
51
      </Grid>
1✔
52
    </GridContainer>
1✔
53
  )
54
}
1✔
55

56
export default WizardAddObjectStep
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc