@fansifter
@artist-page
Feature: Artist page - Fans timeseries/summary by heavy rotation chart

  Rule: Adele

    Background: Log in (user has access to a few labels)
      Given an orchard employee fansifter-set-2-3-pisces for fansifter
      And I log in
      When I visit fansifter artist page for "Adele"
      Then I receive fansifter artist page data responses
      When I select "Heavy Rotation" in the grouping filter dropdown
      Then I receive all "fans over time" data from backend

    #AUT-959
    @wip
    @FS-1807
    @id_5121398f05437d775b455ba29a36a2a32f146c2946d4a672b5361c7836010582
    Scenario: Artist page fans change chart to be grouped by Heavy Rotation
      And only "fans over time" data is updated
      And "Heavy Rotation" is selected in the artist page chart grouping filter
      And fans chart is shown
      And there is a "Heavy Rotation" column in the fans table
      And there is a column with "Past 6 Months" number of days in the fans table

    #AUT-959
    @wip
    @FS-1808
    @id_0d72bbe80d68bc9d56e22b8601728fee5805707244e59c1b6975c60b5ab073ca
    Scenario: Artist page fans grouped by heavy rotation change period filter
      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 "Heavy Rotation" 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 "Heavy Rotation" column in the fans table
      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

    @FS-2293
    @id_0672128e3204bb58ef835290ec7002b46ff7696042f919b029c43e35a993d659
    Scenario: Artist page fans grouped by heavy rotation for the country with no fan data
      Given I will mock "fansCount" with zero fans when country filter applied
      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

  Rule: Frank Sinatra

    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
      When I visit fansifter artist page for "Frank Sinatra"
      Then I receive fansifter artist page data responses
      And I select "Heavy Rotation" in the grouping filter dropdown

    @FS-1809
    @id_ad655a9bc59dbe208b6340bb8fd4234c68c71850adf8d8aeb297a2a74fcc8e22
    Scenario: Artist page fans grouped by heavy rotation change country, account filters
      # When I choose account with name "Columbia Records Group" on artist page
      And I select "United States" 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 "Heavy Rotation" is selected in the artist page chart grouping filter
      And fans chart is shown
      And there is a "Heavy Rotation" column in the fans table
      And there is a column with "Past 6 Months" number of days in the fans table
      And total fans number is updated in the table under chart
