Commit 78e3f835 authored by Rémy Coutable's avatar Rémy Coutable

Remove ee/spec/features/projects/active_tabs_spec.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 5f3604ca
require 'spec_helper'
describe 'Project active tab' do
let(:user) { create :user }
let(:project) { create(:project, :repository) }
before do
project.add_master(user)
sign_in(user)
end
def click_tab(title)
page.within '.sidebar-top-level-items > .active' do
click_link(title)
end
end
shared_examples 'page has active tab' do |title|
it "activates #{title} tab" do
expect(page).to have_selector('.sidebar-top-level-items > li.active', count: 1)
expect(find('.sidebar-top-level-items > li.active')).to have_content(title)
end
end
shared_examples 'page has active sub tab' do |title|
it "activates #{title} sub tab" do
expect(page).to have_selector('.sidebar-sub-level-items > li.active:not(.fly-out-top-item)', count: 1)
expect(find('.sidebar-sub-level-items > li.active:not(.fly-out-top-item)'))
.to have_content(title)
end
end
context 'on project Home' do
before do
visit project_path(project)
end
it_behaves_like 'page has active tab', 'Overview'
context 'on project Home/Activity' do
before do
click_tab('Activity')
end
it_behaves_like 'page has active tab', 'Overview'
end
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