Skip to content

Commit

Permalink
Rename setting: precinctScanDisallowCastingOvervotes -> disallowCasti…
Browse files Browse the repository at this point in the history
…ngOvervotes (#5550)
  • Loading branch information
kofi-q authored Oct 24, 2024
1 parent 9a6fd8e commit 0d0e272
Show file tree
Hide file tree
Showing 43 changed files with 31 additions and 36 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/admin/backend/src/__image_snapshots__/tally-report-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/admin/backend/src/__image_snapshots__/tally-report-zero-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/admin/backend/src/__image_snapshots__/wia-report-zero-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,11 @@ test('shows invalid election screen when appropriate', async () => {
userEvent.click(screen.getByText('Confirm Ballot Removed'));
});

test('does not allow tabulating the overvote if precinctScanDisallowCastingOvervotes is set', async () => {
test('does not allow tabulating the overvote if disallowCastingOvervotes is set', async () => {
apiMock.apiClient.getSystemSettings.reset();
apiMock.expectGetSystemSettings({
...DEFAULT_SYSTEM_SETTINGS,
precinctScanDisallowCastingOvervotes: true,
disallowCastingOvervotes: true,
});
const metadata: BallotMetadata = {
ballotStyleId: '1' as BallotStyleId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ export function BallotEjectScreen({ isTestMode }: Props): JSX.Element | null {
return null;
}

// TODO: since we use this flag here, in the central scanner, rename it to
// not be "precinct" specific
const { precinctScanDisallowCastingOvervotes } = systemSettingsQuery.data;
const { disallowCastingOvervotes } = systemSettingsQuery.data;

let isOvervotedSheet = false;
let isUndervotedSheet = false;
Expand Down Expand Up @@ -295,7 +293,7 @@ export function BallotEjectScreen({ isTestMode }: Props): JSX.Element | null {
detected.
</P>
),
allowBallotDuplication: !precinctScanDisallowCastingOvervotes,
allowBallotDuplication: !disallowCastingOvervotes,
};
}

Expand Down
8 changes: 3 additions & 5 deletions apps/design/frontend/src/tabulation_screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { updateSystemSettings, getElection } from './api';
type TabulationSettings = Pick<
SystemSettings,
| 'precinctScanAdjudicationReasons'
| 'precinctScanDisallowCastingOvervotes'
| 'disallowCastingOvervotes'
| 'centralScanAdjudicationReasons'
| 'markThresholds'
>;
Expand Down Expand Up @@ -86,13 +86,11 @@ export function TabulationForm({
/>
<CheckboxButton
label="Disallow Casting Overvotes"
isChecked={
tabulationSettings.precinctScanDisallowCastingOvervotes
}
isChecked={tabulationSettings.disallowCastingOvervotes}
onChange={(isChecked) =>
setTabulationSettings({
...tabulationSettings,
precinctScanDisallowCastingOvervotes: isChecked,
disallowCastingOvervotes: isChecked,
})
}
disabled={!isEditing}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/scan/backend/src/__image_snapshots__/polls-closed-report-1.png
Binary file modified apps/scan/backend/src/__image_snapshots__/readiness-report-1.png
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ test('overvote when casting overvotes is disallowed', async () => {
],
systemSettings: {
...DEFAULT_SYSTEM_SETTINGS,
precinctScanDisallowCastingOvervotes: true,
disallowCastingOvervotes: true,
},
});

Expand Down
3 changes: 1 addition & 2 deletions apps/scan/frontend/src/screens/scan_warning_screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ function MisvoteWarningScreen({
}: MisvoteWarningScreenProps): JSX.Element {
const returnBallotMutation = returnBallot.useMutation();
const acceptBallotMutation = acceptBallot.useMutation();
const allowCastingOvervotes =
!systemSettings.precinctScanDisallowCastingOvervotes;
const allowCastingOvervotes = !systemSettings.disallowCastingOvervotes;
const [confirmTabulate, setConfirmTabulate] = useState(false);

const { contests } = electionDefinition.election;
Expand Down
2 changes: 1 addition & 1 deletion libs/fixtures/data/systemSettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
},
"centralScanAdjudicationReasons": [],
"precinctScanAdjudicationReasons": [],
"precinctScanDisallowCastingOvervotes": false
"disallowCastingOvervotes": false
}
12 changes: 6 additions & 6 deletions libs/fixtures/src/data/electionGeneral/ui-strings.json.ts

Large diffs are not rendered by default.

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions libs/fixtures/src/data/systemSettings.json.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions libs/types/src/system_settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export interface SystemSettings {
readonly markThresholds: MarkThresholds;
readonly centralScanAdjudicationReasons: readonly AdjudicationReason[];
readonly precinctScanAdjudicationReasons: readonly AdjudicationReason[];
readonly precinctScanDisallowCastingOvervotes: boolean;
readonly disallowCastingOvervotes: boolean;
readonly precinctScanEnableShoeshineMode?: boolean;
/**
* Includes original snapshots in cast vote record reports, increasing export size and
Expand All @@ -86,7 +86,7 @@ export const SystemSettingsSchema: z.ZodType<SystemSettings> = z.object({
precinctScanAdjudicationReasons: z.array(
z.lazy(() => AdjudicationReasonSchema)
),
precinctScanDisallowCastingOvervotes: z.boolean(),
disallowCastingOvervotes: z.boolean(),
precinctScanEnableShoeshineMode: z.boolean().optional(),
castVoteRecordsIncludeOriginalSnapshots: z.boolean().optional(),
castVoteRecordsIncludeRedundantMetadata: z.boolean().optional(),
Expand Down Expand Up @@ -120,6 +120,6 @@ export const DEFAULT_SYSTEM_SETTINGS: SystemSettings = {
},
markThresholds: DEFAULT_MARK_THRESHOLDS,
precinctScanAdjudicationReasons: [],
precinctScanDisallowCastingOvervotes: false,
disallowCastingOvervotes: false,
centralScanAdjudicationReasons: [],
};

0 comments on commit 0d0e272

Please sign in to comment.