Skip to content

refactored useForm for units and usage statuses dialogs#1550

Open
MatteoGuarnaccia5 wants to merge 2 commits intoreact-hook-form-editFileDialog-fixfrom
react-hook-form-units-and-usage-statuses-fix
Open

refactored useForm for units and usage statuses dialogs#1550
MatteoGuarnaccia5 wants to merge 2 commits intoreact-hook-form-editFileDialog-fixfrom
react-hook-form-units-and-usage-statuses-fix

Conversation

@MatteoGuarnaccia5
Copy link
Contributor

@MatteoGuarnaccia5 MatteoGuarnaccia5 commented Oct 27, 2025

Description

Implement new useForm syntax for units and usage statuses dialogs due to upgrade to react-hook-form v7.62.0 (see #1391 )

Testing instructions

Add a set up instructions describing how the reviewer should test the code

  • Review code
  • Check Actions build
  • Review changes to test coverage

@codecov
Copy link

codecov bot commented Oct 27, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
788 1 787 1
View the top 1 failed test(s) by shortest run time
src/systems/systems.component.test.tsx > Systems > renders correctly when viewing a specific system
Stack Traces | 1.44s run time
TestingLibraryElementError: Unable to find an element with the text: Smaller laser. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
<body>
  <div>
    <div
      class="MuiGrid2-root MuiGrid2-container MuiGrid2-direction-xs-row css-18hmf5h-MuiGrid2-root"
    >
      <div
        class="MuiGrid2-root MuiGrid2-direction-xs-row MuiGrid2-grid-xs-12 MuiGrid2-grid-md-grow css-spg8qm-MuiGrid2-root"
      >
        <div
          class="MuiPaper-root MuiPaper-elevation MuiPaper-rounded MuiPaper-elevation0 css-1hoqul-MuiPaper-root"
          style="--Paper-shadow: none; max-width: 100%;"
        >
          <div
            class="MuiBox-root css-1j0yp3a"
          >
            <h6
              class="MuiTypography-root MuiTypography-h6 css-18xa1ts-MuiTypography-root"
            >
              Subsystems
            </h6>
            <span
              aria-label="Add Subsystem"
              class=""
              data-mui-internal-clone-element="true"
            >
              <button
                aria-label="Add Subsystem"
                class="MuiButtonBase-root MuiIconButton-root MuiIconButton-sizeMedium css-53g0n7-MuiButtonBase-root-MuiIconButton-root"
                tabindex="0"
                type="button"
              >
                <svg
                  aria-hidden="true"
                  class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1umw9bq-MuiSvgIcon-root"
                  data-testid="AddIcon"
                  focusable="false"
                  viewBox="0 0 24 24"
                >
                  <path
                    d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
                  />
                </svg>
              </button>
            </span>
          </div>
          <hr
            class="MuiDivider-root MuiDivider-fullWidth css-1jpc804-MuiDivider-root"
            role="presentation"
          />
          <div
            class="MuiBox-root css-kgh0nc"
          >
            <div
              class="MuiBox-root css-0"
            >
              <div
                class="MuiCollapse-root MuiCollapse-horizontal MuiCollapse-entered css-1uiyv8z-MuiCollapse-root"
                style="min-width: 0px;"
              >
                <div
                  class="MuiCollapse-wrapper MuiCollapse-horizontal css-gquduo-MuiCollapse-wrapper"
                >
                  <div
                    class="MuiCollapse-wrapperInner MuiCollapse-horizontal css-3cp540-MuiCollapse-wrapperInner"
                  >
                    <div
                      class="MuiFormControl-root MuiTextField-root css-1xp5r68-MuiFormControl-root-MuiTextField-root"
                    >
                      <div
                        class="MuiInputBase-root MuiOutlinedInput-root MuiInputBase-colorPrimary MuiInputBase-formControl MuiInputBase-sizeSmall MuiInputBase-adornedStart MuiInputBase-adornedEnd css-1ambpiq-MuiInputBase-root-MuiOutlinedInput-root"
                      >
                        <svg
                          aria-hidden="true"
                          class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1umw9bq-MuiSvgIcon-root"
                          data-testid="SearchIcon"
                          focusable="false"
                          style="margin-right: 4px;"
                          viewBox="0 0 24 24"
                        >
                          <path
                            d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
                          />
                        </svg>
                        <input
                          aria-invalid="false"
                          autocomplete="off"
                          class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputSizeSmall MuiInputBase-inputAdornedStart MuiInputBase-inputAdornedEnd css-12tjcea-MuiInputBase-input-MuiOutlinedInput-input"
                          id=":r56:"
                          placeholder="Search"
                          type="text"
                          value=""
                        />
                        <div
                          class="MuiInputAdornment-root MuiInputAdornment-positionEnd MuiInputAdornment-outlined MuiInputAdornment-sizeSmall css-elo8k2-MuiInputAdornment-root"
                        >
                          <span
                            aria-label="Clear search"
                            class=""
                            data-mui-internal-clone-element="true"
                          >
                            <button
                              aria-label="Clear search"
                              class="MuiButtonBase-root Mui-disabled MuiIconButton-root Mui-disabled MuiIconButton-sizeSmall css-155wbr6-MuiButtonBase-root-MuiIconButton-root"
                              disabled=""
                              tabindex="-1"
                              type="button"
                            >
                              <svg
                                aria-hidden="true"
                                class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-1umw9bq-MuiSvgIcon-root"
                                data-testid="CloseIcon"
                                focusable="false"
                                viewBox...
 ❯ Object.getElementError node_modules/@.../dom/dist/config.js:37:19
 ❯ node_modules/@.../dom/dist/query-helpers.js:76:38
 ❯ node_modules/@.../dom/dist/query-helpers.js:52:17
 ❯ node_modules/@.../dom/dist/query-helpers.js:95:19
 ❯ src/systems/systems.component.test.tsx:50:19

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant