Commit 28caac4 1 parent c39d567 commit 28caac4 Copy full SHA for 28caac4
File tree 3 files changed +17
-15
lines changed
3 files changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Feature: Accession Edit
26
26
Given the Accession is opened in edit mode
27
27
When the user changes the 'Title' field
28
28
And the user clicks on 'Revert Changes'
29
- Then the ' Title' field has the original value
29
+ Then the Accession Title field has the original value
30
30
Scenario : Accession update fails due to invalid date input
31
31
Given the Accession is opened in edit mode
32
32
When the user fills in 'Date' with '2024-13-15'
@@ -54,4 +54,4 @@ Feature: Accession Edit
54
54
And the user clicks on 'Save'
55
55
Then the following error message is displayed
56
56
| Identifier - Property is required but was missing |
57
- And the Identifier field has the original value
57
+ And the Accession Identifier field has the original value
Original file line number Diff line number Diff line change 61
61
click_on 'Edit'
62
62
end
63
63
64
- When 'the user changes the {string} field to {string}' do |field , value |
65
- fill_in field , with : value
66
- end
67
-
68
- When 'the user changes the {string} field' do |field |
69
- fill_in field , with : "#{ SecureRandom . uuid } "
70
- end
71
-
72
- Then 'the {string} field has the original value' do |field |
73
- expect ( page ) . to have_field ( field , with : "Accession Title #{ @uuid } " )
74
- end
75
-
76
64
Then 'the Accession is updated with the new {string} as {string}' do |field , value |
77
65
fill_in field , with : value
78
66
end
93
81
expect ( page ) . to have_field ( field , with : value )
94
82
end
95
83
84
+ Then 'the Accession Title field has the original value' do
85
+ visit "#{ STAFF_URL } /accessions/#{ @accession_id } /edit"
86
+
87
+ expect ( page ) . to have_field ( 'Title' , with : "Accession Title #{ @uuid } " )
88
+ end
89
+
96
90
Then 'the Accession Date field has the original value' do
97
91
visit "#{ STAFF_URL } /accessions/#{ @accession_id } /edit"
98
92
99
93
expect ( page ) . to have_field ( 'Accession Date' , with : '2000-01-01' )
100
94
end
101
95
102
- When 'the Identifier field has the original value' do
96
+ When 'the Accession Identifier field has the original value' do
103
97
visit "#{ STAFF_URL } /accessions/#{ @accession_id } /edit"
104
98
105
99
expect ( page ) . to have_field ( 'Identifier' , with : "Accession #{ @uuid } " )
Original file line number Diff line number Diff line change 47
47
check label
48
48
end
49
49
50
+ When 'the user changes the {string} field to {string}' do |field , value |
51
+ fill_in field , with : value
52
+ end
53
+
54
+ When 'the user changes the {string} field' do |field |
55
+ fill_in field , with : "#{ SecureRandom . uuid } "
56
+ end
57
+
50
58
Then 'the {string} message is displayed' do |string |
51
59
expect ( page ) . to have_text string
52
60
end
You can’t perform that action at this time.
0 commit comments