Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-40729

Fix flaky unit test in insights-chrome

XMLWordPrintable

    • Quality / Stability / Reliability
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Unset
    • None

      One of the unit tests for insights-chrome is flaky and fails intermittently when executed locally. We should stabilize the test.

      Demo of flaky test failure: https://asciinema.org/a/pPipyrUBOw4yJx9VSCYOlNOuy

       FAIL  src/components/Header/HeaderTests/ToolbarToggle.test.js
        ● ToolbarToggle › should open/close menu correctly    expect(element).not.toBeInTheDocument()    expected document not to contain element, found <span class="pf-v6-c-menu__item-text">title1</span> instead      67 |     });
            68 |     for (const item of expectedTexts) {
          > 69 |       expect(screen.queryByText(item.title)).not.toBeInTheDocument();
               |                                                  ^
            70 |     }
            71 |     // expect(container.querySelectorAll('.pf-v6-c-menu__list-item')).toHaveLength(0);
            72 |   });      at Object.toBeInTheDocument (src/components/Header/HeaderTests/ToolbarToggle.test.js:69:50)

              Unassigned Unassigned
              btweed@redhat.com Brandon Tweed
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: