2017-06-22 02:28:11 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-10-03 08:35:01 +00:00
|
|
|
feature 'User visits the notifications tab', :js do
|
2017-08-02 19:55:11 +00:00
|
|
|
let(:project) { create(:project) }
|
2017-06-22 02:28:11 +00:00
|
|
|
let(:user) { create(:user) }
|
|
|
|
|
|
|
|
before do
|
2017-12-22 08:18:28 +00:00
|
|
|
project.add_master(user)
|
2017-06-22 02:28:11 +00:00
|
|
|
sign_in(user)
|
|
|
|
visit(profile_notifications_path)
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'changes the project notifications setting' do
|
|
|
|
expect(page).to have_content('Notifications')
|
|
|
|
|
2017-08-03 05:13:46 +00:00
|
|
|
first('#notifications-button').click
|
2017-06-22 02:28:11 +00:00
|
|
|
click_link('On mention')
|
|
|
|
|
2018-03-16 16:51:03 +00:00
|
|
|
expect(page).to have_selector('#notifications-button', text: 'On mention')
|
2017-06-22 02:28:11 +00:00
|
|
|
end
|
|
|
|
end
|