-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0971505
commit d866305
Showing
2 changed files
with
31 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
staff_features/container_profiles/step_definitions/container_profile_delete.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
|
||
When 'the user checks the checkbox of the Container Profile' do | ||
find('#multiselect-item').check | ||
end | ||
|
||
Then 'the Container Profile is deleted' do | ||
visit "#{STAFF_URL}/container_profiles/#{@container_profile_id}/edit" | ||
|
||
expect(find('h2').text).to eq 'Record Not Found' | ||
expected_text = "The record you've tried to access may no longer exist or you may not have permission to view it." | ||
expect(page).to have_text expected_text | ||
end | ||
|
||
Given 'the user is on the Container Profile view page' do | ||
visit "#{STAFF_URL}/container_profiles/#{@container_profile_id}" | ||
end | ||
|
||
Then 'the Container Profiles page is displayed' do | ||
expect(current_url).to include "#{STAFF_URL}/container_profiles" | ||
end | ||
|
||
Then 'the user is still on the Container Profile view page' do | ||
expect(current_url).to eq "#{STAFF_URL}/container_profiles/#{@container_profile_id}" | ||
end | ||
|
||
Given 'the user is on the Container Profile edit page' do | ||
visit "#{STAFF_URL}/container_profiles/#{@container_profile_id}/edit" | ||
end |