Skip to main content

Integration Tests

Our Testing Framework: Jest

We will be using Jest for integration testing.

Use Case 1: New Member Joins Team

Description: A new team member submits a question to the chatbot and receives relevant documentation and suggested next steps.

Assertions:

  • The chatbot receives the user's question and returns a response.
  • The system searches internal documentation based on the user's access permissions.
  • The response includes relevant documentation, summaries, and suggested next steps.
  • If no internal sources are found, the system notifies the user and suggests contacting a team member.

Use Case 2: User Uploads Documentation to the Database

Description: A user uploads a document which is validated, flagged for approval, and indexed for AI retrieval upon approval.

Assertions:

  • The system validates the file format, size, and security.
  • The document is marked as Pending Approval after upload.
  • The designated reviewer is notified.
  • Upon approval, the document is indexed and becomes searchable.
  • If rejected, the user receives feedback and can resubmit.

Use Case 3: Experienced Member Is Referred to Help a New User

Description: When the chatbot cannot sufficiently help a new user, a subject-matter expert is identified and connected.

Assertions:

  • The chatbot identifies relevant subject-matter experts based on the topic.
  • The system requests user consent before contacting an expert.
  • Upon acceptance from both parties, a shared chat is created.
  • If no expert is available, the chatbot suggests alternative resources.

Use Case 4: Experienced Member Accessing External Sources

Description: When no internal documentation is found, the system supplements results with vetted external sources.

Assertions:

  • The system correctly determines no internal content is available.
  • Curated external resources are returned filtered for credibility, recency, and relevance.
  • External sources are clearly labeled with disclaimers.
  • If external sources are also unavailable, the system alerts the user and suggests escalation.

Use Case 5: Manager Views AI Usage Analytics

Description: A manager logs into the analytics dashboard to review team knowledge gaps and usage trends.

Assertions:

  • The dashboard displays popular topics, recurring questions, and resolution rates.
  • Individual user data is anonymized in all displayed results.
  • The manager can access aggregated insights without special permissions.
  • If analytics data is unavailable, the issue is logged and administrators are notified.