Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/

import { describe, expect, it } from 'vitest';
import { ticketHasReceipt, ticketReceiptMessage, ticketReceiptText } from '../ticket-receipt';
import { TICKET_CREATION_SOURCE, ticketHasReceipt, ticketReceiptMessage, ticketReceiptText } from '../ticket-receipt';

const FAE = { name: 'Fae', authorType: 'fae' as const, assistantType: 'fae' as const };

Expand All @@ -27,6 +27,8 @@ describe('ticketReceiptMessage', () => {
expect(ticketHasReceipt({ creationSource: 'FAE_FORM' })).toBe(true);
expect(ticketHasReceipt({ creationSource: 'ADMIN_DASHBOARD' })).toBe(true);
expect(ticketHasReceipt({ creationSource: 'EMAIL' })).toBe(false);
expect(TICKET_CREATION_SOURCE.EMAIL).toBe('EMAIL');
expect(ticketHasReceipt({ creationSource: TICKET_CREATION_SOURCE.EMAIL })).toBe(false);
Comment thread
andriikachur marked this conversation as resolved.
Resolved
expect(ticketReceiptMessage({ id: 't', creationSource: 'EMAIL' }, FAE)).toBeNull();
expect(ticketReceiptMessage(null, FAE)).toBeNull();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export const TICKET_CREATION_SOURCE = {
FAE_FORM: 'FAE_FORM',
/** A technician, on the dashboard, for the end user's device. */
ADMIN_DASHBOARD: 'ADMIN_DASHBOARD',
/** The end user's email to the support mailbox (email-to-ticket). Its chat opens with the email itself, no receipt. */
EMAIL: 'EMAIL',
} as const;

/** The ticket a receipt is about. */
Expand Down
Loading