File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
features/step_definitions Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 131131Soit ( "un document que l'on consulte" ) do
132132 visit '/146e6e8442f0405b721b79357d00d0a1'
133133end
134+
135+ Soit ( "une image {string} dans une glose" ) do |image_name |
136+ attach_file ( "image-input" , File . expand_path ( "./docs/#{ image_name } " ) , make_visible : true )
137+ end
Original file line number Diff line number Diff line change 6060 attach_file ( "image-input" , File . expand_path ( "./docs/#{ image_name } " ) , make_visible : true )
6161end
6262
63- Quand ( "j'essaye de supprimer une image d'une glose" ) do
64- pending # Write code here that turns the phrase above into concrete actions
65- end
63+ Quand ( "j'essaye de supprimer l'image {string} d'une glose" ) do |image_name |
64+ image = find ( 'img[alt="' + image_name + '"]' )
65+ delete_button = image . find ( :xpath , 'following-sibling::button[contains(@class, "delete-image")]' )
66+ delete_button . click
67+ popup = find ( '#confirmation-popup' , visible : true )
68+ yes_button = popup . find ( 'button.confirm-yes' )
69+ yes_button . click
70+ end
Original file line number Diff line number Diff line change 8787 expect ( page ) . not_to have_content ( title )
8888end
8989
90- Alors ( "l'image disparait dans la glose " ) do
91- pending
90+ Alors ( "je ne vois pas l'image {string} " ) do | image_name |
91+ expect ( page )
9292end
You can’t perform that action at this time.
0 commit comments