Advertisement
ayush-AI

patient-chart-test-logs

Mar 28th, 2023 (edited)
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 19.60 KB | None | 0 0
  1. Summary of all failing tests
  2.  FAIL  packages/esm-patient-chart-app/src/visit/visits-widget/past-visits-components/visits-table/visits-table.test.tsx (14.897 s)
  3.   ● EncounterList › renders a tabular overview of the patient's clinical encounters
  4.  
  5.    TestingLibraryElementError: Unable to find an accessible element with the role "row" and name `/18-Jan-2022, 04:25\s+PM Facility Visit Admission/i`
  6.  
  7.    Here are the accessible roles:
  8.  
  9.      region:
  10.  
  11.      Name "data table toolbar":
  12.      <section
  13.        aria-label="data table toolbar"
  14.        class="cds--table-toolbar"
  15.      />
  16.  
  17.      --------------------------------------------------
  18.      button:
  19.  
  20.      Name "Filter by encounter type:":
  21.      <button
  22.        aria-disabled="false"
  23.        aria-expanded="false"
  24.        aria-haspopup="listbox"
  25.        aria-labelledby="downshift-0-label downshift-0-toggle-button"
  26.        class="cds--list-box__field"
  27.        id="downshift-0-toggle-button"
  28.        title="All"
  29.        type="button"
  30.      />
  31.  
  32.      Name "Clear search input":
  33.      <button
  34.        aria-label="Clear search input"
  35.        class="cds--search-close cds--search-close--hidden"
  36.        title="Clear search input"
  37.        type="button"
  38.      />
  39.  
  40.      Name "Expand all rows":
  41.      <button
  42.        aria-label="Expand all rows"
  43.        class="cds--table-expand__button"
  44.        type="button"
  45.      />
  46.  
  47.      Name "Expand current row":
  48.      <button
  49.        aria-label="Expand current row"
  50.        class="cds--table-expand__button"
  51.        type="button"
  52.      />
  53.  
  54.      Name "Encounter table actions menu":
  55.      <button
  56.        aria-expanded="false"
  57.        aria-haspopup="true"
  58.        aria-label="Encounter table actions menu"
  59.        class="cds--overflow-menu cds--overflow-menu--lg"
  60.        data-floating-menu-container="true"
  61.        type="button"
  62.      />
  63.  
  64.      Name "Expand current row":
  65.      <button
  66.        aria-label="Expand current row"
  67.        class="cds--table-expand__button"
  68.        type="button"
  69.      />
  70.  
  71.      Name "Encounter table actions menu":
  72.      <button
  73.        aria-expanded="false"
  74.        aria-haspopup="true"
  75.        aria-label="Encounter table actions menu"
  76.        class="cds--overflow-menu cds--overflow-menu--lg"
  77.        data-floating-menu-container="true"
  78.        type="button"
  79.      />
  80.  
  81.      Name "Expand current row":
  82.      <button
  83.        aria-label="Expand current row"
  84.        class="cds--table-expand__button"
  85.        type="button"
  86.      />
  87.  
  88.      Name "Encounter table actions menu":
  89.      <button
  90.        aria-expanded="false"
  91.        aria-haspopup="true"
  92.        aria-label="Encounter table actions menu"
  93.        class="cds--overflow-menu cds--overflow-menu--lg"
  94.        data-floating-menu-container="true"
  95.        type="button"
  96.      />
  97.  
  98.      Name "Previous page":
  99.      <button
  100.        aria-labelledby="tooltip-8"
  101.        class="cds--btn--icon-only cds--pagination__button cds--pagination__button--backward cds--pagination__button--no-index cds--btn cds--btn--md cds--btn--ghost cds--btn--disabled"
  102.        disabled=""
  103.        tabindex="0"
  104.        type="button"
  105.      />
  106.  
  107.      Name "Next page":
  108.      <button
  109.        aria-labelledby="tooltip-10"
  110.        class="cds--btn--icon-only cds--pagination__button cds--pagination__button--forward cds--pagination__button--no-index cds--btn cds--btn--md cds--btn--ghost cds--btn--disabled"
  111.        disabled=""
  112.        tabindex="0"
  113.        type="button"
  114.      />
  115.  
  116.      --------------------------------------------------
  117.      img:
  118.  
  119.      Name "Open menu":
  120.      <svg
  121.        aria-label="Open menu"
  122.        fill="currentColor"
  123.        focusable="false"
  124.        height="16"
  125.        name="chevron--down"
  126.        preserveAspectRatio="xMidYMid meet"
  127.        role="img"
  128.        viewBox="0 0 16 16"
  129.        width="16"
  130.        xmlns="http://www.w3.org/2000/svg"
  131.      />
  132.  
  133.      Name "Open and close list of options":
  134.      <svg
  135.        aria-label="Open and close list of options"
  136.        class="cds--overflow-menu__icon"
  137.        fill="currentColor"
  138.        focusable="false"
  139.        height="16"
  140.        preserveAspectRatio="xMidYMid meet"
  141.        role="img"
  142.        viewBox="0 0 32 32"
  143.        width="16"
  144.        xmlns="http://www.w3.org/2000/svg"
  145.      />
  146.  
  147.      Name "Open and close list of options":
  148.      <svg
  149.        aria-label="Open and close list of options"
  150.        class="cds--overflow-menu__icon"
  151.        fill="currentColor"
  152.        focusable="false"
  153.        height="16"
  154.        preserveAspectRatio="xMidYMid meet"
  155.        role="img"
  156.        viewBox="0 0 32 32"
  157.        width="16"
  158.        xmlns="http://www.w3.org/2000/svg"
  159.      />
  160.  
  161.      Name "Open and close list of options":
  162.      <svg
  163.        aria-label="Open and close list of options"
  164.        class="cds--overflow-menu__icon"
  165.        fill="currentColor"
  166.        focusable="false"
  167.        height="16"
  168.        preserveAspectRatio="xMidYMid meet"
  169.        role="img"
  170.        viewBox="0 0 32 32"
  171.        width="16"
  172.        xmlns="http://www.w3.org/2000/svg"
  173.      />
  174.  
  175.      --------------------------------------------------
  176.      listbox:
  177.  
  178.      Name "Filter by encounter type:":
  179.      <div
  180.        aria-labelledby="downshift-0-label"
  181.        class="cds--list-box__menu"
  182.        id="downshift-0-menu"
  183.        role="listbox"
  184.        tabindex="-1"
  185.      />
  186.  
  187.      --------------------------------------------------
  188.      search:
  189.  
  190.      Name "Filter table":
  191.      <div
  192.        aria-labelledby="1-search"
  193.        class="cds--search cds--search--lg search cds--toolbar-search-container-active cds--toolbar-search-container-expandable"
  194.        role="search"
  195.      />
  196.  
  197.      --------------------------------------------------
  198.      searchbox:
  199.  
  200.      Name "Filter table":
  201.      <input
  202.        autocomplete="off"
  203.        class="cds--search-input"
  204.        id="1"
  205.        placeholder="Search this list"
  206.        role="searchbox"
  207.        tabindex="0"
  208.        type="text"
  209.        value=""
  210.      />
  211.  
  212.      --------------------------------------------------
  213.      table:
  214.  
  215.      Name "":
  216.      <table
  217.        class="cds--data-table cds--data-table--lg cds--data-table--zebra cds--data-table--visible-overflow-menu"
  218.      />
  219.  
  220.      --------------------------------------------------
  221.      rowgroup:
  222.  
  223.      Name "":
  224.      <thead />
  225.  
  226.      Name "":
  227.      <tbody
  228.        aria-live="polite"
  229.      />
  230.  
  231.      --------------------------------------------------
  232.      row:
  233.  
  234.      Name "Date & time Visit type Encounter type Provider":
  235.      <tr />
  236.  
  237.      Name "18-Jan-2022, 09:55 PM Facility Visit Admission -- Open and close list of options":
  238.      <tr
  239.        class="cds--parent-row"
  240.        data-parent-row="true"
  241.      />
  242.  
  243.      Name "":
  244.      <tr
  245.        class="cds--expandable-row hiddenRow"
  246.        data-child-row="true"
  247.      />
  248.  
  249.      Name "03-Aug-2021, 06:17 AM Facility Visit Visit Note User One Open and close list of options":
  250.      <tr
  251.        class="cds--parent-row"
  252.        data-parent-row="true"
  253.      />
  254.  
  255.      Name "":
  256.      <tr
  257.        class="cds--expandable-row hiddenRow"
  258.        data-child-row="true"
  259.      />
  260.  
  261.      Name "05-Jul-2021, 03:37 PM Facility Visit Consultation Dennis The Doctor Open and close list of options":
  262.      <tr
  263.        class="cds--parent-row"
  264.        data-parent-row="true"
  265.      />
  266.  
  267.      Name "":
  268.      <tr
  269.        class="cds--expandable-row hiddenRow"
  270.        data-child-row="true"
  271.      />
  272.  
  273.      --------------------------------------------------
  274.      columnheader:
  275.  
  276.      Name "":
  277.      <th
  278.        class="cds--table-expand"
  279.        id="expand"
  280.        scope="col"
  281.      />
  282.  
  283.      Name "Date & time":
  284.      <th
  285.        class="tableHeader"
  286.        scope="col"
  287.      />
  288.  
  289.      Name "Visit type":
  290.      <th
  291.        class="tableHeader"
  292.        scope="col"
  293.      />
  294.  
  295.      Name "Encounter type":
  296.      <th
  297.        class="tableHeader"
  298.        scope="col"
  299.      />
  300.  
  301.      Name "Provider":
  302.      <th
  303.        class="tableHeader"
  304.        scope="col"
  305.      />
  306.  
  307.      Name "":
  308.      <th
  309.        class="cds--table-expand"
  310.        id="expand"
  311.        scope="col"
  312.      />
  313.  
  314.      --------------------------------------------------
  315.      cell:
  316.  
  317.      Name "":
  318.      <td
  319.        class="cds--table-expand"
  320.        headers="expand"
  321.      />
  322.  
  323.      Name "18-Jan-2022, 09:55 PM":
  324.      <td />
  325.  
  326.      Name "Facility Visit":
  327.      <td />
  328.  
  329.      Name "Admission":
  330.      <td />
  331.  
  332.      Name "--":
  333.      <td />
  334.  
  335.      Name "Open and close list of options":
  336.      <td
  337.        class="cds--table-column-menu"
  338.      />
  339.  
  340.      Name "":
  341.      <td
  342.        colspan="6"
  343.      />
  344.  
  345.      Name "":
  346.      <td
  347.        class="cds--table-expand"
  348.        headers="expand"
  349.      />
  350.  
  351.      Name "03-Aug-2021, 06:17 AM":
  352.      <td />
  353.  
  354.      Name "Facility Visit":
  355.      <td />
  356.  
  357.      Name "Visit Note":
  358.      <td />
  359.  
  360.      Name "User One":
  361.      <td />
  362.  
  363.      Name "Open and close list of options":
  364.      <td
  365.        class="cds--table-column-menu"
  366.      />
  367.  
  368.      Name "":
  369.      <td
  370.        colspan="6"
  371.      />
  372.  
  373.      Name "":
  374.      <td
  375.        class="cds--table-expand"
  376.        headers="expand"
  377.      />
  378.  
  379.      Name "05-Jul-2021, 03:37 PM":
  380.      <td />
  381.  
  382.      Name "Facility Visit":
  383.      <td />
  384.  
  385.      Name "Consultation":
  386.      <td />
  387.  
  388.      Name "Dennis The Doctor":
  389.      <td />
  390.  
  391.      Name "Open and close list of options":
  392.      <td
  393.        class="cds--table-column-menu"
  394.      />
  395.  
  396.      Name "":
  397.      <td
  398.        colspan="6"
  399.      />
  400.  
  401.      --------------------------------------------------
  402.      combobox:
  403.  
  404.      Name "Items per page:":
  405.      <select
  406.        class="cds--select-input"
  407.        id="cds-pagination-select-id-11"
  408.      />
  409.  
  410.      Name "Page number, of 1 pages":
  411.      <select
  412.        class="cds--select-input"
  413.        id="cds-pagination-select-id-11-right"
  414.      />
  415.  
  416.      --------------------------------------------------
  417.      option:
  418.  
  419.      Name "20":
  420.      <option
  421.        class="cds--select-option"
  422.        value="20"
  423.      />
  424.  
  425.      Name "1":
  426.      <option
  427.        class="cds--select-option"
  428.        value="1"
  429.      />
  430.  
  431.      --------------------------------------------------
  432.  
  433.    Ignored nodes: comments, script, style
  434.    <body>
  435.      <div>
  436.        <div
  437.          class="tableContainer cds--data-table-container"
  438.        >
  439.          <section
  440.            aria-label="data table toolbar"
  441.            class="cds--table-toolbar"
  442.          >
  443.            <div
  444.              class="cds--toolbar-content"
  445.            >
  446.              <div
  447.                class="filterContainer"
  448.              >
  449.                <div
  450.                  class="cds--dropdown__wrapper cds--list-box__wrapper cds--dropdown__wrapper--inline cds--list-box__wrapper--inline"
  451.                >
  452.                  <label
  453.                    class="cds--label"
  454.                    for="downshift-0-toggle-button"
  455.                    id="downshift-0-label"
  456.                  >
  457.                    Filter by encounter type:
  458.                  </label>
  459.                  <div
  460.                    class="cds--dropdown cds--dropdown--inline cds--dropdown--lg cds--list-box cds--list-box--lg"
  461.                    id="serviceFilter"
  462.                  >
  463.                    <button
  464.                      aria-disabled="false"
  465.                      aria-expanded="false"
  466.                      aria-haspopup="listbox"
  467.                      aria-labelledby="downshift-0-label downshift-0-toggle-button"
  468.                      class="cds--list-box__field"
  469.                      id="downshift-0-toggle-button"
  470.                      title="All"
  471.                      type="button"
  472.                    >
  473.                      <span
  474.                        class="cds--list-box__label"
  475.                      >
  476.                        All
  477.                      </span>
  478.                      <div
  479.                        class="cds--list-box__menu-icon"
  480.                      >
  481.                        <svg
  482.                          aria-label="Open menu"
  483.                          fill="currentColor"
  484.                          focusable="false"
  485.                          height="16"
  486.                          name="chevron--down"
  487.                          preserveAspectRatio="xMidYMid meet"
  488.                          role="img"
  489.                          viewBox="0 0 16 16"
  490.                          width="16"
  491.                          xmlns="http://www.w3.org/2000/svg"
  492.                        >
  493.                          <path
  494.                            d="M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z"
  495.                          />
  496.                          <title>
  497.                            Open menu
  498.                          </title>
  499.                        </svg>
  500.                      </div>
  501.                    </button>
  502.                    <div
  503.                      aria-labelledby="downshift-0-label"
  504.                      class="cds--list-box__menu"
  505.                      id="downshift-0-menu"
  506.                      role="listbox"
  507.                      tabindex="-1"
  508.                    />
  509.                  </div>
  510.                </div>
  511.              </div>
  512.              <div
  513.                aria-labelledby="1-search"
  514.                class="cds--search cds--search--lg search cds--toolbar-search-container-active cds--toolbar-search-container-expandable"
  515.                role="search"
  516.              >
  517.                <div
  518.                  class="cds--search-magnifier"
  519.                >
  520.                  <svg
  521.                    aria-hidden="true"
  522.                    class="cds--search-magnifier-icon"
  523.                    fill="currentColor"
  524.                    focusable="false"
  525.                    height="16"
  526.                    preserveAspectRatio="xMidYMid meet"
  527.                    viewBox="0 0 16 16"
  528.                    width="16"
  529.                    xmlns="http://www.w3.org/2000/svg"
  530.                  >
  531.                    <path
  532.                      d="M15,14.3L10.7,10c1.9-2.3,1.6-5.8-0.7-7.7S4.2,0.7,2.3,3S0.7,8.8,3,10.7c2,1.7,5,1.7,7,0l4.3,4.3L15,14.3z M2,6.5 C2,4,4,2,6.5,2S11,4,11,6.5S9,11,6.5,11S2,9,2,6.5z"
  533.                    />
  534.                  </svg>
  535.                </div>
  536.                <label
  537.                  class="cds--label"
  538.                  for="1"
  539.                  id="1-search"
  540.                >
  541.                  Filter table
  542.                </label>
  543.                <input
  544.                  autocomplete="off"
  545.                  class="cds--search-input"
  546.                  id="1"
  547.                  placeholder="Search this list"
  548.                  role="searchbox"
  549.                  tabindex="0"
  550.                  type="text"
  551.                  value=""
  552.                />
  553.                <button
  554.                  aria-label="Clear search input"
  555.                  class="cds--search-close cds--search-close--hidden"
  556.                  title="Clear search input"
  557.                  type="button"
  558.                >
  559.                  <svg
  560.                    aria-hidden="true"
  561.                    fill="currentColor"
  562.                    focusable="false"
  563.                    height="16"
  564.                    preserveAspectRatio="xMidYMid meet"
  565.                    viewBox="0 0 32 32"
  566.                    width="16"
  567.                    xmlns="http://www.w3.org/2000/svg"
  568.                  >
  569.                    <path
  570.                      d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"
  571.                    />
  572.                  </svg>
  573.                </button>
  574.              </div>
  575.            </div>
  576.          </section>
  577.          <div
  578.            class="c...
  579.  
  580.      77 |     ];
  581.      78 |     expectedTableRows.forEach((row) => {
  582.    > 79 |       expect(screen.getByRole('row', { name: new RegExp(row, 'i') })).toBeInTheDocument();
  583.         |                     ^
  584.      80 |     });
  585.      81 |
  586.      82 |     expect(screen.getByRole('button', { name: /previous page/i })).toBeInTheDocument();
  587.  
  588.      at Object.getElementError (node_modules/@testing-library/dom/dist/config.js:40:19)
  589.      at node_modules/@testing-library/dom/dist/query-helpers.js:90:38
  590.      at node_modules/@testing-library/dom/dist/query-helpers.js:62:17
  591.      at node_modules/@testing-library/dom/dist/query-helpers.js:111:19
  592.      at getByRole (packages/esm-patient-chart-app/src/visit/visits-widget/past-visits-components/visits-table/visits-table.test.tsx:79:21)
  593.          at Array.forEach (<anonymous>)
  594.      at Object.forEach (packages/esm-patient-chart-app/src/visit/visits-widget/past-visits-components/visits-table/visits-table.test.tsx:78:23)
  595.  
  596. FAIL  packages/esm-patient-programs-app/src/programs/programs-form.test.tsx (16.261 s)
  597.  ● ProgramsForm › updates a program enrollment
  598.  
  599.    expect(jest.fn()).toHaveBeenCalledWith(...expected)
  600.  
  601.    - Expected
  602.    + Received
  603.  
  604.      "8ba6c08f-66d9-4a18-a233-5f658b1755bf",
  605.    - ObjectContaining {"dateCompleted": "2020-05-05T00:00:00+00:00", "dateEnrolled": "2020-01-16T00:00:00+00:00", "location": "aff27d58-a15c-49a6-9beb-d30dcfc0c66e", "patient": "8673ee4f-e2ab-4077-ba55-4980f408773e", "program": "64f950e6-1b07-4ac0-8e7e-f3e148f3463f"},
  606.    + {"dateCompleted": "2020-05-05T00:00:00+05:30", "dateEnrolled": "2020-01-16T05:30:00+05:30", "location": "aff27d58-a15c-49a6-9beb-d30dcfc0c66e", "patient": "8673ee4f-e2ab-4077-ba55-4980f408773e", "program": "64f950e6-1b07-4ac0-8e7e-f3e148f3463f"},
  607.      {},
  608.  
  609.    Number of calls: 1
  610.  
  611.      119 |
  612.      120 |     expect(mockUpdateProgramEnrollment).toHaveBeenCalledTimes(1);
  613.    > 121 |     expect(mockUpdateProgramEnrollment).toHaveBeenCalledWith(
  614.          |                                         ^
  615.      122 |       mockEnrolledProgramsResponse[0].uuid,
  616.      123 |       expect.objectContaining({
  617.      124 |         dateEnrolled: '2020-01-16T00:00:00+00:00',
  618.  
  619.      at Object.toHaveBeenCalledWith (packages/esm-patient-programs-app/src/programs/programs-form.test.tsx:121:41)
  620.  
  621. FAIL  packages/esm-patient-conditions-app/src/conditions/conditions-form.test.tsx (20.291 s)
  622.  ● Conditions Form › renders a success toast notification upon successfully recording a condition
  623.  
  624.    expect(jest.fn()).toHaveBeenCalledWith(...expected)
  625.  
  626.    Expected: ObjectContaining {"clinicalStatus": "active", "conceptId": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "display": "Headache", "endDate": null, "onsetDateTime": "2020-12-20T00:00:00+00:00", "patientId": "8673ee4f-e2ab-4077-ba55-4980f408773e"}
  627.    Received
  628.           1: {"clinicalStatus": "active", "conceptId": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "display": "Headache", "endDate": null, "onsetDateTime": "2020-12-20T00:00:00+05:30", "patientId": "8673ee4f-e2ab-4077-ba55-4980f408773e", "userId": undefined}
  629.           2: {"clinicalStatus": "active", "conceptId": "139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "display": "Headache", "endDate": null, "onsetDateTime": "2020-12-20T00:00:00+05:30", "patientId": "8673ee4f-e2ab-4077-ba55-4980f408773e", "userId": undefined}
  630.  
  631.    Number of calls: 2
  632.  
  633.      155 |     await user.click(submitButton);
  634.      156 |
  635.    > 157 |     expect(mockCreateCondition).toHaveBeenCalledWith(
  636.          |                                 ^
  637.      158 |       expect.objectContaining({
  638.      159 |         clinicalStatus: 'active',
  639.      160 |         conceptId: '139084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',
  640.  
  641.      at Object.toHaveBeenCalledWith (packages/esm-patient-conditions-app/src/conditions/conditions-form.test.tsx:157:33)
  642.  
  643.  
  644. Test Suites: 3 failed, 1 skipped, 56 passed, 59 of 60 total
  645. Tests:       3 failed, 7 skipped, 157 passed, 167 total
  646. Snapshots:   0 total
  647. Time:        45.062 s
  648. Ran all test suites.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement