Feature: Physical Product Builder

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @frontend_distribution
  Scenario: Delete in-progress physical product with tracks
    Given a standalone Workstation label_7123 user
    And I have existing Physical Product data for label 7123 for all fields
    And I have a new project and physical product for label 7123
    And I am on the Project::PhysicalProductTrackPage for the product
    When I add a track to the product
    And I delete the product
    Then I should not see the product in the sidebar

  @ows_product
  @ows_product_physical
  @frontend_distribution
  Scenario: Add and delete tracks from physical product
    Given a standalone Workstation label_7123 user
    And I have an existing physical product from which I can edit Tracks
    And I am on the Project::PhysicalProductDetailsPage for the product
    And I go to the physical product tracks section
    Then I should be on tracklist page
    And I should be able to add and delete track to the product

  @ows_territories
  @ows_carveouts
  @ows_product
  @ows_product_physical
  @frontend_distribution
  Scenario: Add and delete territory carveouts from physical product
    Given a standalone Workstation label_7123 user
    And I have an existing physical product on QA
    And I am on the Project::PhysicalProductDetailsPage for the product
    When I go to the physical product territories section
    And I move all territories to cleared for sale
    And I move the continent Europe to NOT cleared for sale
    And I move the European country Austria to cleared for sale
    Then I see 63 territories NOT cleared for sale on the territory restrictions page
    When I save the physical product territories
    And I go to the review section
    Then I see 63 territories NOT cleared for sale on the product review page

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @ows_sales_goals
  @frontend_distribution
  Scenario: Add sales goals and inspect totals (PHYS-2846)
    Given a standalone Workstation label_7123 user
    And I have an existing physical product on QA
    And I am on the Project::PhysicalProductDetailsPage for the product
    When I go to the sales goals section
    And I delete any existing goals
    And I select United States as a target market
    And I enter a goal of 10 for store number 1
    And I enter a goal of 22 for store number 2
    Then I should see a total of 32 sales goals
    When I save my sales goal
    And I go to the review section
    Then I should see a total of 32 sales goals in review

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @ows_sales_goals
  @frontend_distribution
  Scenario: Can't change distribution field as a workstation user (PHYS-2832)
    Given a standalone Workstation label_7123 user
    And I have an existing physical product on QA
    And I am on the Project::PhysicalProductDetailsPage for the product
    When I go to the sales goals section
    And I delete any existing goals
    And I select United States as a target market
    Then I should see all distribution fields are disabled

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @ows_sales_goals
  @frontend_distribution
  Scenario: Edit Sales Goal (PHYS-2849)
    Given a standalone Workstation label_7123 user
    And I have an existing physical product on QA
    And my physical product has goals and a first week estimate
    And I am on the Project::PhysicalProductDetailsPage for the product
    When I go to the sales goals section
    And I edit my goals
    Then my totals should reflect my edits

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @ows_sales_goals
  @frontend_distribution
  # PHYS-4043, PHYS-4046
  Scenario: Edit Sales Goal on delivered product
    Given a standalone Workstation label_7123 user
    And I have an existing delivered physical product from which I can edit Sales Goals
    And my physical product has goals and a first week estimate
    And I am on the Project::PhysicalProductDetailsPage for the product
    When I click edit goals
    Then I should not see any delete goal elements
    And I should not see the target market dropdown
    When I click edit on the first target market goal
    And I should see that the first week estimate field is disabled
    Then I should see that my target goal input elements are disabled

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @frontend_distribution
  Scenario: Delete Sales Goal Workstation (PHYS-2855)
    Given a standalone Workstation label_7123 user
    And I have an existing physical product on QA
    And my physical product has goals and a first week estimate
    And I am on the Project::PhysicalProductDetailsPage for the product
    When I go to the sales goals section
    And I delete any existing goals
    Then I should see no goal values on the page

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @frontend_distribution
  Scenario: Changing my Orchard pricing tier will update summary panel (PHYS-3588)
    Given a standalone Workstation label_7123 user
    And I have existing Physical Product data for label 7123 for all fields
    And I am on the Project::ProjectDetailsPage for a newly created project
    And I add a product to the project
    And I select physical audio as the product type
    And I submit the physical audio product landing page form
    And I add release basics to the Physical Product without saving
    When I change my orchard pricing to CD Tier 2
    Then my US pricing code should change

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @frontend_distribution
  # PHYS-3934
  Scenario: Verify tracklist summary
    Given a standalone Workstation label_7123 user
    And I have existing Physical Product data for label 7123 for all fields
    And I have a new project and physical product for label 7123
    And I am on the Project::PhysicalProductTrackPage for the product
    When I add a track to the product
    And I go to the review section
    Then I can see my expected track data on the summary page

  @ows_account
  @ows_product
  @ows_product_physical
  @ows_project_manager
  @ows_marketing
  @frontend_distribution
  Scenario: Create and submit physical product as D3
    Given a standalone Workstation d3_16055 user
    And I have existing Physical Product data for subaccount 3 for all fields
    And I am on the Project::PhysicalProductTrackPage for a newly-created physical product
    When I add a track to the product
    And I go to the physical product artwork section
    And I upload valid artwork
    And I go to the review section
    And I submit the physical product
    Then I see that the product is submitted
