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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
1.1 KiB
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-03-04 22:38:38 +05:30
RSpec.describe 'Contextual sidebar', :js, feature_category: :remote_development do
2021-12-11 22:18:48 +05:30
context 'when context is a project' do
let_it_be(:project) { create(:project) }
2021-09-04 01:27:46 +05:30
2022-04-04 11:22:00 +05:30
let(:user) { project.first_owner }
2019-09-04 21:01:54 +05:30
2021-12-11 22:18:48 +05:30
before do
sign_in(user)
end
2019-09-04 21:01:54 +05:30
2021-12-11 22:18:48 +05:30
context 'when analyzing the menu' do
before do
visit project_path(project)
end
it 'shows flyout navs when collapsed or expanded apart from on the active item when expanded', :aggregate_failures do
expect(page).not_to have_selector('.js-sidebar-collapsed')
find('.rspec-link-pipelines').hover
expect(page).to have_selector('.is-showing-fly-out')
find('.rspec-project-link').hover
expect(page).not_to have_selector('.is-showing-fly-out')
find('.rspec-toggle-sidebar').click
find('.rspec-link-pipelines').hover
expect(page).to have_selector('.is-showing-fly-out')
2019-09-04 21:01:54 +05:30
2021-12-11 22:18:48 +05:30
find('.rspec-project-link').hover
expect(page).to have_selector('.is-showing-fly-out')
end
end
2019-09-04 21:01:54 +05:30
end
end