Skip to content

Commit 12d396f

Browse files
Fix accession delete feature
1 parent 2ac22dd commit 12d396f

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

staff_features/accessions/step_definitions/accession_delete.rb

+16-8
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,26 @@
2121

2222
find('#filter-text').send_keys(:enter)
2323

24-
rows = all('tr', text: @uuid)
25-
expect(rows.length).to eq 1
26-
end
24+
rows = []
25+
checks = 0
2726

28-
When 'the user clicks on the checkbox of the Accession' do
29-
table_row = find('tr', text: @uuid, match: :first)
27+
while checks < 5
28+
checks += 1
3029

31-
within table_row do
32-
check 'multiselect-item'
30+
begin
31+
rows = all('tr', text: @uuid)
32+
rescue Selenium::WebDriver::Error::JavascriptError
33+
sleep 1
34+
end
35+
36+
if rows.length == 1
37+
break
38+
end
3339
end
40+
end
3441

35-
# expect(find('button', text: 'Delete').disabled?).to eq false
42+
When 'the user clicks on the checkbox of the Accession' do
43+
find('#multiselect-item').check
3644
end
3745

3846
When 'the user confirms the delete action' do

0 commit comments

Comments
 (0)