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

Commit ef551eb

Browse files
Assessment create
1 parent 2a60c91 commit ef551eb

File tree

2 files changed

+45
-4
lines changed

2 files changed

+45
-4
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
Feature: Assessment Create
2-
32
Background:
43
Given an administrator user is logged in
54
And a Digital Object has been created
65
And an Agent has been created
76
Scenario: Assessment is created
87
Given the user is on the New Assessment page
9-
When the user clicks on 'Browse' in the Records dropdown form
8+
When the user clicks on the Records dropdown
9+
And the user clicks on 'Browse' in the dropdown menu
1010
And the user filters by text with the Digital Object title in the modal
1111
And the user selects the Digital Object from the search results in the modal
1212
And the user clicks on 'Link' in the modal
13-
And the user clicks on 'Browse' in the Surveyed By dropdown form
13+
And the user clicks on the Surveyed By dropdown
14+
And the user clicks on 'Browse' in the dropdown menu
1415
And the user filters by text with the Agent name in the modal
1516
And the user selects the Agent from the search results in the modal
1617
And the user clicks on 'Link' in the modal
@@ -21,4 +22,4 @@ Feature: Assessment Create
2122
When the user clicks on 'Save'
2223
Then the following error messages are displayed
2324
| Records - At least 1 item(s) is required |
24-
| Surveyed By - At least 1 item(s) is required |
25+
| Surveyed By - At least 1 item(s) is required |
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# frozen_string_literal: true
2+
3+
Given 'the user is on the New Assessment page' do
4+
visit "#{STAFF_URL}/assessments/new"
5+
end
6+
7+
When 'the user clicks on the Records dropdown' do
8+
sleep 3
9+
10+
find_field('Records').find(:xpath, './ancestor::div[1]').find('button', match: :first).click
11+
end
12+
13+
When('the user filters by text with the Digital Object title in the modal') do
14+
within '.modal-content' do
15+
find('.text-filter-field.form-control.rounded-left').fill_in with: @uuid
16+
17+
find('.search-filter button').click
18+
end
19+
end
20+
21+
When 'the user selects the Digital Object from the search results in the modal' do
22+
find('tr', text: @uuid, match: :first).click
23+
end
24+
25+
When 'the user clicks on the Surveyed By dropdown' do
26+
find_field('Surveyed By').find(:xpath, './ancestor::div[1]').find('button', match: :first).click
27+
end
28+
29+
When 'the user filters by text with the Agent name in the modal' do
30+
within '.modal-content' do
31+
find('.text-filter-field.form-control.rounded-left').fill_in with: "Agent #{@uuid}"
32+
33+
find('.search-filter button').click
34+
end
35+
end
36+
37+
When('the user selects the Agent from the search results in the modal') do
38+
# For some reason agent cannot be found here
39+
pending
40+
end

0 commit comments

Comments
 (0)