# Test info

- Name: Feature case for request-listing >> REQ_010 - Verify when user fill Text Editor in Create new request
- Location: /root/code/portal-automation-test/tests/request/function.spec.ts:259:9

# Error details

```
Error: expect(Buffer).toMatchSnapshot(expected)

  Expected an image 768px by 613px, received 1308px by 973px. 315171 pixels (ratio 0.25 of all image pixels) are different.

Expected: /root/code/portal-automation-test/tests/request/function.spec.ts-snapshots/post-details-create-snapshot-chromium-linux.png
Received: /root/code/portal-automation-test/test-results/tests-request-function-Fea-620fb-ditor-in-Create-new-request-chromium/post-details-create-snapshot-5-actual.png
    Diff: /root/code/portal-automation-test/test-results/tests-request-function-Fea-620fb-ditor-in-Create-new-request-chromium/post-details-create-snapshot-5-diff.png


Call Log:
- Test timeout of 80000ms exceeded
    at verifyScreenshot (/root/code/portal-automation-test/utils/screenshot.ts:22:8)
    at /root/code/portal-automation-test/tests/request/function.spec.ts:350:13
    at /root/code/portal-automation-test/tests/request/function.spec.ts:347:9
```

# Page snapshot

```yaml
- complementary:
  - img
  - link "(Portal-Auto-Lawyer) Portal QA":
    - /url: /
    - paragraph: (Portal-Auto-Lawyer)
    - paragraph: Portal QA
  - list:
    - listitem:
      - link "Home":
        - /url: https://qa.loprx.com
        - img
        - text: Home
    - listitem:
      - link "Case":
        - /url: https://qa.loprx.com/cases
        - img
        - text: Case
    - listitem:
      - link "Request":
        - /url: https://qa.loprx.com/requests
        - img
        - text: Request
    - listitem:
      - link "Client":
        - /url: https://qa.loprx.com/clients
        - img
        - text: Client
    - listitem:
      - button "Business/Contact":
        - img
        - text: Business/Contact
    - listitem:
      - button "Inbox/Sent":
        - img
        - text: Inbox/Sent
    - listitem:
      - button "Settings":
        - img
        - text: Settings
  - list:
    - listitem:
      - link "Shared with me":
        - /url: https://qa.loprx.com/shared/requests
        - img
        - text: Shared with me
- banner:
  - button:
    - img
  - button [disabled]:
    - img
  - img
  - text: Link Case First shared some information about New Case 123 Letter of Protection. Find out what it says. 1 week ago
  - img
  - text: What did Tri01 Duc say? Their response to Test Request Letter of Protection is waiting. 4 days ago
  - img
  - text: Link Case First shared details about Third Party Letter of Protection 1 week ago
  - img
  - text: What did Tri01 Duc say? Their response to Test Request Letter of Protection is waiting. 4 days ago
  - textbox "Search..."
  - img
  - img
  - textbox "Search..."
  - img
  - img
  - paragraph: No notifications yet
  - paragraph: When you get notifications, they'll show up here
  - button "Refresh"
  - list:
    - listitem:
      - img
      - paragraph: Pause notifications...
      - list:
        - listitem: For 30 minutes
        - listitem: For 1 hour
        - listitem: For 2 hours
        - listitem: Until tomorrow
    - listitem:
      - img
    - listitem:
      - img
    - listitem:
      - img
    - listitem:
      - img
    - listitem:
      - img
    - listitem:
      - img
  - img
  - button "4 Cart":
    - img
    - text: 4 Cart
  - text: Feedback
  - img
  - link "Open user menu":
    - /url: "#"
    - text: Minh
- img
- text: "#427998 Letter of Protection"
- img
- img
- img
- link "New Case 123":
  - /url: /clients/cb5cf076-c07b-4b92-a6f3-4cb578658b81
- text: "-"
- 'link "DOB: __/__/____"':
  - /url: /clients/cb5cf076-c07b-4b92-a6f3-4cb578658b81
- 'link "Case: #684455"':
  - /url: /cases/684455
- text: "-"
- 'link "DOI: 02/01/1999"':
  - /url: /cases/684455
- 'link "Category: Unspecified Accident"':
  - /url: /cases/684455
- text: Tag
- img
- 'button "Status: Open"'
- button "Status Details:":
  - text: "Status Details:"
  - listbox:
    - listitem:
      - text: Awaiting
      - img
  - img
- 'button "Assignee: --"':
  - text: "Assignee: --"
  - img
- button:
  - img
- button:
  - img
- button "Activity":
  - img
  - text: Activity
- button "Share":
  - img
  - text: Share
- paragraph: Minh Phong
- text: Posted
- paragraph: 01/31/2026
- img
- list:
  - listitem
- textbox "Message"
- button [disabled]:
  - img
- heading "Snapshot" [level=2]
- list:
  - listitem: Minh Phong 1 second ago Submitted a request Respond
- heading "Discussion" [level=2]
- text: Start a discussion
- img
- heading "Minh Phong (You)" [level=4]
- img
- heading "Team Discussion" [level=4]
- img
- heading "Discussion" [level=2]
- text: Start a discussion
- img
- heading "Minh Phong (You)" [level=4]
- img
- heading "Team Discussion" [level=4]
- img
- img "image-share-this-request"
- paragraph: Share this request using the Share button.
- text: Share
- img
- paragraph: "#427998"
- img
- img
- link "New Case 123 -":
  - /url: /clients/cb5cf076-c07b-4b92-a6f3-4cb578658b81
- 'link "DOB: __/__/____"':
  - /url: /clients/cb5cf076-c07b-4b92-a6f3-4cb578658b81
- 'link "Case: #684455 -"':
  - /url: /cases/684455
- 'link "DOI: 02/01/1999"':
  - /url: /cases/684455
- 'button "Status: Open"'
- button "Status Details:":
  - text: "Status Details:"
  - listbox:
    - listitem:
      - text: Awaiting
      - img
  - img
- 'button "Assignee: --"':
  - text: "Assignee: --"
  - img
- img
- img
- text: Back to request Minh Phong Posted
- img
- img
- paragraph: 01/31/2026
- iframe
- heading "Snapshot" [level=2]
- list:
  - listitem: Minh Phong 1 second ago Submitted a request Respond
- heading "Discussion" [level=2]
- text: Start a discussion
- img
- heading "Minh Phong (You)" [level=4]
- img
- heading "Team Discussion" [level=4]
- img
- heading "Discussion" [level=2]
- text: Start a discussion
- img
- heading "Minh Phong (You)" [level=4]
- img
- heading "Team Discussion" [level=4]
- img
- heading "Comment" [level=2]
- paragraph: Type something below!
- textbox "Comment..."
- button [disabled]:
  - img
```

# Test source

```ts
   1 | import { expect, Locator, Page } from "@playwright/test";
   2 |
   3 | const DEFAULT_VIEWPORT = { width: 1920, height: 1080 };
   4 |
   5 | export const verifyScreenshot = async (
   6 |     snapshotName: string,
   7 |     target: Page | Locator,
   8 |     mask?: Locator[],
   9 |     tolerance: number = 0,
  10 |     viewport: { width: number; height: number } = DEFAULT_VIEWPORT
  11 | ) => {
  12 |     const page = 'page' in target ? target.page() : target;
  13 |     await page.setViewportSize(viewport);
  14 |
  15 |     await page.waitForLoadState('domcontentloaded');
  16 |     await page.waitForTimeout(1_000);
  17 |
  18 |     await expect(async () => {
  19 |         expect(await target.screenshot({ mask })).toMatchSnapshot(snapshotName, {
  20 |             maxDiffPixelRatio: tolerance
  21 |         });
> 22 |     }).toPass();
     |        ^ Error: expect(Buffer).toMatchSnapshot(expected)
  23 | };
  24 |
  25 | export const takeScreenshot = async (snapshotName: string, target: Page | Locator, mask?: Locator[]) => {
  26 |     expect(await target.screenshot({
  27 |         mask
  28 |     })).toMatchSnapshot(snapshotName)
  29 | }
```