diff --git a/src/frontend/components/vote/Vote.tsx b/src/frontend/components/vote/Vote.tsx index 4b41e3d..531608e 100644 --- a/src/frontend/components/vote/Vote.tsx +++ b/src/frontend/components/vote/Vote.tsx @@ -26,6 +26,10 @@ export const Vote = () => { const [availableCandidates, setAvailableCandidates] = useState([]) const { t } = useTranslation('translation', { keyPrefix: 'voter.vote' }) + const handleDragStart = () => { + setDisableVote(true) + } + const handleDragEnd = (result: DropResult) => { if (!result.destination) { return @@ -82,6 +86,7 @@ export const Vote = () => { const [removed] = availableCandidates.splice(result.source.index, 1) availableCandidates.splice(destinationIndex, 0, removed) } + setDisableVote(false) } useEffect(() => { @@ -175,7 +180,10 @@ export const Vote = () => {
{t('vote_instruction')}
- +
{t('selected_candidates')}
diff --git a/tests/utils/voter-voting.ts b/tests/utils/voter-voting.ts index 699d580..787c3d6 100644 --- a/tests/utils/voter-voting.ts +++ b/tests/utils/voter-voting.ts @@ -20,7 +20,6 @@ export const selectCandidate = async (page: Page, candidateName: string) => { } ) await page.mouse.up() - await page.waitForTimeout(500) } export const deselectCandidate = async (page: Page, candidateName: string) => { @@ -43,5 +42,4 @@ export const deselectCandidate = async (page: Page, candidateName: string) => { } ) await page.mouse.up() - await page.waitForTimeout(500) }