File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7272 visit project_path ( id : project . id )
7373 click_button "More actions"
7474 click_link "Edit"
75- fill_in "story[title]" , with : "As a user, I want to edit stories"
75+
7676 click_link "Back"
77- alert_text = page . driver . browser . switch_to . alert . text
77+ assert_current_path project_path ( id : project . id )
78+
79+ click_button "More actions"
80+ click_link "Edit"
81+
82+ fill_in "story[title]" , with : "As a user, I want to edit stories"
83+
84+ dismiss_confirm ( "You have unsaved changes. Are you sure you want to go back?" ) do
85+ find ( "#logo" ) . click
86+ end
87+
88+ assert_current_path edit_project_story_path ( project , story )
89+
90+ accept_confirm ( "You have unsaved changes. Are you sure you want to go back?" ) do
91+ click_link "Back"
92+ end
7893
79- expect ( alert_text ) . to eq "You have unsaved changes. Are you sure you want to go back?"
94+ assert_current_path project_path ( id : project . id )
8095 end
8196
8297 it "allows me to delete a story" do
You can’t perform that action at this time.
0 commit comments