@contentTools
Feature: Tools Song Changes

  @id_4fcfc315a7dd55011ae5cec072ab2dff8aa25a6856c75151a220250e78f52572
  Scenario: A user with publishing_compositions_changelog role can see song changes card in tools page
    Given an orchard employee publishing_compositions for content
    And I log in to content silently
    Then I land on the Tools page
    And I can see the Composition/Song Changes card

  @id_56a5676f2415187f343bb84cfda6790bf32499c21c5aeb2d0c76ade7a5340343
  Scenario: A user can see the reports list after clicking on the song changes card
    Given an orchard employee publishing_compositions for content
    And I log in to content silently
    When I click on the Compositions/Song changes card
    Then I can view the generated reports

  @id_6d75e536df4f4be63477402b00b8317531889ef931b06960115ae21c5d68b188
  Scenario: A user can generate an Ad-Hoc report selected by composition that fails
    Given an orchard employee e2e_user for publishing
    And I create a new songwriter for label Dance Planet #1
    And I create a composition for the new songwriter
    Given an orchard employee publishing_compositions for content
    And I log in to content silently
    Given I click on the Compositions/Song changes card
    When I click on the Generate Report button
    And I select Ad-hoc Query option
    And I choose ad-hoc report select by Composition
    And I click on the search composition box, write the song id of the new composition and I select it
    And I select Past 7 Days as the date range
    And I generate my publishing report
    Then I see my report appear in a table on the Song Changes page
    And there is a loading spinner which disappears once the report has finished generating
    And there is a warning icon
    And the download icon is disabled

  @id_420dfdc1ee36d016cae80517dac5ef36e36edd134eda2abf248cef8d299f7b41
  Scenario: A user can generate an Ad-Hoc report selected by a previously updated composition
    Given an orchard employee e2e_user for publishing
    And I create a new songwriter for label Dance Planet #1
    And I create a composition for the new songwriter
    And I update the composition created
    Given an orchard employee publishing_compositions for content
    And I log in to content silently
    Given I click on the Compositions/Song changes card
    When I click on the Generate Report button
    And I select Ad-hoc Query option
    And I choose ad-hoc report select by Composition
    And I click on the search composition box, write the song id of the new composition and I select it
    And I select Past 7 Days as the date range
    And I generate my publishing report
    Then I see my report appear in a table on the Song Changes page
    And there is a loading spinner which disappears once the report has finished generating
    And there is not a warning icon
    And the download icon is enabled
