Commit 739a03a8 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'replace_spinach_spec_profile_notifications.feature' into 'master'

Replace 'profile/notifications.feature' spinach test with an rspec analog

See merge request !12345
parents 4503240a ece7a3cf
---
title: Replace 'profile/notifications.feature' spinach test with an rspec analog
merge_request: 12345
author: @blackst0ne
@profile
Feature: Profile Notifications
Background:
Given I sign in as a user
And I own project "Shop"
Scenario: I visit notifications tab
When I visit profile notifications page
Then I should see global notifications settings
@javascript
Scenario: I edit Project Notifications
Given I visit profile notifications page
When I select Mention setting from dropdown
Then I should see Notification saved message
require 'spec_helper'
feature 'User visits the notifications tab', js: true do
let(:project) { create(:empty_project) }
let(:user) { create(:user) }
before do
project.team << [user, :master]
sign_in(user)
visit(profile_notifications_path)
end
it 'changes the project notifications setting' do
expect(page).to have_content('Notifications')
first('#notifications-button').trigger('click')
click_link('On mention')
expect(page).to have_content('On mention')
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment