@fansifter
@artist-page
Feature: Artist page - Fans timeseries/summary by acquisition country 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
      And fans tab is opened for artist page
      And I select "Country" in the grouping filter dropdown
      Then I receive all "fans over time" data from backend

    @FS-2013
    @id_4657e3f7cbddd5f81a80bf1a76df97b7e54a4c3600dee3f5cb736e77b518be8a
    Scenario: Artist page fans timeseries/summary set filter to show data by acquisition country
      And only "fans over time" data is updated
      And "Country" is selected in the artist page chart grouping filter
      And fans chart is shown
      And there is a "Country" column in the fans table
      And there is a column with "Past 6 Months" 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-2016
    @id_6f78b478b842c16628db0eecfdfd3c1d0b1c7668b10e4126f6bd24f9df422bb0
    Scenario: Artist page fans timeseries/summary by acquisition country chart 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 "Country" 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 "Country" column in the fans table
      And there is a column with "Past Year" number of days in the fans table

    @FS-2294
    @id_61ecdc10fd2ab138e5705e39d85ed00066e89dd8f6449c3e4e2ae6eb4f0e793d
    Scenario: Artist page fans timeseries/summary by country 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 fans tab is opened for artist page
      And I select "Country" in the grouping filter dropdown
      Then I receive all "fans over time" data from backend

    @FS-2017
    @id_3d13a1d1fc39122f13aaac06b6944f729cb643cce11c46064b921797cdeb7638
    Scenario: Artist page fans timeseries/summary by acquisition country chart set 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 "Country" is selected in the artist page chart grouping filter
      And fans chart is shown
      And there is a "Country" 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
