@insights
Feature: Insights Search

  @id_e3196c28d08923cf0dcb5bf52d8558112a5a0b8ee3056f54cd420f0a553224d9
  Scenario Outline: Search - User type can/cannot see the correct data
    Given a user from <user> for insights as <profile>
    When I log in
    Then I can navigate to Search
    And I search for <search_term> term in my catalog
    Then I <expect> see <search_term> in results

    Examples:
      | user            | profile    | search_term | expect |
      | insights_search | Label      | The Drums   | can    |
      | insights_search | D3         | Jim Fowler  | cannot |
      | insights_search | Subaccount | Helix       | cannot |
      | insights_search | Artist     | Ozuna       | can    |

  # wiped due to existent BUG: IN-16267
  @wip
  @donotfail
  @id_d36a148bc40f7a0030ad28620ec3350fbacbb96a7e26d3a0bcc1dd144a17c7d6
  Scenario Outline: Search page records visits to recently searched <entity_type> page
    Given an orchard employee single_label for insights
    And I log in
    And I can navigate to Search
    And I have cleared recently visited pages
    When I search for <title> term in my catalog
    And I click on <entity_type> name Search page
    When I can navigate to Search
    Then I can see a tile for <page> with title <title>
    And I can click the link to go to <page>

    Examples:
      | page                                          | title                                               | entity_type |
      | /song/GBZUZ0900064/                           | Wide Eyes                                           | song        |
      | /artist/95ee273c-09cb-411c-ae00-8806e9ca938e/ | Local Natives                                       | artist      |
      | /channel/UCPmyZyhKT6mZdB8HbfGHY1Q/            | Diet Cig                                            | channel     |
      | /video/LSnhReVZsro/                           | The Antlers - Hospice (Full Album - Official Audio) | video       |
      | /product/194491282172/                        | Conduit                                             | product     |

  @id_487a62203fb300cd9b206f651eb31987ef825fc7e207d905947f4f32e59f7bb3
  Scenario: Search page records no more than 15, in order of most recently visited
    Given an orchard employee insightsemployee for insights
    And I log in
    When I visit 17 different songs
    And I can navigate to Search
    Then I only see the 15 most recently visited songs displayed
