Back to App

SalesCRM — Automation Testing Guide

Complete reference for practising Playwright test automation on the SalesCRM application — 8 modules, full CRUD, search, filters, modals and SLA tracking.

Playwright End-to-End 60+ Scenarios CRM App

App Overview & Architecture

SalesCRM is a single-page CRM practice application with 8 fully functional modules. Navigation is sidebar-based — clicking each nav item switches the visible tab without a page reload. All data is persisted in localStorage under the key crm_v2, so state survives refreshes within the same browser.

Module Navigation Key Functionality
DashboardDefault tab on loadKPI stats, pipeline funnel, recent activity, quick actions
Contacts & AccountsSidebar → Contacts & AccountsAdd/edit/delete contacts, view account cards
Lead ManagementSidebar → Lead ManagementCapture leads, score/rate, funnel view, convert to contact
Sales PipelineSidebar → Sales PipelineKanban board, 5 stages, opportunity cards, metrics
Activities & TasksSidebar → Activities & TasksSchedule calls/meetings/emails/tasks, mark complete
CommunicationsSidebar → CommunicationsInbound/outbound interaction log, view details
Marketing CampaignsSidebar → Marketing CampaignsCampaign cards with open/click/conversion metrics
Support & TicketsSidebar → Support & TicketsPriority/SLA-tracked support tickets, edit and resolve

1. Dashboard & Analytics

The Dashboard is the default landing tab. It aggregates KPI metrics across all modules and provides quick access to common actions.

  • 1Observe the five KPI stat cards: Total Contacts, Accounts, Active Pipeline (dollar value), Open Tickets, and Active Campaigns
  • 2Verify each stat card shows a number loaded from the seed data, not a dash or zero
  • 3Locate the Pipeline Funnel card on the left showing stage-by-stage opportunity counts
  • 4On the right, observe the Recent Activities panel listing the five most recent scheduled activities with type icon and assigned user
  • 5Click View All in the Recent Activities header and verify the Activities tab becomes active
  • 6Locate the Quick Actions strip at the bottom with six action tiles
  • 7Click Add Contact — verify the app switches to the Contacts tab and the Add Contact modal opens
  • 8Click Capture Lead — verify the app switches to Leads tab and the Capture Lead modal opens
  • 9Click New Opportunity — verify navigation to Pipeline tab and the opportunity modal opens
  • 10Click Schedule Activity, Open Ticket, and New Campaign and verify each navigates to the correct tab and opens the relevant modal

2. Contacts & Accounts

The Contacts tab displays 8 seeded contacts linked to 6 seeded accounts. Both entities support search, full CRUD, and linked data.

  • 1Click Contacts & Accounts in the sidebar — verify the account cards grid loads at the top showing 6 company cards
  • 2Each account card shows company name, industry, type, and contact count
  • 3Below the accounts grid, the contacts table lists all 8 contacts with name/title, email, phone, and account name
  • 4Type a contact name (e.g. "Sarah") in the search box and verify the table filters in real time
  • 5Click Add Contact — verify the Add Contact modal opens with First Name, Last Name, Email, Phone, Job Title, Account dropdown, and Notes fields
  • 6Fill all required fields and click Save Contact — verify the success toast and the new row appears in the table
  • 7Click the eye icon on any contact row to open the View Contact modal showing all saved details
  • 8Close the view modal, then click the edit icon — verify the modal pre-populates all fields with the saved values
  • 9Change the Phone number and click Save — verify the toast and updated value in the table
  • 10Click the trash icon — confirm the browser dialog — verify the row is removed from the table

3. Lead Management

The Lead Management tab shows a conversion funnel and a registry of 6 seeded leads with scoring, rating, and status tracking.

  • 1Click Lead Management in the sidebar — observe the four funnel tiles: New, Contacted, Qualified, Converted showing counts
  • 2Verify the leads table shows 6 rows with name, company, email, source, score bar, rating badge, and status badge
  • 3Click Capture Lead — verify the lead modal opens with First Name, Last Name, Email, Phone, Company, Job Title, Source, Rating, Score (0–100), and Status fields
  • 4Enter a score of 150 and click Save — verify the validation toast "Score must be between 0 and 100"
  • 5Fix the score to 80, complete all required fields, and save — verify the lead appears in the table and the funnel count for its status increments
  • 6Use the search box to find a lead by company name — verify the table filters correctly
  • 7Use the status dropdown filter to show only Qualified leads — verify only those rows are visible
  • 8Click the edit icon on a lead — change the status to Contacted and save — verify the funnel tile counts update
  • 9Click the convert icon (user-check) on a lead — confirm the dialog — verify the success toast "Lead converted to contact successfully"
  • 10Navigate to the Contacts tab and verify the converted lead now appears as a new contact row
  • 11Return to Leads and verify the converted lead's status badge now shows Converted
  • 12Delete a lead using the trash icon and verify it is removed from both the table and funnel counts

4. Sales Pipeline

The Pipeline tab provides a Kanban board with 5 stages and 4 revenue metric cards. Opportunities can be clicked to edit and then re-staged.

  • 1Click Sales Pipeline — verify 4 metric cards show Pipeline Value, Weighted Forecast, Closed Won, and Closed Lost values
  • 2Identify the 5 kanban columns: Prospect, Qualification, Proposal, Negotiation, and Closed Won — each shows a count badge
  • 3Verify each opportunity card shows the deal name, amount, account name, probability percentage, and expected close date
  • 4Click an opportunity card — verify the Edit Opportunity modal opens pre-populated with all fields
  • 5Change the Stage from Proposal to Negotiation and click Save — verify the card moves to the Negotiation column
  • 6Click New Opportunity — fill in Name, Amount, Stage, Probability, and Close Date — verify it appears in the correct stage column
  • 7Create an opportunity in Proposal stage and verify the Pipeline Value metric increases accordingly
  • 8Edit an opportunity and change its stage to Closed Won — verify the Closed Won metric updates
  • 9Verify the Account and Contact dropdowns in the modal are pre-populated from the seed data
  • 10Leave the Name field blank and click Save — verify the required-field validation toast

5. Activities & Tasks

The Activities tab logs all scheduled and completed tasks — calls, meetings, emails, and generic tasks — with priority and overdue indicators.

  • 1Click Activities & Tasks — verify 5 seeded activities load with type icon, subject, category, contact, due date, priority badge, and status badge
  • 2Verify any activity with a past due date shows an Overdue status badge in red
  • 3Use the search box to filter by keyword — then use the Type dropdown (Call / Meeting / Email / Task) to narrow further
  • 4Use the Status dropdown to show only Overdue activities — verify the correct rows appear
  • 5Click Schedule Activity — verify the modal opens with Type, Priority, Subject, Related Contact, Due Date, Due Time, and Notes
  • 6Submit with the Subject left blank — verify the validation toast
  • 7Fill all required fields and save — verify the success toast and new row in the table
  • 8Click the check icon on a Scheduled activity — verify the status changes to Completed
  • 9Click the edit icon on any activity — change the priority and save — verify the badge updates
  • 10Delete an activity using the trash icon and confirm the dialog — verify the row is removed

6. Communications

The Communications tab is a read-only interaction log showing all email and call records linked to contacts with direction and status tracking.

  • 1Click Communications — verify 4 seeded records load showing type icon, subject, contact name, direction, status, and timestamp
  • 2Verify direction badges distinguish Outbound (blue) from Inbound (amber)
  • 3Use the search box to search by subject keyword — verify matching rows stay visible
  • 4Use the Direction dropdown to filter to Outbound only — verify only outbound records appear
  • 5Click the eye icon on any row — verify the View Communication modal opens with Type, Subject, Contact, Direction, Status, Date/Time, and optional Template/Notes fields
  • 6Close the modal using the × button
  • 7Click outside the modal area (backdrop) to verify it also closes
  • 8Press the Escape key on the keyboard when a modal is open and verify it closes

7. Marketing Campaigns

The Campaigns tab shows 3 seeded campaign cards with email delivery metrics — sent, delivered, open rate, and click rate — plus full CRUD operations.

  • 1Click Marketing Campaigns — verify 3 campaign cards load in a responsive grid
  • 2Each card shows the campaign name, type, status badge, 4 metric tiles (Sent, Delivered, Open Rate, Click Rate), date range, and action buttons
  • 3Verify the Spring Product Launch card shows Active status badge in green
  • 4Use the search box to search for "Trade Show" — verify only that campaign card is visible
  • 5Use the Status filter dropdown to show Draft campaigns only — verify the correct cards appear
  • 6Click New Campaign — verify the modal opens with Name, Type, Status, Start Date, End Date, Budget, and Description fields
  • 7Set End Date before Start Date and save — observe whether validation handles it gracefully
  • 8Fill all required fields with valid dates and save — verify the new campaign card appears in the grid
  • 9Click the edit icon on an existing campaign — change the status to Active and save — verify the badge updates in the card
  • 10Verify that editing a campaign preserves its sent/delivered/opened/clicked metrics
  • 11Delete a campaign and verify it disappears from the grid

8. Support & Tickets

The Support tab manages customer support tickets with priority-based SLA deadlines, status tracking, and resolution workflows.

  • 1Click Support & Tickets — verify four KPI stat cards show Open, In Progress, Resolved, and Critical Open counts
  • 2Verify the tickets table shows 4 seeded rows with ticket ID, subject, contact, account, priority badge, status badge, and SLA indicator
  • 3Check the SLA column — a past-deadline ticket should show Breached in red; an active one shows On Track in green or At Risk in amber
  • 4Use the search box to search by subject keyword — verify matching rows appear
  • 5Use the Priority dropdown to filter by Critical — verify only critical priority tickets are shown
  • 6Use the Status dropdown to show In Progress tickets — verify correct rows
  • 7Click Open Ticket — verify the modal opens with Subject, Contact, Account, Priority, Category, Status, and Description fields
  • 8Save a ticket with Priority set to Critical — verify the SLA deadline is automatically set to 4 hours from now
  • 9Save a ticket with Priority set to High — verify the SLA is set to 8 hours
  • 10Click the edit icon on an Open ticket — change the status to In Progress and save — verify the KPI stat cards update
  • 11Click the resolve icon on an In Progress ticket — confirm the dialog — verify status changes to Resolved and the Resolved counter increments
  • 12Verify that a Resolved ticket shows SLA status as Met

Test Scenarios

Happy Path

TC-001: Dashboard Stats Load

Open the app → Verify all 5 KPI stat cards show non-zero values loaded from seed data

TC-002: Add a New Contact

Contacts tab → Add Contact → Fill all fields → Save → Verify new row appears in the table

TC-003: Edit a Contact

Click edit icon on Sarah Johnson → Change phone number → Save → Verify updated value in table

TC-004: View Contact Details Modal

Click eye icon on any contact → Verify all fields shown in modal → Close with × button

TC-005: Capture and Score a Lead

Leads tab → Capture Lead → Fill form with score 85, rating Hot → Save → Verify row and funnel count

TC-006: Convert Lead to Contact

Click convert icon on a Qualified lead → Confirm → Verify success toast → Check Contacts tab for new entry

TC-007: Pipeline Kanban View

Pipeline tab → Verify 5 columns load with appropriate opportunity cards in each

TC-008: Move Opportunity Stage

Click an opportunity card → Change stage from Prospect to Qualification → Save → Verify card moves column

TC-009: Create New Opportunity

Pipeline tab → New Opportunity → Fill all fields → Save → Verify card appears in the chosen stage column

TC-010: Schedule a Call Activity

Activities tab → Schedule Activity → Type: Call → Fill subject, contact, date, time → Save → Verify row

TC-011: Mark Activity Complete

Click the check icon on a Scheduled activity → Verify status badge changes to Completed

TC-012: View Communication Details

Communications tab → Click eye icon on any row → Verify modal shows type, subject, contact, and timestamp

TC-013: Create a Campaign

Campaigns tab → New Campaign → Fill name, type Active, dates, budget → Save → Verify card in grid

TC-014: Open and Resolve a Ticket

Support tab → Open Ticket → Fill subject with High priority → Save → Then resolve it → Verify stat cards update

TC-015: SLA Auto-Assignment on Ticket

Create a Critical ticket → Verify the SLA deadline shown is approximately 4 hours from now

Negative / Edge Cases

TC-016: Save Contact with Missing Required Fields

Add Contact modal → Leave Email blank → Click Save → Verify validation toast without closing modal

TC-017: Lead Score Out of Range

Enter score 150 in Capture Lead → Click Save → Verify toast "Score must be between 0 and 100"

TC-018: Save Opportunity Without Name

New Opportunity modal → Leave Name blank → Save → Verify validation toast and modal stays open

TC-019: Save Activity Without Subject

Schedule Activity → Leave Subject blank → Click Save → Verify required-field toast

TC-020: Save Campaign Without Name

New Campaign → Leave Name empty → Click Save → Verify validation prevents save

TC-021: Delete Contact Confirmation Dialog

Click trash icon on a contact → Dismiss the confirm dialog → Verify contact still exists in table

TC-022: Delete Lead Confirmation

Click trash icon on a lead → Dismiss → Verify lead remains → Confirm → Verify lead removed and funnel updates

TC-023: Activity Search No Results

Activities tab → Search for "xyz999" → Verify all rows hidden (empty table)

TC-024: Campaign Status Filter

Campaigns tab → Filter to Draft → Verify only Draft campaigns visible → Switch to All → All reappear

TC-025: Modal Keyboard Dismiss

Open any modal → Press Escape key → Verify modal closes without saving

TC-026: Modal Backdrop Dismiss

Open any modal → Click the dark backdrop outside the modal box → Verify modal closes

TC-027: Data Persistence After Refresh

Add a contact → Refresh the page → Navigate to Contacts → Verify the new contact still exists

TC-028: Sidebar Active State

Click each of the 8 sidebar nav items → Verify the clicked item gets the active highlight and the correct tab renders

TC-029: Pipeline Metric Update

Closed Won metric → Create an opportunity in Closed Won stage → Verify the Closed Won metric on the pipeline tab increases

TC-030: Ticket Priority Filter

Support tab → Filter by Critical → Verify only Critical tickets shown → Change to All → All tickets return

SalesCRM — Playwright Practice App | Open App