debian-mirror-gitlab/spec/features/dashboard/root_explore_spec.rb

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

40 lines
1,007 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
# frozen_string_literal: true
require 'spec_helper'
2023-05-27 22:25:52 +05:30
RSpec.describe 'Root explore', :saas, feature_category: :shared do
2020-04-08 14:13:33 +05:30
let_it_be(:public_project) { create(:project, :public) }
let_it_be(:archived_project) { create(:project, :archived) }
let_it_be(:internal_project) { create(:project, :internal) }
let_it_be(:private_project) { create(:project, :private) }
2019-02-15 15:39:39 +05:30
context 'when logged in' do
2020-04-08 14:13:33 +05:30
let_it_be(:user) { create(:user) }
2019-02-15 15:39:39 +05:30
before do
sign_in(user)
visit explore_projects_path
end
include_examples 'shows public and internal projects'
end
context 'when not logged in' do
before do
visit explore_projects_path
end
include_examples 'shows public projects'
end
2023-03-04 22:38:38 +05:30
describe 'project language dropdown' do
let(:has_language_dropdown?) { page.has_selector?('[data-testid="project-language-dropdown"]') }
it 'is conditionally rendered' do
visit explore_projects_path
expect(has_language_dropdown?).to eq(true)
end
end
2019-02-15 15:39:39 +05:30
end