Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
Feature: As a staff user, I want to mark none or exactly one agent link of a resource as 
         primary, so that the primary agent appears as a 1xx field in MARCXML resource 
         exports.

Background: The primary agent should appear as a 1xx field in MARCXML exports. 
            It should not be viewable anywhere in the PUI.
            On the SUI only viewable on the edit and show views of a Resource 
            | Digital Object | Accession | Resource Component | Digital Object Component 

Rule: When no linked agent is marked as primary on a resource, no 1xx field appears in 
      the MARCXML export of that resource, and no agent link is marked as primary in 
      the show view of that Resource | Digital Object | Accession | Resource Component 
      | Digital Object Component on SUI.

Scenario: As a staff User, I want to be able to mark no agent as primary on a Resource so 
          that no primary agent appears in the show view of that resource
Given the user edits a resource on SUI
And the resource has three agent links (two creators and one subject)
But the user does not mark any of the three agents to be a primary agent
When the user opens the show view of that resource 
Then no "primary" label appears next to any linked agent

Scenario: As a staff User, I want to be able to mark no agent as primary on a Resource so 
          that no 1xx field appears in the MARCXML export of that resource
Given the user edits a resource on SUI
And the resource has three agent links (two creators and one subject)
But the user does not mark any of the three agents to be a primary agent
When the user downloads a MARCXML export of that resource
Then no 1xx field appears in the MARCXML

Scenario: As a staff User, I want to be allowed to mark exactly one agent as primary 
          on a Resource
Given the user edits a resource on SUI
And the resource has three agent links (two creators and one subject)
And the second agent link is already marked as primary
When the user clicks on the "Make primary" button of the first agent
Then the "primary" label is removed from the second agent
And the "Make Primary" button appears on the second agent
And the "primary" label appears next to the first agent in the edit form

Scenario: As a staff user, I want to see a "primary" label next to the primary agent of a 
          resource, on the show view of the resource, so that it becomes clear that there 
          is a primary agent defined for that resource
Given a staff user marks an agent link as primary on a resource
When the user opens the show view for that resource
Then a "primary" label appears next to the agent link marked as primary
      
Scenario: As a staff user, I want to see a 1xx field for the primary agent in the MARCXML 
          export of a resource
Given a staff user marks an agent link as primary on a resource
When the user downloads a MARCXML export of that resource
Then a 1xx field appears in the MARCXML for the primary agent link

Further Reading

A more detailed article on how to write good Behavior Scenarios can be found here.

...