diff --git a/spec/system/sdg_management/relations_spec.rb b/spec/system/sdg_management/relations_spec.rb index 7197f06d4..42aa59ee9 100644 --- a/spec/system/sdg_management/relations_spec.rb +++ b/spec/system/sdg_management/relations_spec.rb @@ -303,7 +303,17 @@ describe "SDG Relations", :js do end scenario "allows remove a Goal" do - skip("Pending to fix removing item twice") + process = create(:legislation_process, title: "SDG process") + process.sdg_goals = [SDG::Goal[1], SDG::Goal[2]] + + visit sdg_management_edit_legislation_process_path(process) + find("li[data-code='1']").click + click_button "Update Process" + click_link "Marked as reviewed" + + within("tr", text: "SDG process") do + expect(page).to have_css "td", exact_text: "2" + end end end diff --git a/vendor/assets/javascripts/jquery.amsify.suggestags.js b/vendor/assets/javascripts/jquery.amsify.suggestags.js index bb429a2a7..1d0f86f42 100644 --- a/vendor/assets/javascripts/jquery.amsify.suggestags.js +++ b/vendor/assets/javascripts/jquery.amsify.suggestags.js @@ -626,7 +626,7 @@ var AmsifySuggestags; removeTag: function(value, animate=true) { var _self = this; - $findTags = $(this.selectors.sTagsArea).find('[data-val="'+value+'"]'); + $findTags = $(this.selectors.inputArea).find('[data-val="'+value+'"]'); if($findTags.length) { $findTags.each(function(){ _self.removeTagByItem(this, animate);