debian-mirror-gitlab/spec/features/contextual_sidebar_spec.rb

38 lines
874 B
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe 'Contextual sidebar', :js do
2021-09-04 01:27:46 +05:30
let_it_be(:project) { create(:project) }
let(:user) { project.owner }
2019-09-04 21:01:54 +05:30
before do
sign_in(user)
visit project_path(project)
end
2021-09-04 01:27:46 +05:30
it 'shows flyout navs when collapsed or expanded apart from on the active item when expanded', :aggregate_failures do
2019-09-04 21:01:54 +05:30
expect(page).not_to have_selector('.js-sidebar-collapsed')
2019-10-12 21:52:04 +05:30
find('.rspec-link-pipelines').hover
2019-09-04 21:01:54 +05:30
expect(page).to have_selector('.is-showing-fly-out')
2019-10-12 21:52:04 +05:30
find('.rspec-project-link').hover
2019-09-04 21:01:54 +05:30
expect(page).not_to have_selector('.is-showing-fly-out')
2019-10-12 21:52:04 +05:30
find('.rspec-toggle-sidebar').click
2019-09-04 21:01:54 +05:30
2019-10-12 21:52:04 +05:30
find('.rspec-link-pipelines').hover
2019-09-04 21:01:54 +05:30
expect(page).to have_selector('.is-showing-fly-out')
2019-10-12 21:52:04 +05:30
find('.rspec-project-link').hover
2019-09-04 21:01:54 +05:30
expect(page).to have_selector('.is-showing-fly-out')
end
end