@fansifter
@artist-page
Feature: Artist page - Fans by locations 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-1743
  @id_1c6265e3a7ec4dfcd08196a3952229f2f315c5d2708f65690f1daab622ecb322
  Scenario: Artist page fans by locations chart change country, account filters
    When I search for an artist "Frank Sinatra"
    And I will watch for "fans stats by location" artist response
    And I select #1 search result containing "Frank Sinatra"
    Then I receive fansifter artist page data responses
    And I receive "fans stats by location" data from backend
    # And I choose an account with fewer fans in the account dropdown
    # Then fans by location data is updated
    And data in the fans by locations table is correct
    When I select "Australia" in the country dropdown
    Then I receive fansifter artist page data responses
    And "Australia" is the first in fans by location table

  @FS-1744
  @id_1526d536fe70ea2787734846d25e9df6980861ce2306b58a7d3f55e093e6cf39
  Scenario: Artist page fans by locations chart for country with no fans by location data
    Given I will mock "fansStatsByLocation" with null fansShare
    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 "United States" in the country dropdown
    Then I receive fansifter artist page data responses
    And "United States" is the first in fans by location table
    And first country in fans by location table has "—" percentage
