Skip to content

034 — should create multiple inquiries for same documentation

Description

Creates two separate inquiries within the same documentation, each scoped to a different segment, and verifies emails route to each segment's supplier only.

Preconditions

  • Clean database (TestControl.cleanDb())
  • User logged in with ADMIN and ACCOUNTING roles
  • Three segments (Seg1, Seg2, Seg3) created
  • Suppliers assigned to segments per scenario
  • One supplier per segment (3 total)

Steps

  1. Create Inquiry 1 for Segment 1 — Expected: Inquiry 1 detail page opens
  2. Create Inquiry 2 for Segment 2 (remove Segment 1 chip from auto-selection) — Expected: Inquiry 2 scoped to Segment 2
  3. Send emails from both inquiry pages — Expected: Supplier 1 receives 1 email, Supplier 2 receives 1 email, Supplier 3 receives 0 emails
  • Spec: tests/e2e/tests/documentations.spec.ts