Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

Fix Add job tests

Khuram Niazfbc3af2879d3
diff --git a/__tests__/AddJob.spec.tsx b/__tests__/AddJob.spec.tsx
index c090cb0..4a655f2 100644
--- a/__tests__/AddJob.spec.tsx
+++ b/__tests__/AddJob.spec.tsx
@@ -75,6 +75,7 @@ describe("AddJob Component", () => {
/>
);
const addJobButton = screen.getByTestId("add-job-btn");
+ console.log(addJobButton);
await user.click(addJobButton);
});
diff --git a/src/components/Select.tsx b/src/components/Select.tsx
index 3b98416..fd9a37e 100644
--- a/src/components/Select.tsx
+++ b/src/components/Select.tsx
@@ -32,17 +32,18 @@ function SelectFormCtrl({ label, options, field }: SelectProps) {
</FormControl>
<SelectContent>
<SelectGroup>
- {options.map((option) => {
- return (
- <SelectItem
- key={option.id}
- value={option.id}
- className="capitalize"
- >
- {option.label ?? option.value ?? option.title}
- </SelectItem>
- );
- })}
+ {options &&
+ options.map((option) => {
+ return (
+ <SelectItem
+ key={option.id}
+ value={option.id}
+ className="capitalize"
+ >
+ {option.label ?? option.value ?? option.title}
+ </SelectItem>
+ );
+ })}
</SelectGroup>
</SelectContent>
</Select>