Feature: Digital Audio Product Builder Overview

  @ows_assets
  @ows_product_digital
  @ows_product
  @ows_promo_player
  @frontend_distribution
  Scenario: Promo Player is Not Available Without Valid Tracks or Artwork
    Given a standalone Workstation label_7123 user
    And I have an existing digital product on QA
    When I am on the Project::DigitalProductOverviewPage for the product
    Then the Promo Player should not be available

  # QA-999996, failing test, locator issue
  @ows_assets
  @ows_product_digital
  @ows_product
  @ows_promo_player
  @frontend_distribution
  Scenario: Promo Player is Available with Valid Tracks and Artwork
    Given a standalone Workstation label_7123 user
    And I have an existing digital product with artwork and tracks on QA
    When I am on the Project::DigitalProductOverviewPage for the product
    Then the Promo Player should be available

  @ows_assets
  @ows_product_digital
  @ows_product
  @ows_promo_player
  @frontend_distribution
  Scenario: Enabling and Disabling the Promo Player
    Given a standalone Workstation label_7123 user
    And I have an existing digital product with artwork and tracks on QA
    And the product does not have an associated Promo Player
    When I am on the Project::DigitalProductOverviewPage for the product
    Then the Promo Player Builder Page shows the Promo Player is disabled
    When I enable the product's Promo Player
    Then the Promo Player Builder Page shows the Promo Player is enabled
    And the linked Promo Player matches the page settings
    And the linked Promo Player is enabled
    When I disable the product's Promo Player
    Then the stored Promo Player is disabled
    And the Promo Player Builder Page shows no url

  @ows_assets
  @ows_product_workflow
  @ows_product_digital
  @ows_product
  @ows_promo_player
  @frontend_distribution
  Scenario Outline: Creating a Promo Player with specific Expiration Mode
    Given a standalone Workstation label_7123 user
    And I have an existing digital product with artwork and tracks on QA
    And the product does not have an associated Promo Player
    When I set the product's release date in the future
    And I am on the Project::DigitalProductOverviewPage for the product
    Then the Promo Player Builder Page shows the Promo Player is disabled
    And I enable the product's Promo Player
    Then the Promo Player Builder Page shows the Promo Player is enabled
    When I am on the Project::DigitalProductOverviewPage for the product
    When I select the <expiration_mode> Expiration Mode
    And I am on the Project::DigitalProductOverviewPage for the product
    Then the Promo Player Builder Page shows the Promo Player is enabled
    And the linked Promo Player matches the page settings
    And the linked Promo Player leads to a valid page
    When I set the product's release date in the past
    Then the stored Promo Player leads to an <released_behaviour> page

  Examples:
    | expiration_mode | released_behaviour |
    | on_release      | invalid            |
    | never           | valid              |
