@ios
Feature: iOS Artist Screen

  Background:
      Given a valid test user
      When I login to the ios app

  Scenario: Header
      Given I can see the catalog screen
      And I am on the search tab
      When I search for "Somebody's Child"
        Then I can see artist Somebody's Child with id cc5f5a63-2bff-4dcb-8c9e-b4a9c6e4f9c4 in my search results
      When Tapping artist Somebody's Child with id cc5f5a63-2bff-4dcb-8c9e-b4a9c6e4f9c4 takes me to the artist page
        Then All expected elements in the artist header for Somebody's Child should be present

  Scenario: Streaming trend

  Scenario: Social Followers
    When I inspect the Social Followers section on the Artist screen
      Then I should see the 'MANAGE LINKED ACCOUNTS' button below the Social Followers section
      And All available social networks should be displayed
    When I tap on the Social Followers section on the Artist screen
      Then The Social Followers page should be displayed
      And All expected metrics should be visible
      And A graph should be displayed for each connected social network
    When I tap on the 'Fan Conversion Ratio' metric
      Then The Fan Conversion Ratio page should be displayed
    When I navigate back to the artist screen
    And I tap on the 'MANAGE LINKED ACCOUNTS' button
      Then The Manage Linked Accounts page should be displayed
      And The following platforms should be listed
        | Name       |
        | Instagram  |
        | Spotify    |
        | YouTube    |
        | Deezer     |
        | Facebook   |
        | SoundCloud |
#    Disabling TikTok assertion due to GO-4355
#        | TikTok     |

  Scenario: Top Songs
    When I inspect the Top Songs section on the Artist screen
      Then I should see the "SEE ALL" button below the Top Songs section
      And The total number of displayed songs should be 3
      And All songs are displayed sorted by the 'STREAMS • 7 DAYS' filter
    When I change Top Songs sorting to 'Streams • All Time'
      Then All songs are displayed sorted by the 'STREAMS • ALL TIME' filter
    When I tap on a song card number 2
      Then The sound recording screen displays some data
      And I should be able to navigate back
    When I tap the 'SEE ALL' button to open all songs
      Then The total number of displayed songs should exceed 3
      And All songs are displayed sorted by the 'STREAMS • ALL TIME' filter
    When I tap on a song card number 3
      Then The sound recording screen displays some data
      And I should be able to navigate back
    When I tap the Filter icon on the Top Songs page
    And I select the country filter option
    And I select the following countries from the market selector
      | Name        |
      | Mexico      |
      | Chile       |
      | India       |
      | Indonesia   |
      | Italy       |
      Then Songs for the selected countries should be displayed
    When I tap the Filter icon on the Top Songs page
      Then The country filter summary should display 'Mexico , + 4' should be displayed
    When I reset the filter
      Then The country filter summary should be empty and not display 'Mexico , + 4'
      And I should be able to close the filter window
    When I select top track 6
      Then The sound recording screen displays some data
      And I should be able to navigate back
    When I change Top Songs sorting to 'Streams • 1 Days'
    And I navigate back to the artist screen
      Then All songs are displayed sorted by the 'STREAMS • 1 DAYS' filter

#  TODO: Temporarily commented out due to unstable QA environment
#  Scenario: Top Playlists
#    When I inspect the Top Playlists section on the Artist screen
#    And I tap the information icon next to the Top Playlists title
#      Then A popup with information about the Top Playlists section should appear
#      And The Top Playlists section should display correct and complete information
#      And I should see the "See All" button below the playlists section
#      And Playlist cards should display correct and complete information
#      And The total number of displayed playlists should be 3
#      And All playlists are displayed sorted by the '7D STREAMS' filter
#    When I select 'Most Recent' in the playlists filter
#      Then All playlists are displayed sorted by the 'Most Recent' filter
#    When I select 'Followers' in the playlists filter
#      Then All playlists are displayed sorted by the 'Followers' filter
#    When I tap the bottom part of playlist card number 2
#      Then The sound recording screen displays some data
#      And I should be able to navigate back
#    When I tap the 'SEE ALL' button to open all playlists
#      Then The total number of displayed playlists should exceed 3
#      And Playlist cards should display correct and complete information
#      And All playlists are displayed sorted by the 'Followers' filter
#    When I change the playlists sorting option to 'Most Recent'
#      Then All playlists are displayed sorted by the 'Most Recent' filter
#    When I filter playlists with the following criteria
#      | Action            | Values                                                 |
#      | Deselecting store | Apple Music                                            |
#      | Deselecting types | Algorithmic, Editorial, New Music Friday, Personalized |
#      | Markets           | United Kingdom                                         |
#      Then Playlist cards should display correct and complete information
#      And Playlist cards should display the following attributes
#        | Property      | Value   |
#        | Playlist Type | CURATED |
#        | Country Label | GB      |
#        | Store Icon    | Spotify |
#    When I filter playlists with the following criteria
#      | Action            | Values         |
#      | Selecting store   | Apple Music    |
#      | Deselecting store | Spotify        |
#      | Selecting types   | Personalized   |
#      | Deselecting types | Curated        |
#      | Markets           | Argentina      |
#      Then No playlists should be displayed
#    When I reset the playlist filters
#      Then The total number of displayed playlists should exceed 3