Skip to content

Commit

Permalink
Container profile delete
Browse files Browse the repository at this point in the history
  • Loading branch information
blacksmith-welder committed Mar 6, 2025
1 parent 0971505 commit d866305
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,12 @@ Feature: Container Profile Delete
And the user checks the checkbox of the Container Profile
And the user clicks on 'Delete'
And the user clicks on 'Delete Records'
Then the 'Records' deleted message is displayed
And the Container Profile is deleted
Then the Container Profile is deleted
Scenario: Container Profile is deleted from the view page
Given the user is on the Container Profile view page
When the user clicks on 'Delete'
And the user clicks on 'Delete' in the modal
Then the Container Profiles page is displayed
And the 'Container Pfodile' deleted message is displayed
And the Container Profile is deleted
Scenario: Cancel Container Profile delete from the view page
Given the user is on the Container Profile view page
Expand All @@ -28,5 +26,4 @@ Feature: Container Profile Delete
When the user clicks on 'Delete'
And the user clicks on 'Delete' in the modal
Then the Container Profiles page is displayed
And the 'Containe Profile' deleted message is displayed
And the Container Profile is deleted
And the Container Profile is deleted
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

0 comments on commit d866305

Please sign in to comment.