Skip to content

Commit

Permalink
Move files from form to form/data_entry
Browse files Browse the repository at this point in the history
These files were only used for data entry.
  • Loading branch information
praseodym committed Mar 5, 2025
1 parent d0d1b26 commit 3f7f97f
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import {
} from "@kiesraad/api-mocks";
import { getUrlMethodAndBody, overrideOnce, render, screen, server, within } from "@kiesraad/test";

import { DataEntryProvider } from "../state/DataEntryProvider";
import { DataEntryState } from "../state/types";
import { defaultFormSection, overrideServerGetDataEntryResponse } from "../test.util";
import {
emptyDataEntryRequest,
expectFieldsToBeInvalidAndToHaveAccessibleErrorMessage,
expectFieldsToBeValidAndToNotHaveAccessibleErrorMessage,
expectFieldsToHaveIconAndToHaveAccessibleName,
expectFieldsToNotHaveIcon,
getCandidateFullNamesFromMockData,
} from "../../testHelperFunctions";
import { DataEntryProvider } from "../state/DataEntryProvider";
import { DataEntryState } from "../state/types";
import { defaultFormSection, overrideServerGetDataEntryResponse } from "../test.util";
} from "../testHelperFunctions";
import { CandidatesVotesForm } from "./CandidatesVotesForm";

const defaultDataEntryState: DataEntryState = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import {
} from "@kiesraad/api-mocks";
import { overrideOnce, renderReturningRouter, screen, server, within } from "@kiesraad/test";

import { emptyDataEntryRequest, errorWarningMocks } from "../../testHelperFunctions";
import { DataEntryProvider } from "../state/DataEntryProvider";
import { DataEntryState } from "../state/types";
import { defaultFormSection, overrideServerGetDataEntryResponse } from "../test.util";
import { emptyDataEntryRequest, errorWarningMocks } from "../testHelperFunctions";
import { CheckAndSaveForm } from "./CheckAndSaveForm";

const defaultValues = emptyDataEntryRequest.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
expectFieldsToBeValidAndToNotHaveAccessibleErrorMessage,
expectFieldsToHaveIconAndToHaveAccessibleName,
expectFieldsToNotHaveIcon,
} from "app/component/form/testHelperFunctions";
} from "app/component/form/data_entry/testHelperFunctions";

import { POLLING_STATION_DATA_ENTRY_SAVE_REQUEST_BODY } from "@kiesraad/api";
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { userEvent } from "@testing-library/user-event";
import { beforeEach, describe, expect, test, vi } from "vitest";

import { emptyDataEntryRequest, errorWarningMocks } from "app/component/form/testHelperFunctions";
import { emptyDataEntryRequest, errorWarningMocks } from "app/component/form/data_entry/testHelperFunctions";

import { POLLING_STATION_DATA_ENTRY_SAVE_REQUEST_BODY, SaveDataEntryResponse } from "@kiesraad/api";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { assert, describe, expect, test } from "vitest";

import { ValidationResult } from "@kiesraad/api";

import { errorWarningMocks } from "../../testHelperFunctions";
import { defaultDataEntryState, initialValues } from "../test.util";
import { errorWarningMocks } from "../testHelperFunctions";
import {
addValidationResultToFormState,
formSectionComplete,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
expectFieldsToBeValidAndToNotHaveAccessibleErrorMessage,
expectFieldsToHaveIconAndToHaveAccessibleName,
expectFieldsToNotHaveIcon,
} from "app/component/form/testHelperFunctions";
} from "app/component/form/data_entry/testHelperFunctions";

import {
GetDataEntryResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { render as rtlRender, within } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { beforeEach, describe, expect, test, vi } from "vitest";

import { errorWarningMocks } from "app/component/form/testHelperFunctions";
import { errorWarningMocks } from "app/component/form/data_entry/testHelperFunctions";
import { routes } from "app/routes";

import { SaveDataEntryResponse } from "@kiesraad/api";
Expand Down
4 changes: 0 additions & 4 deletions sigrid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ components:
- name: "(Frontend) app/component/form/data_entry"
include:
- ".*/frontend/app/component/form/data_entry/.*"
- ".*/frontend/app/component/form/testHelperFunctions.ts"
- ".*/frontend/app/component/form/useWatchForChanges.test.ts"
- ".*/frontend/app/component/form/useWatchForChanges.ts"
- ".*/frontend/app/component/pollingstation/.*"
- name: "(Frontend) app/component/form/polling_station"
include:
- ".*/frontend/app/component/form/polling_station/.*"
Expand Down

0 comments on commit 3f7f97f

Please sign in to comment.