@insights_regression
@insights_search
Feature: Global Search Regression

  # ─── URI / URL search ────────────────────────────────────────────────────────
  @IN-11726
  @id_57bc6a6adf62774c87bbd6ef3d0009644faa96f2b770b2a97057e87b6a006492
  Scenario: [Regression][Search] Searching by URI/URL
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    And I search for https://open.spotify.com/track/4MjDJD8cW7iVeWInc2Bdyj?si=95ef56f8d5cf42b4 term
    Then I can see MONACO in results
    And I search for https://music.apple.com/ua/song/flowers/1674691586 term
    Then I can see Flowers in results
    And I search for USSM12209777 term
    Then I can see Flowers in results
    And I search for spotify:track:7lEptt4wbM0yJTvSG5EBof term
    Then I can see Cosmo Retro Intro Outro in results
    And I search for https://open.spotify.com/artist/5YGY8feqx7naU7z4HrwZM6?si=BucQRHmqSc659izWWEVnTg term
    Then I can see Miley Cyrus in results
    And I search for https://music.apple.com/us/artist/bad-bunny/1126808565 term
    Then I can see Bad Bunny in results
    And I search for spotify:artist:4q3ewBCX7sLwd24euuV69X term
    Then I can see Bad Bunny in results
    And I search for 5a59c162-644e-4d3a-9b87-5f260d4d0799 term
    Then I can see Miley Cyrus in results

  # ─── Most relevant results ────────────────────────────────────────────────────
  @IN-11832
  @id_e2137d4bb4984d7036a242f7513e33aa0d53e4a9cb431dc883625a155f552746
  Scenario: [Regression][Search] Search by song name in My Catalog Only - scoring
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    And I search for so term in my catalog
    And I can navigate to the Songs tab on the page
    Then Scoring is working correctly on song tab of Search page

  @IN-11872
  @id_8b3e0241bb56c66e33d24034cfdb0198fede17ac7f1370024f9aeeb7eedc289b
  Scenario: [Regression][Search] Search by song name in My Catalog Only - data verification
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    And I search for lam term in my catalog
    And I can navigate to the Songs tab on the page
    Then Songs are displayed correctly on song tab of Search page
    And I click on song name Search page
    Then Song data on search and song pages are consistent

  @IN-11886
  @id_54a83699d01ab0fe14e0306d7e6e1c7ac5d73a8d9f7a2a612db94e6574c5339c
  Scenario: [Regression][Search] Search by artist name in My Catalog Only - data verification
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    And I search for yo term in my catalog
    And I can navigate to the Artists tab on the page
    Then Artists are displayed correctly on artist tab of Search page

  # ─── Song tab process verification ───────────────────────────────────────────
  @id_a6812d3b42cfa6aa5c8ca0d610fad3a473b4114803ccf9faf1d8cb836c6c4733
  Scenario: [Regression][Search] Search on Song tab
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    And I search for co term
    And I can navigate to the Songs tab on the page
    Then I can see co in song tab Search page results

  @id_5901b16a5fa226169b60899887ee8f4f9fd2c4a3258947fa846bc0c75a78b275
  Scenario: [Regression][Search] Song tab Exact Phrase switch
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    And I search for co term
    And I can navigate to the Songs tab on the page
    And I uncheck Exact Phrase checkbox on the Search page
    Then I can see co in song tab Search page results
    And I check Exact Phrase checkbox on the Search page
    And I uncheck Exact Phrase checkbox on the Search page
    Then I can see co in song tab Search page results

  @id_6eed5c11f7018e2f35982e67d4b47f9e5057ec2c8111be2012cbba085cbf671c
  Scenario: [Regression][Search] Change search request
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    And I search for co term
    And I can navigate to the Songs tab on the page
    And I uncheck Exact Phrase checkbox on the Search page
    And I uncheck My Catalog Only checkbox on the Search page
    Then I can see co in song tab Search page results
    And I search for As It Was term
    Then I can see As It Was in song tab Search page results

  # ─── Recent search states ─────────────────────────────────────────────────────
  @IN-12006
  @id_23aa59d7a9f5fd2e7d934d1302e033b3acd7c61cd92fecd0a6c7e9a7d8f1ff2a
  Scenario: [Regression][Search] Recent searches states verification - default view
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    Then I can see default view on the Search Page

  @IN-12003
  @donotfail
  @id_f836ad494b65cd113c6c924ca2c78ee1ae839989d2a5bb59973317a38a3a81c1
  Scenario: [Regression][Search] Recent searches states verification - failed state
    Given an orchard employee recents_user for insights
    And I log in
    And I can navigate to Search
    Then I can see failed state on the Search Page

  @IN-12007
  @donotfail
  @id_4aa1f95e73e8a07f11c6c7128a217be2a2430a761754a6a1418a888ab6054936
  Scenario: [Regression][Search] Recent searches states verification - no search results yet
    Given an orchard employee multiaccount1 for insights
    And I log in
    And I can navigate to Search
    Then I can see default view on the Search Page
    And I can see no search results yet on the Search Page
