@audience
Feature: Audience

  @id_950f814def29173a13de64212ff66b05048c47f1e90c75e0ffe026084cb3d751
  Scenario: Audience page works
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    Then I see that audience page works

  # DATA-4951
  @frontend_audience
  @id_b006671e2491431477d570b5c7ba5beac42663af123b4e511b29b3e37cc15a0c
  Scenario: React Audience page load
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    Then in the new Audience page I see all the components in place

  @frontend_audience
  @id_bb45f04b2718800d96a9208e7fb62ab4d5c87c53cb805954300c42f0cb8667c6
  Scenario: Use React Audience page time filters
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I get the listeners data
    When in the new Audience page I select the year time filter
    Then listeners in the new audience page are increased
    When in the new Audience page I select the month time filter
    Then listeners in the new audience page are the same
    When in the new Audience page I select the week time filter
    Then listeners in the new audience page are decreased

  # DATA-4973
  # DATA-4932
  @frontend_audience
  @id_a8f7859aefd1cbb0caa6cdef20d62c533ec150465e37929e7b0e758b8ad8be4e
  Scenario: Use React Audience page country filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I get the listeners data
    When I filter the new audience page for the Brazil country
    Then listeners in the new audience page are decreased
    When in the new Audience page I click on worldwide link on breadcrumb
    And I refresh the page
    And in the new Audience page I click on Brazil on the map
    Then in the new Audience page I should see a country level map of Brazil
    When in the new Audience page I click on worldwide link on breadcrumb
    Then in the new Audience page I should see a worldwide level map

  # When I get the listeners data from the audience page
  # And I select Brazil from top countries table
  # Then I should see a country level map of Brazil
  # Then listeners in audience page are decreased
  # DATA-4972
  @frontend_audience
  @id_46befd7b0b7f540f15b67df5d97999c7e9b8c929044abd3e04a0e1a5214d5366
  Scenario: Use React Audience page region filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I get the listeners data
    When I filter the new audience page for the BR - São Paulo region
    Then listeners in the new audience page are decreased

  # DATA-4948
  @frontend_audience
  @id_78a5cb743dbff1123f59cabbff19f7c150263a7899220648de85d07e40dceffe
  Scenario: Use React Audience page artist filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I get the listeners data
    When I search the new audience page for the Sevendust artist
    Then I should see Sevendust in the new audience page search field
    And listeners in the new audience page are decreased
    When I toggle the new audience page search for track
    Then listeners in the new audience page are the same

  # DATA-4939
  @frontend_audience
  @id_2e355036c3526111bc58d66accef409d0c90badb2afce21e8dec0ea3338eff62
  Scenario: Use React Audience page track filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I get the listeners data
    When I search the new audience page for the Get Low track
    Then I should see Get Low in the new audience page search field
    And listeners in the new audience page are decreased

  # DATA-4948
  @frontend_audience
  @id_d572cdd88f74ba6abe772ab30f9541666eaa28b18ca7029119f2b6822a2ae9d3
  Scenario: Use React Audience page multiple artist filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I select the year time filter
    When I search the new audience page for the Ying Yang Twins artist
    And in the new Audience page I get the listeners data
    And I search the new audience page for the Sevendust artist
    Then listeners in the new audience page are increased

  # DATA-4939
  @frontend_audience
  @id_e98def5b1b2c34ca1c4ce44378bf6e912a3a69529b3df5cf8bef64e708ef18a4
  Scenario: Use React Audience page multiple track filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I select the year time filter
    When I search the new audience page for the Get Low track
    And in the new Audience page I get the listeners data
    And I search the new audience page for the Salt Shaker track
    Then listeners in the new audience page are increased

  # DATA-4948
  @frontend_audience
  @id_0016134cb94c9e094dcc12fb08601f6a8e35a74278d929f08ae0fef502803e8e
  Scenario: Use React Audience page artist filter - clear artist from search bar
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I select the year time filter
    When I search the new audience page for the Sevendust artist
    And in the new Audience page I get the listeners data
    And I remove a search term from the new Audience page
    Then I should not see Sevendust in the new audience page search field
    And listeners in the new audience page are increased

  # DATA-4939
  @frontend_audience
  @id_58f48c6c27e8595947743e8a118745c18beff74df216ba632bd29ad87661e392
  Scenario: Use React Audience page track filter - clear track from search bar
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    And in the new Audience page I select the year time filter
    When I search the new audience page for the Get Low track
    When in the new Audience page I get the listeners data
    And I remove a search term from the new Audience page
    Then I should not see Get Low in the new audience page search field
    And listeners in the new audience page are increased

  @frontend_audience
  @id_2632cda60a210c3fd103734881b934a89fc4c40594cf9a3e84cab969b6d683f6
  Scenario: Engagement demographic insights one year filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    When in the new Audience page I select the week time filter
    Then in the new Audience page I should see gender donut chart
    And in the new Audience page I should see an age bar chart
    And in the new Audience page I should see the top audiences table
    Then in the new Audience page I select the month time filter
    Then in the new Audience page I should see gender donut chart
    And in the new Audience page I should see an age bar chart
    And in the new Audience page I should see the top audiences table

  @frontend_audience
  @id_286a7f20f4c50387da1fa45010068380400bcad023e87b39441d887c14309e0d
  Scenario: Use React Audience page store filter
    Given an orchard employee react_homepage_flow_15063 for workstation
    And I login silently to workstation and visit the analytics audience page
    When in the new Audience page I get the listeners data
    And I filter the new audience page for Apple Music
    Then listeners in the new audience page are decreased
    When I filter the new audience page for all stores
    Then listeners in the new audience page are the same
    When I filter the new audience page for Spotify
    Then listeners in the new audience page are decreased

  @frontend_audience
  @id_b2347b9b2e7c4ba6eea5467ff56d77e8a9aefe4c8318d8867f17f6a0ba1b9dbb
  Scenario Outline: Search for multiple tracks and artists with different users
    Given an orchard employee <user> for workstation
    And I login silently to workstation and visit the analytics audience page
    And I see that audience page works
    When I search the new audience page for the <track_1> track
    And I search the new audience page for the <track_2> track
    Then I should see <track_1> in the new audience page search field
    Then I should see  <track_2> in the new audience page search field
    When I search the new audience page for the <artist_1> artist
    And I search the new audience page for the <artist_2> artist
    Then I should see <artist_1> in the new audience page search field
    Then I should see <artist_2> in the new audience page search field

    Examples:
      | user            | track_1       | track_2          | artist_1                | artist_2       |
      # catalog: tvt
      | label_15063     | Salt Shaker   | Get Low          | Pitbull                 | Sevendust      |
      # frontline: frenchkiss
      | label_6971      | Ride          | In Between Stars | Local Natives           | The Drums      |
      # d3: thirty tigers
      | label_21989     | Jealous Sun   | I Am the Moon    | White Buffalo           | Parker Millsap |
      # subaccount: lightning rod records
      | subaccount_7584 | Alabama Pines | Mockingbird      | Quaker City Night Hawks | Paul Cauth     |
