• 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

41.18
/src/components/SubmissionWizard/WizardComponents/WizardAddObjectCard.tsx
1
import { styled } from "@mui/material/styles"
1✔
2

3
import WizardFillObjectDetailsForm from "components/SubmissionWizard/WizardForms/WizardFillObjectDetailsForm"
1✔
4
// import WizardXMLObjectPage from "components/SubmissionWizard/WizardForms/WizardXMLObjectPage"
5
import { useAppSelector } from "hooks"
1✔
6
import type { HandlerRef } from "types"
7

8
const StyledContent = styled("div")(() => ({
1✔
UNCOV
9
  width: "100%",
×
UNCOV
10
  padding: 0,
×
UNCOV
11
  overflow: "visible",
×
12
}))
1✔
13

14
/*
15
 * Render correct form to add objects based on submission type in store
16
 */
17
const WizardAddObjectCard = ({ formRef }: { formRef?: HandlerRef }) => {
1✔
UNCOV
18
  const objectType = useAppSelector(state => state.objectType)
×
19

UNCOV
20
  const content = {
×
NEW
21
    component: <WizardFillObjectDetailsForm key={objectType} ref={formRef} />,
×
NEW
22
    testId: "form",
×
UNCOV
23
  }
×
24
  /* Redux's submissionType is removed:
25
    - To simplify the codes as the frontend doesn't support XML for MVP.
26
    - New StepObject has a prop "isXML" to check directly if XML otherwise Form. We can extend this feature.
27
  */
28
  // [ObjectSubmissionTypes.xml]: {
29
  //   component: <WizardXMLObjectPage key={objectType} />,
30
  //   testId: ObjectSubmissionTypes.xml,
31
  // },
32

NEW
33
  return <StyledContent data-testid={content["testId"]}>{content["component"]}</StyledContent>
×
UNCOV
34
}
×
35

36
export default WizardAddObjectCard
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