# Test info

- Name: UI case for client tests >> SWR_017 - Verify add request to bulk Edit
- Location: /root/code/portal-automation-test/tests/share-with-me-request/function.spec.ts:527:7

# Error details

```
Error: Timed out 10000ms waiting for expect(locator).toContainText(expected)

Locator: locator('//li[@class=\'dropdown-select__filter-selected cursor-pointer\']')
Expected string: "Inquiry"
Received string: "Awaiting"
Call log:
  - expect.toContainText with timeout 10000ms
  - waiting for locator('//li[@class=\'dropdown-select__filter-selected cursor-pointer\']')
    9 × locator resolved to <li aria-selected="false" class="dropdown-select__filter-selected cursor-pointer">…</li>
      - unexpected value "Awaiting"

    at /root/code/portal-automation-test/tests/share-with-me-request/function.spec.ts:555:70
    at /root/code/portal-automation-test/tests/share-with-me-request/function.spec.ts:547:5
```

# Page snapshot

```yaml
- complementary:
  - img
  - link "WellCare Pharmacy12321@@@@ Portal QA":
    - /url: /
    - paragraph: WellCare Pharmacy12321@@@@
    - 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 "Patient":
        - /url: https://qa.loprx.com/clients
        - img
        - text: Patient
    - 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:
    - img
  - img
  - text: Minh Phong shared some information about New Case 123 Letter of Protection. Find out what it says. 3 days ago
  - img
  - text: "Get the details: Lawyer Phan's response to the Letter of Protection Test Request is now available. 3 days ago"
  - img
  - text: Son HaiBon Phan assigned a request to you 11 hours ago
  - img
  - text: Son HaiBon Phan assigned a case to you 1 hour ago
  - img
  - text: Minh Phong shared details regarding New Case 123 Letter of Protection. See the information now. 3 days ago
  - img
  - text: "Get the details: Lawyer Phan's response to the Letter of Protection Test Request is now available. 3 days ago"
  - img
  - text: Son HaiBon Phan assigned a request to you 11 hours ago
  - img
  - text: Son HaiBon Phan assigned a case to you 1 hour ago
  - 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:
    - img
  - button "0 Cart":
    - img
    - text: 0 Cart
  - text: Feedback
  - img
  - link "Open user menu":
    - /url: "#"
    - text: Minh
- img
- text: "#535795 Letter of Protection"
- img
- img
- text: "New Case 123 - DOB: __/__/____ Category: Unspecified Accident - DOI: 02/01/1999"
- 'button "Status: Open"'
- button "Status Details:":
  - text: "Status Details:"
  - listbox:
    - listitem:
      - text: Awaiting
      - img
  - img
- button:
  - img
- button:
  - img
- button "Activity":
  - img
  - text: Activity
- button "Share":
  - img
  - text: Share
- paragraph: Minh Phong
- text: Posted
- paragraph: 01/29/2026
- img
- list:
  - listitem
- textbox "Message"
- button [disabled]:
  - img
- heading "Snapshot" [level=2]
- list:
  - listitem: Minh Phong 01/29/2026 Submitted a request Respond
- heading "Discussion" [level=2]
- text: Start a discussion
- img
- heading "Minh Phong (You)" [level=4]
- img
- heading "Discussion" [level=2]
- text: Start a discussion
- img
- heading "Minh Phong (You)" [level=4]
- img
- img "image-share-this-request"
- paragraph: Share this request using the Share button.
- text: Share
```

# Test source

```ts
  455 |       const textActivity = await sharedRequestPage.getNewestRequestHistory();
  456 |       expect(textActivity).toContain(`responded to the request ${await getTodayInTimeZone()}`);
  457 |       await sharedRequestPage.verifyPostSnapshot();
  458 |       await sharedRequestPage.waitForSecond(5);
  459 |       await verifyScreenshot("post-details-snapshot-share-request.png", sharedRequestPage.shareRequestLoc.detailPostedAttachment, [], 0.02);
  460 |       await sharedRequestPage.page.close();
  461 |     });
  462 |
  463 |     await test.step("User B get noti and send back respond", async () => {
  464 |       const { context: contextB, sharedRequestPage: sharedRequestPageB } = await sharedRequestPage.loginInAnotherBrowser(browser, conf.data.username_recive, conf.data.password);
  465 |       await sharedRequestPageB.checkNotification("New Response", true);
  466 |       await sharedRequestPageB.verifyPostSnapshot();
  467 |       await verifyScreenshot("post-details-snapshot-share-request.png", sharedRequestPageB.shareRequestLoc.detailPostedAttachment, [], 0.02);
  468 |       await sharedRequestPageB.backToRequestList();
  469 |       await sharedRequestPageB.respondToRequest(conf.data.message);
  470 |       await sharedRequestPageB.waitForSecond(2) //Wait for activity update
  471 |
  472 |       const textActivityB = await sharedRequestPageB.getNewestRequestHistory();
  473 |       expect(textActivityB).toContain(`responded to the request ${await getTodayInTimeZone()}`);
  474 |       await sharedRequestPageB.verifyPostSnapshot();
  475 |       await verifyScreenshot("post-details-snapshot-share-request.png", sharedRequestPageB.shareRequestLoc.detailPostedAttachment, [], 0.02);
  476 |       await contextB.close();
  477 |     });
  478 |
  479 |     await test.step("User A check new noti and repond from user B", async () => {
  480 |       const { context: contextA, sharedRequestPage: sharedRequestPageA } = await sharedRequestPage.loginInAnotherBrowser(browser, conf.data.username, conf.data.password);
  481 |       await sharedRequestPageA.checkNotification("New Response", true);
  482 |       await sharedRequestPageA.verifyPostSnapshot();
  483 |       await verifyScreenshot("post-details-snapshot-share-request.png", sharedRequestPageA.shareRequestLoc.detailPostedAttachment, [], 0.02);
  484 |       await contextA.close();
  485 |     });
  486 |   });
  487 |
  488 |   test("SWR_016 - Verify archive/unarchive request", {
  489 |     tag: ['@SWR_016', '@share-request', '@function']
  490 |   }, async ({ conf }) => {
  491 |     await test.step("Archive a request", async () => {
  492 |       await sharedRequestPage.getDetailCase(conf.data.case);
  493 |       await sharedRequestPage.waitForSecond(2);
  494 |       await sharedRequestPage.dashboardLoc.buttonByText("Activity").click();
  495 |       await expect(sharedRequestPage.dashboardLoc.buttonByText("Archive")).toBeVisible();
  496 |       await sharedRequestPage.dashboardLoc.buttonByText("Archive").click();
  497 |       await expect(sharedRequestPage.dashboardLoc.msgSuccess.first()).toBeVisible();
  498 |       await sharedRequestPage.dashboardLoc.btnClosePopupNotification.click();
  499 |
  500 |       // Verify request not appear in list
  501 |       await sharedRequestPage.open();
  502 |       await sharedRequestPage.search(conf.data.case);
  503 |       await expect(sharedRequestPage.dashboardLoc.table.noResult).toBeVisible();
  504 |     });
  505 |
  506 |     await test.step("Unarchive a request", async () => {
  507 |       await sharedRequestPage.dashboardLoc.search.filter.btn.click();
  508 |       await sharedRequestPage.dashboardLoc.modal.inputByID("autocomplete_is_archived").click();
  509 |       await expect(sharedRequestPage.shareRequestLoc.optionMember("Yes")).toBeVisible();
  510 |       await sharedRequestPage.shareRequestLoc.optionMember("Yes").click();
  511 |       await sharedRequestPage.dashboardLoc.search.filter.popup.btnApply.click();
  512 |       await sharedRequestPage.getDetailCase(conf.data.case);
  513 |       await sharedRequestPage.waitForSecond(2);
  514 |       await expect(sharedRequestPage.dashboardLoc.buttonLinkByText("unarchiving.")).toBeVisible();
  515 |       await sharedRequestPage.dashboardLoc.buttonLinkByText("unarchiving.").click();
  516 |       await sharedRequestPage.dashboardLoc.buttonByText("Unarchive").click();
  517 |       await expect(sharedRequestPage.dashboardLoc.msgSuccess.first()).toBeVisible();
  518 |       await sharedRequestPage.dashboardLoc.btnClosePopupNotification.click();
  519 |
  520 |       // Verify request appear in list
  521 |       await sharedRequestPage.open();
  522 |       await sharedRequestPage.search(conf.data.case);
  523 |       await expect(sharedRequestPage.dashboardLoc.table.noResult).not.toBeVisible();
  524 |     });
  525 |   });
  526 |
  527 |   test("SWR_017 - Verify add request to bulk Edit", {
  528 |     tag: ['@SWR_017', '@share-request', '@function']
  529 |   }, async ({ conf, checkCart }) => {
  530 |     await test.step("Add a request to cart", async () => {
  531 |       await checkCart.getDetailCase(conf.data.case);
  532 |       await expect(checkCart.requestLoc.btnTakeActions).toBeVisible();
  533 |       await checkCart.waitForSecond(2);
  534 |       await checkCart.requestLoc.btnTakeActions.click();
  535 |       await checkCart.dashboardLoc.common.spanText("Add to Bulk Edit").click();
  536 |
  537 |       await checkCart.dashboardLoc.cart.buttonCart.hover({ force: true });
  538 |       await expect(checkCart.dashboardLoc.cart.requestButtonEditCart).toBeVisible();
  539 |       await checkCart.dashboardLoc.cart.requestButtonEditCart.click();
  540 |       await expect(async () => {
  541 |         const rowCount = await checkCart.dashboardLoc.table.dataRowsInTable.count();
  542 |         expect(rowCount).toBe(1);
  543 |       }).toPass();
  544 |       await expect(checkCart.dashboardLoc.listing.table.tableRowTd(conf.data.case)).toBeVisible();
  545 |     });
  546 |
  547 |     await test.step("Edit request in cart", async () => {
  548 |       await checkCart.dashboardLoc.buttonByText("Next").click();
  549 |       await checkCart.dashboardLoc.modal.inputByClass("form-check-input").first().check();
  550 |       await checkCart.dashboardLoc.buttonByText("Next").click();
  551 |       await checkCart.dashboardLoc.buttonByText("Next").click();
  552 |       await checkCart.dashboardLoc.buttonByText("Confirmation").click();
  553 |       await checkCart.dashboardLoc.buttonByText("Done").click();
  554 |
> 555 |       await expect(checkCart.dashboardLoc.detail.statusDetailsInput).toContainText("Inquiry");
      |                                                                      ^ Error: Timed out 10000ms waiting for expect(locator).toContainText(expected)
  556 |     });
  557 |
  558 |     await test.step("Change status detail back to Awaiting", async () => {
  559 |       await sharedRequestPage.dashboardLoc.status.btnOpenStatusDetailDropdown.click();
  560 |       await sharedRequestPage.waitForSecond(1);
  561 |       await expect(sharedRequestPage.dashboardLoc.status.statusDetailOption("Awaiting")).toBeVisible();
  562 |       await sharedRequestPage.dashboardLoc.status.statusDetailOption("Awaiting").click();
  563 |       await expect(checkCart.dashboardLoc.detail.statusDetailsInput).toContainText("Awaiting");
  564 |     });
  565 |   });
  566 |
  567 |   test("SWR_018 - Verify unfollow request", {
  568 |     tag: ['@SWR_018', '@share-request', '@function']
  569 |   }, async ({ conf, browser }) => {
  570 |     test.setTimeout(150_000);
  571 |     await test.step("Share a request to a member", async () => {
  572 |       await sharedRequestPage.getDetailCase(conf.data.case);
  573 |       await sharedRequestPage.dashboardLoc.buttonByText("Share").click();
  574 |       await sharedRequestPage.dashboardLoc.modal.inputByID("multi_select_emails").first().type(conf.data.member_share, { delay: 100 });
  575 |       await expect(sharedRequestPage.shareRequestLoc.optionMember(conf.data.member_share)).toBeVisible();
  576 |       await sharedRequestPage.shareRequestLoc.optionMember(conf.data.member_share).click();
  577 |       await sharedRequestPage.dashboardLoc.modal.headerModal("Share with others").click();
  578 |       await sharedRequestPage.dashboardLoc.buttonByText("Done").first().click();
  579 |       await expect(sharedRequestPage.dashboardLoc.msgSuccess.first()).toBeVisible({ timeout: 25_000 });
  580 |       await sharedRequestPage.dashboardLoc.btnClosePopupNotification.click();
  581 |     });
  582 |
  583 |     await test.step("Unfollow a request", async () => {
  584 |       const { context: contextA, sharedRequestPage: sharedRequestPageA } = await sharedRequestPage.loginInAnotherBrowser(browser, conf.data.username_recive, conf.data.password);
  585 |       await sharedRequestPageA.open();
  586 |       await sharedRequestPageA.getDetailCase(conf.data.case);
  587 |       await sharedRequestPageA.waitForSecond(1);
  588 |       await sharedRequestPageA.dashboardLoc.buttonByText("Share").click();
  589 |       await sharedRequestPageA.dashboardLoc.common.spanText("Unfollow").click();
  590 |       await sharedRequestPageA.dashboardLoc.common.popUpConfirm.click();
  591 |       await expect(sharedRequestPageA.dashboardLoc.notificationUnfollow.first()).toBeVisible({ timeout: 25_000 });
  592 |       await sharedRequestPageA.search(conf.data.case);
  593 |       await expect(sharedRequestPageA.dashboardLoc.table.noResult).toBeVisible({ timeout: 25_000 });
  594 |       await contextA.close();
  595 |     });
  596 |
  597 |     await test.step("Verify user A not in modal share", async () => {
  598 |       await sharedRequestPage.page.reload();
  599 |       await sharedRequestPage.dashboardLoc.buttonByText("Share").click();
  600 |       await sharedRequestPage.waitForSecond(1);
  601 |       await expect(sharedRequestPage.dashboardLoc.common.pText(conf.data.member_share)).not.toBeVisible();
  602 |     });
  603 |   });
  604 |
  605 |   // Waiting for link case feature complete
  606 |   // test("SWC_004 - Verify search and select suggest client", {
  607 |   //   tag: ['@SWC_004', '@share-request', '@function']
  608 |   // }, async ({ conf }) => {
  609 |   //   await test.step("Search and open modal Manually link case", async () => {
  610 |   //     await sharedRequestPage.getDetailCase(conf.data.case);
  611 |   //     await expect(sharedRequestPage.dashboardLoc.common.spanText("Organize Now")).toBeVisible();
  612 |
  613 |   //     await sharedRequestPage.dashboardLoc.common.spanText("Organize Now").click();
  614 |   //     await expect(sharedRequestPage.dashboardLoc.modal.headerModalh2("You already have this case")).toBeVisible();
  615 |
  616 |   //     await sharedRequestPage.dashboardLoc.common.spanText("I want to do Manually").click();
  617 |   //     await expect(sharedRequestPage.dashboardLoc.modal.headerModalh2("Manually link to case")).toBeVisible();
  618 |   //   })
  619 |
  620 |   //   await test.step("Search client and choose DOI", async () => {
  621 |   //     // Search another client
  622 |   //     await sharedRequestPage.dashboardLoc.modal.inputByID("autocomplete_customer").first().fill(conf.data.another_client_name);
  623 |   //     await expect(sharedRequestPage.shareRequestLoc.optionMember(`${conf.data.another_client_name} (${conf.data.another_client_dob})`)).toBeVisible({ timeout: 10_000 });
  624 |   //     await sharedRequestPage.shareRequestLoc.optionMember(`${conf.data.another_client_name} (${conf.data.another_client_dob})`).click();
  625 |   //     await sharedRequestPage.waitForSecond(1);
  626 |   //     await expect(sharedRequestPage.shareRequestLoc.linkCase.prevClient).toContainText(conf.data.another_client_name);
  627 |   //     await expect(sharedRequestPage.shareRequestLoc.linkCase.prevClient).toContainText(conf.data.another_client_dob);
  628 |
  629 |   //     // Choose another client in list suggest
  630 |   //     await sharedRequestPage.waitForSecond(1);
  631 |   //     await sharedRequestPage.dashboardLoc.common.spanText(`DOB: ${conf.data.client_dob}`).click();
  632 |   //     await sharedRequestPage.waitForSecond(1);
  633 |   //     await expect(sharedRequestPage.shareRequestLoc.linkCase.prevClient).toContainText(conf.data.client_name);
  634 |   //     await expect(sharedRequestPage.shareRequestLoc.linkCase.prevClient).toContainText(conf.data.client_dob);
  635 |   //     await expect(sharedRequestPage.dashboardLoc.common.spanText(`DOI: ${conf.data.client_doi}`)).toBeVisible();
  636 |   //   });
  637 |
  638 |   //   await test.step("Select DOI with suggest DOI", async () => {
  639 |   //     // Select DOI
  640 |   //     await sharedRequestPage.dashboardLoc.common.spanText(`DOI: ${conf.data.client_doi}`).click();
  641 |   //     expect(sharedRequestPage.dashboardLoc.modal.inputByID("radio-is_doi_sender_or_custom-choise-case-doi").isChecked()).toBeTruthy();
  642 |   //     await expect(sharedRequestPage.shareRequestLoc.linkCase.selectedDoi).toContainText(conf.data.client_doi);
  643 |
  644 |   //     // Click Add new
  645 |   //     await sharedRequestPage.dashboardLoc.common.spanText("Click here to add new!").click();
  646 |   //     await expect(sharedRequestPage.shareRequestLoc.linkCase.selectedDoi).not.toBeVisible();
  647 |   //     await expect(sharedRequestPage.dashboardLoc.modal.inputByID("date_time_edit-doi")).toHaveValue('');
  648 |   //   });
  649 |
  650 |   //   await test.step("Click at Present DOI", async () => {
  651 |   //     await sharedRequestPage.dashboardLoc.modal.inputByID("radio-is_doi_sender_or_custom-choise-case-custom").check();
  652 |   //     await expect(sharedRequestPage.dashboardLoc.modal.inputByID("radio-is_doi_sender_or_custom-choise-case-doi")).not.toBeChecked();
  653 |
  654 |   //     // Click Add new
  655 |   //     await sharedRequestPage.dashboardLoc.common.spanText("Click here to add new!").last().click();
```