Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
428 changes: 428 additions & 0 deletions VueApp/src/Effort/__tests__/harvest-dialog.test.ts

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions VueApp/src/Effort/__tests__/instructor-add-dialog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ describe("InstructorAddDialog - Error Handling", () => {
const searchTerm = "J"
const minSearchLength = 2

expect(searchTerm.length >= minSearchLength).toBe(false)
expect(searchTerm.length >= minSearchLength).toBeFalsy()
})

it("should allow search with 2 or more characters", () => {
const searchTerm = "Jo"
const minSearchLength = 2

expect(searchTerm.length >= minSearchLength).toBe(true)
expect(searchTerm.length >= minSearchLength).toBeTruthy()
})
})

Expand All @@ -87,15 +87,15 @@ describe("InstructorAddDialog - Error Handling", () => {

const canSubmit = !!selectedPerson.value

expect(canSubmit).toBe(false)
expect(canSubmit).toBeFalsy()
})

it("should allow submission when person is selected", () => {
const selectedPerson = ref<{ personId: number } | null>({ personId: 123 })

const canSubmit = !!selectedPerson.value

expect(canSubmit).toBe(true)
expect(canSubmit).toBeTruthy()
})
})

Expand Down Expand Up @@ -135,24 +135,24 @@ describe("InstructorAddDialog - State Management", () => {
const isSearching = ref(false)

isSearching.value = true
expect(isSearching.value).toBe(true)
expect(isSearching.value).toBeTruthy()

// Simulate search completion
await Promise.resolve()
isSearching.value = false
expect(isSearching.value).toBe(false)
expect(isSearching.value).toBeFalsy()
})

it("should track saving state during instructor creation", async () => {
const isSaving = ref(false)

isSaving.value = true
expect(isSaving.value).toBe(true)
expect(isSaving.value).toBeTruthy()

// Simulate save completion
await Promise.resolve()
isSaving.value = false
expect(isSaving.value).toBe(false)
expect(isSaving.value).toBeFalsy()
})
})

Expand Down
Loading
Loading