From 1c74f5595f254e2eaeaa9c9fe237832726d56632 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 16 Mar 2018 16:51:03 +0000 Subject: Fixed profile notifications not being editable Closes #44198 --- app/assets/javascripts/pages/profiles/notifications/show/index.js | 7 +++++++ spec/features/profiles/user_visits_notifications_tab_spec.rb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 app/assets/javascripts/pages/profiles/notifications/show/index.js diff --git a/app/assets/javascripts/pages/profiles/notifications/show/index.js b/app/assets/javascripts/pages/profiles/notifications/show/index.js new file mode 100644 index 00000000000..2e24a10fa5c --- /dev/null +++ b/app/assets/javascripts/pages/profiles/notifications/show/index.js @@ -0,0 +1,7 @@ +import NotificationsForm from '../../../../notifications_form'; +import notificationsDropdown from '../../../../notifications_dropdown'; + +document.addEventListener('DOMContentLoaded', () => { + new NotificationsForm(); // eslint-disable-line no-new + notificationsDropdown(); +}); diff --git a/spec/features/profiles/user_visits_notifications_tab_spec.rb b/spec/features/profiles/user_visits_notifications_tab_spec.rb index 1952fdae798..95953fbcfac 100644 --- a/spec/features/profiles/user_visits_notifications_tab_spec.rb +++ b/spec/features/profiles/user_visits_notifications_tab_spec.rb @@ -16,6 +16,6 @@ feature 'User visits the notifications tab', :js do first('#notifications-button').click click_link('On mention') - expect(page).to have_content('On mention') + expect(page).to have_selector('#notifications-button', text: 'On mention') end end -- cgit v1.2.1