This repository was archived by the owner on Oct 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ Feature: Event Delete
1515 And the user clicks on 'Cancel'
1616 Then the user is still on the Event view page
1717 Scenario : Event is deleted from the edit page
18- Given the user is on the Event edit page
18+ Given the Event edit page is displayed
1919 When the user clicks on 'Delete'
2020 And the user clicks on 'Delete' in the modal
2121 Then the Events page is displayed
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
3+ Given 'the user is on the Event view page' do
4+ visit "#{ STAFF_URL } /events/#{ @event_id } "
5+ end
6+
7+ Then 'the Events page is displayed' do
8+ expect ( current_url ) . to include "#{ STAFF_URL } /events"
9+ end
10+
11+ Then 'the Event is deleted' do
12+ visit "#{ STAFF_URL } /events/#{ @event_id } /edit"
13+
14+ expect ( find ( 'h2' ) . text ) . to eq 'Record Not Found'
15+
16+ expected_text = "The record you've tried to access may no longer exist or you may not have permission to view it."
17+ expect ( page ) . to have_text expected_text
18+ end
19+
20+ Then 'the user is still on the Event view page' do
21+ expect ( current_url ) . to eq "#{ STAFF_URL } /events/#{ @event_id } "
22+ end
23+
24+ Given 'the user is on the Event edit page' do
25+ expect ( current_url ) . to eq "#{ STAFF_URL } /events/#{ @event_id } /edit"
26+ end
27+
28+ Given 'the Event edit page is displayed' do
29+ visit "#{ STAFF_URL } /events/#{ @event_id } /edit"
30+ end
You can’t perform that action at this time.
0 commit comments