Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Commit 829d103

Browse files
authored
Event edit default values (#125)
1 parent 12667a8 commit 829d103

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Feature: Event Edit Default Values
2+
Background:
3+
Given an administrator user is logged in
4+
And the Pre-populate Records option is checked in Repository Preferences
5+
And the user is on the Events page
6+
Scenario: Edit Default Values
7+
When the user clicks on 'Edit Default Values'
8+
And the user fills in 'Outcome Note' with 'Default Event Outcome Note'
9+
And the user selects 'Collection' from 'Type'
10+
And the user clicks on 'Save'
11+
Then the 'Defaults' updated message is displayed
12+
And the new Event form has the following default values
13+
| form_section | form_field | form_value |
14+
| Basic Information | Type | Collection |
15+
| Basic Information | Outcome Note | Default Event Outcome Note |

staff_features/events/step_definitions/event_edit.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,13 @@
6565

6666
expect(field.value).to eq 'accession'
6767
end
68+
69+
Given 'the user is on the Events page' do
70+
visit "#{STAFF_URL}/events"
71+
end
72+
73+
Then 'the new Event form has the following default values' do |form_values_table|
74+
visit "#{STAFF_URL}/events/new"
75+
76+
expect_form_values(form_values_table)
77+
end

0 commit comments

Comments
 (0)