Skip to content

Commit

Permalink
Update resources features
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmith-welder committed Sep 8, 2024
1 parent 4e79511 commit a5a7adf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
13 changes: 3 additions & 10 deletions staff_features/resources/resource_update_basic_information.feature
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Feature: Resource Update Basic Information
Background:
Given an administrator user is logged in
And a resource has been created
Scenario: Successfully update resource basic information
Given the user is on the resource edit page
And a Resource has been created
Scenario: Update basic information fields for a Resource
Given the user is on the Resource edit page
When the user selects 'Records' from "Resource Type"
And the user checks 'Publish?'
And the user checks 'Restrictions Apply?'
Expand All @@ -14,10 +14,3 @@ Feature: Resource Update Basic Information
And the 'Publish?' is checked
And the 'Restrictions Apply?' is checked
And the 'Repository Processing Note' has value 'VTF #3810'
Scenario: Revert changes
Given the user is on the resource edit page
When the user changes the resource Title
And the user changes the resource Identifier
And the user clicks on 'Revert Changes'
Then the resource Title does not change
And the resource Identifier does not change
20 changes: 2 additions & 18 deletions staff_features/resources/resource_update_basic_information.rb
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
# frozen_string_literal: true

Given 'a resource has been created' do
Given 'a Resource has been created' do
@uuid = SecureRandom.uuid

visit "#{STAFF_URL}/resources/new"

create_resource(@uuid)
end

Given 'the user is on the resource edit page' do
Given 'the user is on the Resource edit page' do
search(@uuid)

click_on 'Edit'
end

When 'the user changes the resource Title' do
fill_in 'resource_title_', with: 'Resource title chagned'
end

When 'the user changes the resource Identifier' do
fill_in 'resource_id_0_', with: 'Resource identifier chagned'
end

Then 'Repository Processing Note has value {string}' do |value|
expect(find('#resource_repository_processing_note_').value).to eq value
end

Then('the resource Title does not change') do
expect(find('#resource_title_').value).to eq "Resource #{@uuid}"
end

Then('the resource Identifier does not change') do
expect(find('#resource_id_0_').value).to eq "Resource #{@uuid}"
end

0 comments on commit a5a7adf

Please sign in to comment.