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

CSCfi / metadata-submitter-frontend / 17039256042

18 Aug 2025 11:28AM UTC coverage: 55.494% (-2.3%) from 57.785%
17039256042

push

github

Hang Le
Removing metadata objects and drafts from submission object (merge commit)

Merge branch 'bugfix/remove-metadataObjects-and-drafts' into 'main'
* Fix for undefined object's id and title

* Remove metadataObjects and drafts

Closes #1072
See merge request https://gitlab.ci.csc.fi/sds-dev/sd-submit/metadata-submitter-frontend/-/merge_requests/1154

Reviewed-by: Liisa Lado-Villar <145-lilado@users.noreply.gitlab.ci.csc.fi>
Approved-by: Monika Radaviciute <mradavic@csc.fi>
Approved-by: Liisa Lado-Villar <145-lilado@users.noreply.gitlab.ci.csc.fi>
Merged by Hang Le <lhang@csc.fi>

596 of 832 branches covered (71.63%)

Branch coverage included in aggregate %.

217 of 328 new or added lines in 27 files covered. (66.16%)

469 existing lines in 16 files now uncovered.

5500 of 10153 relevant lines covered (54.17%)

4.88 hits per line

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

86.44
/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
import { useTranslation } from "react-i18next"
1✔
6

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

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

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

28
const ObjectInfo = styled("div")({
1✔
29
  margin: 2,
1✔
30
})
1✔
31

32
/**
33
 * Show selection for object and submission types and correct form based on users choice.
34
 */
35
const WizardAddObjectStep = ({ formRef }: { formRef?: HandlerRef }) => {
1✔
36
  const objectType = useAppSelector(state => state.objectType)
1✔
37
  const loading = useAppSelector(state => state.loading)
1✔
38
  const openedXMLModal = useAppSelector(state => state.openedXMLModal)
1✔
39
  const { t } = useTranslation()
1✔
40

41
  return (
1✔
42
    <>
1✔
43
      <GridContainer container spacing={2}>
1✔
44
        <Grid size={{ xs: 12 }}>
1✔
45
          {objectType === "" ? (
1✔
46
            <ObjectInfo>
1✔
47
              <p>{t("objects.add")}</p>
1✔
48
              <p>{t("objects.edit")}</p>
1✔
49
            </ObjectInfo>
1!
UNCOV
50
          ) : objectType === ObjectTypes.dacPolicies ? (
×
51
            <WizardDacPoliciesStep />
×
52
          ) : (
UNCOV
53
            <WizardAddObjectCard formRef={formRef} />
×
54
          )}
55
        </Grid>
1✔
56

57
        <Grid>
1✔
58
          {!openedXMLModal && loading && (
1!
59
            <Grid container justifyContent="center">
×
60
              <CircularProgress />
×
61
            </Grid>
×
62
          )}
63
        </Grid>
1✔
64
      </GridContainer>
1✔
65
    </>
1✔
66
  )
67
}
1✔
68

69
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