@fansifter
@artist-page
Feature: Artist page - Fans timeseries/summary by acquisition channel chart

  Background: Log in (user has access to a few labels)
    Given an orchard employee fansifter-set-2-2-aquarius for fansifter
    And I log in
    And I visit Fansifter Search page

  @FS-1656
  @id_5241631a09d3802af2ebf70903ad7ce5aa4f92cb89215e249759987d8115414d
  Scenario: Artist page fans chart change period
    When I search for an artist "Adele"
    And I select #1 search result containing "Adele"
    Then I receive fansifter artist page data responses
    When I select "Past Year" in the period filter dropdown
    Then I receive all "fans over time" data from backend
    And only "fans over time" data is updated
    And "Acquisition Channel" is selected in the artist page chart grouping filter
    And "Past Year" number of days is shown in the artist page chart period filter
    And fans chart is shown
    And there is a column with "Past Year" number of days in the fans table
    When I hover a data point on the fans over time chart
    Then "Selected total" label is shown in fans chart tooltip

  #@wip
  @FS-1657
  @id_0be5fa384dba8c14a0dddd9d17fb8b8858602fbf44790da049f277ff763112f4
  Scenario: Artist page fans chart change country, account filters
    When I visit fansifter artist page for "Frank Sinatra"
    Then I receive fansifter artist page data responses
    # And I choose account with name "Columbia Records Group" on artist page
    And I select "Australia" in the country dropdown
    Then I receive fansifter artist page data responses
    And "fans count" data is updated
    And "fans over time" data is updated
    And country filter is set
    # And account filter is set
    And fans chart is shown
    And total fans number is updated in the table under chart

  @FS-1658
  @id_993e4355d2babd1a2f0607bb7a497511885fd781874bad64be8eb4fce72e65c2
  Scenario: Artist page fans chart change period, grouping filters
    When I search for an artist "Frank Sinatra"
    And I select #1 search result containing "Frank Sinatra"
    Then I receive fansifter artist page data responses
    When I select "Past Year" in the period filter dropdown
    Then I receive all "fans over time" data from backend
    When I select "Heavy Rotation" in the grouping filter dropdown
    Then I receive all "fans over time" data from backend
    And only "fans over time" data is updated
    When I select "Acquisition Channel" in the grouping filter dropdown
    Then I receive all "fans over time" data from backend
    And only "fans over time" data is updated
    And "Past Year" number of days is shown in the artist page chart period filter
    And "Acquisition Channel" is selected in the artist page chart grouping filter
    And fans chart is shown
    And there is a "Acquisition Channel" column in the fans table
    And there is a column with "Past Year" number of days in the fans table

  @FS-1659
  @id_1c28062445cef552164267fe01dcd161c1414a62013051fe08ff224db50fbe52
  Scenario: Artist page fans chart for the country with no fan data
    Given I will mock "fansCount" with zero fans when country filter applied
    When I search for an artist "Megan Hilty"
    And I select #1 search result containing "Megan Hilty"
    Then I receive fansifter artist page data responses
    When I select "Australia" in the country dropdown without fans
    And I receive fansifter fans count response
    Then fans view isn't shown
    And notice about no fan data is shown on artist page
