@frontend_contract
@ows_contracts
Feature: Product Territory Splits
  Scenario: Add a product territory split
    Given I have single product territory split to apply
    # 51643 is the contract_id of the vendor 7123
    When I am on the Contract::ProductByTerritoryArrangement for contract 51643 with no splits
    Then I should be able to add product territory splits

  Scenario: Update a product territory split
    Given I have single product territory split to apply
    # 51643 is the contract_id of the vendor 7123
    When I am on the Contract::ProductByTerritoryArrangement for contract 51643 with a split
    Then I should be able to update a product territory split

  Scenario: Delete product territory split
    # 51643 is the contract_id of the vendor 7123
    When I am on the Contract::ProductByTerritoryArrangement for contract 51643 with a split
    Then I should be able to delete all product territory splits

  Scenario: Add multiple product territory splits
    Given I have multiple product territory splits to apply
    # 51643 is the contract_id of the vendor 7123
    When I am on the Contract::ProductByTerritoryArrangement for contract 51643 with no splits
    Then I should be able to add product territory splits

  Scenario: Can't add a territory split for same UPC and country
    When I add a territory split for same UPC and country twice
    Then a validation error should appear

  Scenario: Split rate and country fields are obligatory
    When I am on the Contract::ProductByTerritoryArrangement for contract 51643 with no splits
    And I add a split with no split rate and a country
    Then an validation error should appear

