Feature: Masters Registry 2

  @frontend_masters_registry
  @ows_masters_registry
  @id_7a63a38a57477668184d83a42867aef9bec2031b2206e65446ebb5cce32840fc
  Scenario: Rightsholder Worldwide Territories
    Given an orchard employee cypress_manager_2 visits OA
    And I log in to OA
    And I am on the masters-registry bulk lock territories page
    When I unlock every territory for USA371130635
    Then I see a message indicating that the bulk action process started
    Given I am on the masters-registry bulk actions status page
    Then I expect to see a success for the last bulk lock action
    Given I am on the masters-registry masters editor page for ISRC: USA371130635
    And every territory is unclaimed
    When I add a rightsholder for every territory
    Then every territory is claimed for the rightsholder

  @frontend_masters_registry
  @ows_masters_registry
  @id_0927fc08a5d960545eac8ab882e690c2d8ed5d08851d70cd4adcb524bcc4ac33
  Scenario: Add a rightsholder for all except some territories
    Given an orchard employee cypress_manager_2 visits OA
    And I log in to OA
    And I am on the masters-registry masters editor page for ISRC: USA371130635
    And every territory is unclaimed
    When I add a rightsholder for every territory except EE, TT
    Then Estonia, Trinidad and Tobago should be the only unclaimed territories

  @frontend_masters_registry
  @ows_masters_registry
  @id_21e1baac803b4746e1fa79f26d9fb1bd48799d5f77e3d48c5b7e0897e058638a
  Scenario: Bulk lock all except some territories
    Given an orchard employee cypress_manager_2 visits OA
    And I log in to OA
    And I am on the masters-registry masters editor page for ISRC: USA371130635
    And every territory is unclaimed
    And I am on the masters-registry bulk lock territories page
    When I lock all territories except EE, TT for ISRC: USA371130635
    Then I see a message indicating that the bulk action process started
    When I am on the masters-registry bulk actions status page
    Then I expect to see a success for the last bulk lock action
    And I am on the masters-registry masters editor page for ISRC: USA371130635
    And Estonia, Trinidad and Tobago should be the only unclaimed territories

  @frontend_masters_registry
  @ows_masters_registry
  @id_3d1dd38aa2f4aadeccc51ff3e6a7c25a6ef166f0397d39557c2546032daa3ecb
  Scenario Outline: Bulk update UPCs
    Given an orchard employee cypress_manager_2 visits OA
    And I log in to OA
    And I am on the masters-registry bulk update upcs page
    When I attempt to update track rights for UPC: <UPC>
    Then I should see an <expected_message> for an <upc_type>

    Examples:
      | upc_type     | UPC            | expected_message                        |
      | invalid      | 20000000050423 | Invalid type of UPC                     |
      | non-existent | 111111111111   | UPC does not exist                      |
      | valid        | 191018751753   | Bulk action has begun in the background |
