Commit c4a6209 1 parent b1102e8 commit c4a6209 Copy full SHA for c4a6209
File tree 2 files changed +43
-0
lines changed
staff_features/digital_objects
2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ Feature : Digital Object Publish
2
+ Background :
3
+ Given an administrator user is logged in
4
+ And a Digital Object has been created
5
+ Scenario : Publish the Digital Object from toolbar
6
+ Given the Digital Object is opened in edit mode
7
+ When the user clicks on 'Publish All'
8
+ And the user clicks on 'Publish All' in the modal
9
+ Then the 'Digital Object' published message is displayed
10
+ And the 'View Published' button is displayed
11
+ Scenario : Publish the Digital Object from the Publish checkbox in the Basic Information section
12
+ Given the Digital Object is opened in edit mode
13
+ When the user checks 'Publish'
14
+ And the user clicks on 'Save'
15
+ Then the 'Digital Object' updated message is displayed
16
+ And the 'View Published' button is displayed
17
+ Scenario : View a published Digital Object in the public interface
18
+ Given the Digital Object is opened in edit mode
19
+ And the Digital Object is published
20
+ When the user clicks on 'View Published'
21
+ Then the Digital Object opens on a new tab in the public interface
Original file line number Diff line number Diff line change 9
9
click_on 'Add Date'
10
10
select 'Single' , from : 'digital_object_dates__0__date_type_'
11
11
fill_in 'digital_object_dates__0__begin_' , with : '2000-01-01'
12
+ check 'Publish'
12
13
13
14
@digital_object_number_of_file_versions = 0
14
15
135
136
136
137
expect ( subrecords . length ) . to eq @digital_object_number_of_file_versions - 1
137
138
end
139
+
140
+ Given 'the Digital Object is published' do
141
+ expect ( find ( '#digital_object_publish_' ) . checked? ) . to eq true
142
+ end
143
+
144
+ Then 'the Digital Object opens on a new tab in the public interface' do
145
+ expect ( page . windows . size ) . to eq 2
146
+ switch_to_window ( page . windows [ 1 ] )
147
+
148
+ tries = 0
149
+
150
+ while current_url == 'about:blank'
151
+ break if tries == 3
152
+
153
+ tries += 1
154
+ sleep 1
155
+ end
156
+
157
+ expect ( current_url ) . to eq "#{ PUBLIC_URL } /repositories/#{ @repository_id } /digital_objects/#{ @digital_object_id } "
158
+ expect ( page ) . to have_text "Digital Object Title #{ @uuid } "
159
+ end
You can’t perform that action at this time.
0 commit comments