Commit 669fb299 authored by Phil Hughes's avatar Phil Hughes

fixed up a bunch of specs

some caused by webkit prefixes
parent 331722c0
...@@ -8,10 +8,17 @@ header.navbar-gitlab-new { ...@@ -8,10 +8,17 @@ header.navbar-gitlab-new {
border-bottom: 0; border-bottom: 0;
.header-content { .header-content {
display: -webkit-flex;
display: flex;
padding-left: 0; padding-left: 0;
.title-container { .title-container {
display: -webkit-flex;
display: flex;
-webkit-align-items: stretch;
align-items: stretch; align-items: stretch;
-webkit-flex: 1 1 auto;
flex: 1 1 auto;
padding-top: 0; padding-top: 0;
overflow: visible; overflow: visible;
} }
......
...@@ -37,13 +37,13 @@ ...@@ -37,13 +37,13 @@
data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= icon('tachometer fw') = icon('tachometer fw')
%li %li
= link_to assigned_issues_dashboard_path, title: 'Issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'dashboard-shortcuts-issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= custom_icon('issues') = custom_icon('issues')
- issues_count = assigned_issuables_count(:issues) - issues_count = assigned_issuables_count(:issues)
%span.badge.issues-count{ class: ('hidden' if issues_count.zero?) } %span.badge.issues-count{ class: ('hidden' if issues_count.zero?) }
= number_with_delimiter(issues_count) = number_with_delimiter(issues_count)
%li %li
= link_to assigned_mrs_dashboard_path, title: 'Merge requests', aria: { label: "Merge requests" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = link_to assigned_mrs_dashboard_path, title: 'Merge requests', class: 'dashboard-shortcuts-merge_requests', aria: { label: "Merge requests" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do
= custom_icon('mr_bold') = custom_icon('mr_bold')
- merge_requests_count = assigned_issuables_count(:merge_requests) - merge_requests_count = assigned_issuables_count(:merge_requests)
%span.badge.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) } %span.badge.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) }
......
...@@ -7,15 +7,15 @@ RSpec.describe 'admin active tab' do ...@@ -7,15 +7,15 @@ RSpec.describe 'admin active tab' do
shared_examples 'page has active tab' do |title| shared_examples 'page has active tab' do |title|
it "activates #{title} tab" do it "activates #{title} tab" do
expect(page).to have_selector('.layout-nav .nav-links > li.active', count: 1) expect(page).to have_selector('.nav-sidebar .sidebar-top-level-items > li.active', count: 1)
expect(page.find('.layout-nav li.active')).to have_content(title) expect(page.find('.nav-sidebar .sidebar-top-level-items > li.active')).to have_content(title)
end end
end end
shared_examples 'page has active sub tab' do |title| shared_examples 'page has active sub tab' do |title|
it "activates #{title} sub tab" do it "activates #{title} sub tab" do
expect(page).to have_selector('.sub-nav li.active', count: 1) expect(page).to have_selector('.sidebar-sub-level-items li.active', count: 1)
expect(page.find('.sub-nav li.active')).to have_content(title) expect(page.find('.sidebar-sub-level-items li.active')).to have_content(title)
end end
end end
......
require 'spec_helper' require 'spec_helper'
describe 'Admin::Hooks' do describe 'Admin::Hooks', :js do
before do before do
@project = create(:project) @project = create(:project)
sign_in(create(:admin)) sign_in(create(:admin))
...@@ -12,7 +12,7 @@ describe 'Admin::Hooks' do ...@@ -12,7 +12,7 @@ describe 'Admin::Hooks' do
it 'is ok' do it 'is ok' do
visit admin_root_path visit admin_root_path
page.within '.layout-nav' do page.within '.nav-sidebar' do
click_on 'Hooks' click_on 'Hooks'
end end
......
...@@ -50,6 +50,6 @@ feature 'Dashboard shortcuts', :js do ...@@ -50,6 +50,6 @@ feature 'Dashboard shortcuts', :js do
end end
def check_page_title(title) def check_page_title(title)
expect(find('.header-content .title')).to have_content(title) expect(find('.breadcrumbs-sub-title')).to have_content(title)
end end
end end
...@@ -43,14 +43,14 @@ feature 'Profile > Account' do ...@@ -43,14 +43,14 @@ feature 'Profile > Account' do
update_username(new_username) update_username(new_username)
visit new_project_path visit new_project_path
expect(current_path).to eq(new_project_path) expect(current_path).to eq(new_project_path)
expect(find('h1.title')).to have_content(project.path) expect(find('.breadcrumbs-sub-title')).to have_content(project.path)
end end
scenario 'the old project path redirects to the new path' do scenario 'the old project path redirects to the new path' do
update_username(new_username) update_username(new_username)
visit old_project_path visit old_project_path
expect(current_path).to eq(new_project_path) expect(current_path).to eq(new_project_path)
expect(find('h1.title')).to have_content(project.path) expect(find('.breadcrumbs-sub-title')).to have_content(project.path)
end end
end end
end end
......
...@@ -160,7 +160,7 @@ describe "Search" do ...@@ -160,7 +160,7 @@ describe "Search" do
fill_in 'search', with: 'gitlab' fill_in 'search', with: 'gitlab'
find('#search').native.send_keys(:enter) find('#search').native.send_keys(:enter)
page.within '.title' do page.within '.breadcrumbs-sub-title' do
expect(page).to have_content 'Search' expect(page).to have_content 'Search'
end 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