@frontend_masters_registry
@ows_masters_registry
Feature: Masters Registry 1
  To manage territories on existing ISRC
  as an OA Technology_manager user
  I want to be able to lock territories for ISRCs

  Background:
    Given an orchard employee cypress_manager_2 visits oa
    And I log in

  @id_61f51dd9a678debdd42fdb3dfa9deb0885caabba75c19a5eba221c737f1145a3
  Scenario: Search masters registry for ISRC
    Given I navigate to mastersEditorPage oa page
    When I search the masters registry for ISRC: US26V4410006
    Then I should be on the masters editor page for ISRC US26V4410006

  @id_1b3c53b99b8a2cd23466aa3aa1b9fab7e829477839354c02975ec037e32318fc
  Scenario: Bulk Lock Territories
    Given I navigate to mastersEditorPage for ISRC US26V4410006 oa page
    And Jordan, Montenegro territories are unclaimed
    And I navigate to bulkLockTerritoriesPage oa page
    When I lock territories for ISRC: US26V4410006
    Then I see a message indicating that the bulk action process started
    And I navigate to bulkActionsStatusesPage oa page
    Then I expect to see a success for the last bulk lock action
    And I navigate to mastersEditorPage for ISRC US26V4410006 oa page
    Then I should see the territories locked for the reason

  @id_9ae503a65751875a3f724bc5d1064c9d3fb6cdf169c2a8f332abd5c8f690291f
  Scenario: Single ISRC Territory Claims
    Given I navigate to mastersEditorPage for ISRC US26V4410006 oa page
    And Bouvet Island, Congo (Democratic Republic of the), Guernsey territories are unclaimed
    When I add BV, CD, GG to the Rightsholders section
    Then Bouvet Island, Congo (Democratic Republic of the), Guernsey are added to the Rightsholders list
    When I remove Bouvet Island, Congo (Democratic Republic of the), Guernsey from the Rightsholders section
    Then Bouvet Island, Congo (Democratic Republic of the), Guernsey become unclaimed

  @id_e09a184e9a050b165fd83c42a91bef76648be47bbfe998936d1804eebded8f0f
  Scenario: Single ISRC Territory Locks
    Given I navigate to mastersEditorPage for ISRC US26V4410006 oa page
    And Latvia, Marshall Islands, Sudan territories are unclaimed
    When I lock LV, MH, SD to the Locked Territories section
    Then Latvia, Marshall Islands, Sudan are added to the Locked Territories list
    When I remove LV, MH, SD from the Locked Territories section
    Then Latvia, Marshall Islands, Sudan become unclaimed
