Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions staff_features/events/event_edit_default_values.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Feature: Event Edit Default Values
Background:
Given an administrator user is logged in
And the Pre-populate Records option is checked in Repository Preferences
And the user is on the Events page
Scenario: Edit Default Values
When the user clicks on 'Edit Default Values'
And the user fills in 'Outcome Note' with 'Default Event Outcome Note'
And the user selects 'Collection' from 'Type'
And the user clicks on 'Save'
Then the 'Defaults' updated message is displayed
And the new Event form has the following default values
| form_section | form_field | form_value |
| Basic Information | Type | Collection |
| Basic Information | Outcome Note | Default Event Outcome Note |
10 changes: 10 additions & 0 deletions staff_features/events/step_definitions/event_edit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@

expect(field.value).to eq 'accession'
end

Given 'the user is on the Events page' do
visit "#{STAFF_URL}/events"
end

Then 'the new Event form has the following default values' do |form_values_table|
visit "#{STAFF_URL}/events/new"

expect_form_values(form_values_table)
end