Feature: Digital Audio Product Builder Instant Grats

  @wip
  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @ows_product_workflow
  @id_3d09fa5918732a9268ef32ebfc225bf5af44da063a104ebeb5c24c9f39650b5a
  Scenario: Manage instant grats with validation, adding and deleting
    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
    # Digital Audio Product Builder Instant Grats -> Instant Grat can not be saved without valid Pre-Order Date
    # This can be implemented as a frontend component test
    Then I shouldn't be able to add Instant Grats with not valid Pre-Order Date
    # Digital Audio Product Builder Instant Grats -> Instant Grat should be removed if 'No Pre-Order' option is chosen
    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
    # Digital Audio Product Builder Instant Grats -> Instant Grat can be added for a specific date
    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
    # Digital Audio Product Builder Instant Grats -> Instant Grat can't be added for a same track but different date
    # This can be implemented as a frontend component test
    When I go to the digital product Scheduling & Pricing step
    And I add Instant Grats for the same track but different date
    Then validation error should be obtained
    # Digital Audio Product Builder Instant Grats -> Instant Grat can be deleted
    # This can be implemented as a frontend component test
    Then I should be able to delete an Instant Grat

  @wip
  @frontend_distribution
  @ows_product_digital
  @ows_carveouts
  @ows_track
  @id_68c98b33ea76c898668bf8cf61317b090afc8f2b831796ac14f91660cb902060
  Scenario: Instant grats sales date variations
    # Digital Audio Product Builder Instant Grats -> Instant Grat is not available on past or current sales date
    # DIG-4776 This can be implemented as a frontend component test
    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
    # Digital Audio Product Builder Instant Grats -> Pre order buttons are available on a future sales date
    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


# Above is a consolidation of the following: file all scenarios
# cypress/e2e/workstation/productBuilder/digitalAudioProductBuilderInstantGrats.feature
# Pause pipeline execution while collecting data for framework comparison and refactor analysis