# Refactored -> cypress/e2e/workstation/productBuilderMigration/digitalAudioProductBuilderInstantGrats.feature
Feature: Digital Audio Product Builder Instant Grats
  As a vendor
  I want to check the Instant Grats functionality

  # This scenario can be implemented as a frontend component test.
  @refactor_old
  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_d1234e6dd2893000b040644aaa2ac973445e0a3d05f85d66a117def552a8b239
  Scenario: Instant Grat can not be saved without a valid Pre-Order Date
    Given an orchard employee label_7123 for workstation
    And I log in to workstation silently
    And I am on the digital product pricing page for the product 2131194
    Then I shouldn't be able to add Instant Grats with not valid Pre-Order Date

  @refactor_old
  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_39855ad97311028abbbeed0203ff0a96657684a440c0302ad5d89b3d98811844
  Scenario: Instant Grat should be removed if 'No Pre-Order' option is chosen
    Given an orchard employee label_7123 for workstation
    And I log in to workstation silently
    And I am on the digital product pricing page for the product 2131194
    Then I add Instant Grats
    When I select pricing pre-order group "No Pre-order"
    And I confirm the deletion of the instant grat
    Then I should not see the instant grats section

  @refactor_old
  @frontend_distribution
  @ows_product_workflow
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_4833c502cfe7a79ed4dd6fef83bc7f9ae64e3488a3a740dcf53c9d610ff4a8c4
  Scenario: Instant Grat can be added for a specific date
    Given an orchard employee label_7123 for workstation
    And I log in to workstation silently
    And I am on the digital product pricing page for the product 2131194
    Then I should be able to add Instant Grats for Specific Date
    And I go to the digital product Overview step
    Then I see the correct instant grats data on the digital product overview page

  # This scenario can be implemented as a frontend component test.
  @refactor_old
  @frontend_distribution
  @ows_product_workflow
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_1bf78397e7f1989d34d16c5fc086f477ef06672c6fdd6908a355a7dcae1e4bda
  Scenario: Instant Grat can't be added for a same track but different date
    Given an orchard employee label_7123 for workstation
    And I log in to workstation silently
    And I am on the digital product pricing page for the product 2131194
    And I add Instant Grats for the same track but different date
    Then validation error should be obtained

  # DIG-4776
  # This scenario can be implemented as a frontend component test.
  @refactor_old
  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_6501ac3320f00e0bb1c78a9b8561f6733323cc383575b3160a793ec591c85b6e
  Scenario: Instant Grat is not available on past or current sales date
    Given an orchard employee label_7123 for workstation
    And I log in to workstation silently
    And I am on the digital product pricing page for the product 2134789
    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

  # This scenario can be implemented as a frontend component test.
  @refactor_old
  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_2fccc6421d6a066f4691d2b8c44030d5ab197c493fcc14609d32fcb78b87c8c1
  Scenario: Pre order buttons are available on a future sales date (DIG-4776)
    Given an orchard employee label_7123 for workstation
    And I log in to workstation silently
    And I am on the digital product pricing page for the product 2134789
    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

  # This scenario can be implemented as a frontend component test.
  @refactor_old
  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_93a4cdcd4203f15d47d201138f4a94effda1181eb1a6572dd048d45d6fd1191c
  Scenario: Instant Grat can be deleted
    Given an orchard employee label_7123 for workstation
    And I log in to workstation silently
    And I am on the digital product pricing page for the product 2131194
    And I add Instant Grats
    Then I should be able to delete an Instant Grat
