function testOfficialBadgeInSearch({
  searchQuery,
  collection,
  dashboard,
  question,
  expectBadge,
}) {
  cy.get(".Nav")
    .findByPlaceholderText("Search…")
    .as("searchBar")
    .type(searchQuery);

  cy.findByTestId("search-results-list").within(() => {
    assertSearchResultBadge(collection, {
      expectBadge,
      selector: "h3",
    });
    assertSearchResultBadge(question, { expectBadge });
    assertSearchResultBadge(dashboard, { expectBadge });
  });
}
// and relies on collection, dashboard and question being found within this single query
and relies on collection, dashboard and question being found within this single query
and relies on collection dashboard and question being found within this single query
function testOfficialBadgeInSearch({
  searchQuery,
  collection,
  dashboard,
  question,
  expectBadge,
}) {
  cy.get(".Nav")
    .findByPlaceholderText("Search…")
    .as("searchBar")
    .type(searchQuery);
  cy.findByTestId("search-results-list").within(() => {
    assertSearchResultBadge(collection, {
      expectBadge,
      selector: "h3",
    });
    assertSearchResultBadge(question, { expectBadge });
    assertSearchResultBadge(dashboard, { expectBadge });
  });
}
function testOfficialBadgeInSearch ( { searchQuery , collection , dashboard , question , expectBadge , } ) { cy . get ( ".Nav" ) . findByPlaceholderText ( "Search…") . as ( "searchBar" ) . type ( searchQuery ) ; cy . findByTestId ( "search-results-list" ) . within ( ( ) => { assertSearchResultBadge ( collection , { expectBadge , selector : "h3" , } ) ; assertSearchResultBadge ( question , { expectBadge } ) ; assertSearchResultBadge ( dashboard , { expectBadge } ) ; } ) ; }
and relies on collection, dashboard and question being found within this single query
and relies on collection dashboard and question being found within this single query