@ios @smoke
Feature: iOS Basic Flow

    @auth0-hosted-pages
    Scenario: User can login
        Given a valid test user
        When I login to the ios app
        Then I can see the catalog screen

    Scenario: Songs screen displays data
        When I navigate to the songs tab
        Then The songs tab displays with data

    Scenario: I can search and select an artist
        Given I am on the search tab
        When I search for "Local Natives"
        Then I can see artist Local Natives with id 95ee273c-09cb-411c-ae00-8806e9ca938e in my search results
        And Tapping artist Local Natives with id 95ee273c-09cb-411c-ae00-8806e9ca938e takes me to the artist page
        And The artist screen for Local Natives displays data

    Scenario: I can search and select a song
        Given I am on the search tab
        When I search for "USJMZ0900024"
        Then I can see song Kettering with id USJMZ0900024 in my search results
        When Tapping song Kettering with id USJMZ0900024 takes me to the song page
        Then The sound recording screen displays all data

    Scenario: I can search and select a product
        Given I am on the search tab
        When I search for "Money"
        Then I can see product Money with id 320226 in my search results
        And Tapping product Money with id 320226 takes me to the product page

    Scenario: I can see recent searches for songs/artists/products
        Given I am on the search tab
        When I clear the search field
        Then I should see song Kettering with id USJMZ0900024 in the list of recent searches
        And I should see artist Local Natives with id 95ee273c-09cb-411c-ae00-8806e9ca938e in the list of recent searches
        And I should see product Money with id 320226 in the list of recent searches

    Scenario: Opening a recent search item moves it to the top of the Recent Searches list
        Given I am on the search tab
        When Tapping artist Local Natives with id 95ee273c-09cb-411c-ae00-8806e9ca938e takes me to the artist page
        Then The artist screen for Local Natives displays data
        When I navigate back from the artist screen
        Then The recent search entry on line 1 is Local Natives with ID 95ee273c-09cb-411c-ae00-8806e9ca938e
        And The recent search entry on line 2 is Money with ID 320226
        And The recent search entry on line 3 is Kettering with ID USJMZ0900024

    Scenario: I can clear all recent searches
        Given I am on the search tab
        When I clear recent search results
        Then I should see no recent results

    Scenario: Sound recording screen displays data
        Given I am on the home tab
        When I select top track 1
        Then The sound recording screen displays all data
        And I should be able to navigate back

    Scenario: Playlisting screen displays data
        When I navigate to the playlists tab
        Then Recent playlists are displayed

    Scenario: Products screen displays data
        When I navigate to the products tab
        Then Recent products are displayed

    Scenario: User can log out
        When I log out of my account
        Then I am taken to the login page
