Convert PendingSubmissionsPill.vue to TypeScript

Part of &33. Closes #880 (closed).

Scope

  • contributors/app/javascript/common/components/navigation-menu/PendingSubmissionsPill.vue
  • contributors/app/javascript/common/components/navigation-menu/PendingSubmissionsPill.spec.ts (renamed from .js)
  • contributors/app/javascript/common/components/navigation-menu/__snapshots__/PendingSubmissionsPill.spec.ts.snap (renamed from .js.snap)
  • contributors/app/javascript/api/submissions.ts
  • contributors/app/javascript/api/submissions.spec.ts

What was done

  • Converted PendingSubmissionsPill.vue to <script setup lang="ts">.
  • Added api/submissions.ts with fetchSubmissionsCount() to avoid calling axios directly in components.
  • Added api/submissions.spec.ts using PLACEHOLDER_AXIOS_RESPONSE per ADR 005.
  • Converted PendingSubmissionsPill.spec.ts using createVueData(), createAxiosError(), and mocked ~/api/submissions per ADR 005.
  • Inlined { count: 5 } and { count: 7 } directly in PendingSubmissionsPill.spec.ts to keep the diff minimal and avoid factory conflicts with !3229.
  • Renamed snapshot file with git mv in the same commit; snapshot content is unchanged.
  • Passed fetchCount directly into watch(() => state.version, fetchCount).

Verification

npm run typecheck && npm run lint && TZ=UTC npm run test -- --run

All test files and tests passed locally.

Edited by Manish Kumar

Merge request reports

Loading
Loading