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

Commit 7fa5167

Browse files
Fix specs
1 parent da569e5 commit 7fa5167

File tree

3 files changed

+22
-42
lines changed

3 files changed

+22
-42
lines changed

staff_features/accessions/step_definitions/accession_edit.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,6 @@
4040
click_on 'View'
4141
end
4242

43-
Given 'the Accession is opened in edit mode' do
44-
visit "#{STAFF_URL}/accessions"
45-
46-
fill_in 'filter-text', with: @uuid
47-
48-
within '.search-filter' do
49-
find('button').click
50-
end
51-
52-
search_result_rows = all('#tabledSearchResults tbody tr')
53-
expect(search_result_rows.length).to eq 1
54-
55-
within search_result_rows[0] do
56-
element = find('a', text: 'Edit')
57-
58-
@accession_id = URI.decode_www_form_component(element[:href]).split('/').pop
59-
end
60-
61-
click_on 'Edit'
62-
end
63-
6443
Then 'the Accession is updated with the new {string} as {string}' do |field, value|
6544
fill_in field, with: value
6645
end
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# frozen_string_literal: true
2+
3+
Given 'the Accession is opened in edit mode' do
4+
visit "#{STAFF_URL}/accessions"
5+
6+
fill_in 'filter-text', with: @uuid
7+
8+
within '.search-filter' do
9+
find('button').click
10+
end
11+
12+
search_result_rows = all('#tabledSearchResults tbody tr')
13+
expect(search_result_rows.length).to eq 1
14+
15+
within search_result_rows[0] do
16+
element = find('a', text: 'Edit')
17+
18+
@accession_id = URI.decode_www_form_component(element[:href]).split('/').pop
19+
end
20+
21+
click_on 'Edit'
22+
end

staff_features/accessions/step_definitions/accession_spawn.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,5 @@
11
# frozen_string_literal: true
22

3-
Given 'the Accession is opened in edit mode' do
4-
visit "#{STAFF_URL}/accessions"
5-
6-
fill_in 'filter-text', with: @uuid
7-
8-
within '.search-filter' do
9-
find('button').click
10-
end
11-
12-
search_result_rows = all('#tabledSearchResults tbody tr')
13-
expect(search_result_rows.length).to eq 1
14-
15-
within search_result_rows[0] do
16-
element = find('a', text: 'Edit')
17-
18-
@accession_id = URI.decode_www_form_component(element[:href]).split('/').pop
19-
end
20-
21-
click_on 'Edit'
22-
end
23-
243
Then 'the New Accession page is displayed' do
254
expect(find('h2').text).to eq 'New Accession Accession'
265
end

0 commit comments

Comments
 (0)