2019-07-25 05:24:42 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-06-22 02:28:11 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2018-07-05 06:32:05 +00:00
|
|
|
describe '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
|
2018-07-11 14:36:08 +00:00
|
|
|
project.add_maintainer(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
|