Feature: Digital Audio Product Builder Instant Grats
  As a vendor
  I want to check the Instant Grats functionality

  @frontend_distribution
  @ows_product_workflow
  @ows_product_digital
  @ows_carveouts
  @ows_track
  Scenario: Instant Grat can be added for a immediate date
    Given a standalone Workstation label_7123 user
    And I have a digital product for Instant Grats testing
    When I am on the Project::DigitalProductPricingPage for the product
    Then I should be able to add Instant Grats for Immediate Date
    And Instant Grat should be persistent upon save

  @frontend_distribution
  @ows_product_workflow
  @ows_product_digital
  @ows_carveouts
  @ows_track
  Scenario: Instant Grat can be added for a specific date
    Given a standalone Workstation label_7123 user
    And I have a digital product for Instant Grats testing
    When I am on the Project::DigitalProductPricingPage for the product
    Then I should be able to add Instant Grats for Specific Date
    And Instant Grat should be persistent upon save

  @frontend_distribution
  @ows_product_workflow
  @ows_product_digital
  @ows_carveouts
  @ows_track
  Scenario: Instant Grat can't be added for a same track but different date
    Given a standalone Workstation label_7123 user
    And I have a digital product for Instant Grats testing
    When I am on the Project::DigitalProductPricingPage for the product
    And I add Instant Grats for the same track but different date
    Then validation error should be obtained

  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  # DIG-4776
  Scenario: Instant Grat is not available on past or current sales date
    Given a standalone Workstation label_7123 user
    And I have a digital product for Instant Grats testing with a sales date in the past
    When I am on the Project::DigitalProductPricingPage for the product
    Then I should not see the instant grats section
    And I should see that preorder buttons are disabled
    And I should see the preorder button disabled text
    When I specify a sales date of today
    Then I should not see the instant grats section
    And I should see that preorder buttons are disabled
    And I should see the preorder button disabled text

  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  Scenario: Instant Grat is not available if 'No Pre-Order' option is chosen
    Given a standalone Workstation label_7123 user
    And I have a digital product for Instant Grats testing
    When I am on the Project::DigitalProductPricingPage for the product
    Then I shouldn't be able to add Instant Grats without a Pre-Order Date

  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  Scenario: Pre order buttons are available on a future sales date (DIG-4776)
    Given a standalone Workstation label_7123 user
    And I have a digital product for Instant Grats testing with a sales date in the past
    When I am on the Project::DigitalProductPricingPage for the product
    And I specify a sales date in the future
    Then I should see that preorder buttons are enabled
    And I should not see the preorder button disabled text

  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  Scenario: Instant Grat can be deleted
    Given a standalone Workstation label_7123 user
    And I have a digital product for Instant Grats testing
    When I am on the Project::DigitalProductPricingPage for the product
    And I add an Instant Grat
    Then I should be able to delete an Instant Grat
