Merge branch 'replace_spinach_spec_profile_notifications.feature' into 'master'
Replace 'profile/notifications.feature' spinach test with an rspec analog See merge request !12345
This commit is contained in:
commit
739a03a825
3 changed files with 25 additions and 15 deletions
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Replace 'profile/notifications.feature' spinach test with an rspec analog
|
||||
merge_request: 12345
|
||||
author: @blackst0ne
|
|
@ -1,15 +0,0 @@
|
|||
@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
|
21
spec/features/profiles/user_visits_notifications_tab_spec.rb
Normal file
21
spec/features/profiles/user_visits_notifications_tab_spec.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
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
|
Loading…
Reference in a new issue