@insights_regression
@insights_song
Feature: Song Page Playlist Digest Export

  Background: Song Page is opened in default state
    Given an orchard employee multiaccount1 for insights
    And I log in to Insights silently
    When I visit the insights /song/QMFME2364182 page

  @IN-12096
  @id_1465274b9b7702726820f5025f59520eba52849cdd7a9530faf8db41eded8493
  Scenario: [Regression][Song][Playlist Digest] Export verification - cards view
    And I click Download .csv for Playlist Digest on Song page
    Then .csv file is downloaded and validated for Playlist Digest on Song page
    And exported .csv file data sorted as on Playlist Digest table on Song page

  @IN-12096
  @id_f397edc4addf1c2f8eeee8061b57e8d74ba7d4f4a3669ea7bcaf5f50d0faf836
  Scenario Outline: [Regression][Song][Playlist Digest] Export verification - <export_period> period.
    And I select <period> period on Song page
    And I can switch to <view> Playlists for Playlist Digest on Song page
    And I click Download .csv for Playlist Digest on Song page
    Then .csv file is downloaded and validated with <export_period> for Playlist Digest on Song page
    And exported .csv file data sorted as on Playlist Digest table on Song page

    Examples:
      | period       | view    | export_period |
      | First 7 Days | Current | All Time      |
      | Past 7 Days  | Latest  | 7 Days        |
      | Past 28 Days | Past    | 28 Days       |
