From 01784fb866ada90c8c4c7c2a495fa6daed066612 Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Wed, 10 Dec 2025 12:30:04 +0530 Subject: [PATCH 1/7] Remove `paneled_view` feature flag Removes `paneled_view` feature flag and its dependencies Changelog: other --- app/models/users/project_studio.rb | 2 +- config/feature_flags/beta/paneled_view.yml | 10 ---- doc/user/interface_redesign.md | 1 + lib/gitlab/gon_helper.rb | 1 - spec/models/users/project_studio_spec.rb | 55 ++++------------------ 5 files changed, 11 insertions(+), 58 deletions(-) delete mode 100644 config/feature_flags/beta/paneled_view.yml diff --git a/app/models/users/project_studio.rb b/app/models/users/project_studio.rb index 47b79996353b9a..a69e79d29932e0 100644 --- a/app/models/users/project_studio.rb +++ b/app/models/users/project_studio.rb @@ -14,7 +14,7 @@ def initialize(user) def enabled? return false if ENV["GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED"] == "false" - Feature.enabled?(:paneled_view, user) + true end private diff --git a/config/feature_flags/beta/paneled_view.yml b/config/feature_flags/beta/paneled_view.yml deleted file mode 100644 index c1e3d745a86c24..00000000000000 --- a/config/feature_flags/beta/paneled_view.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: paneled_view -description: -feature_issue_url: -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/201307 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/work_items/574049 -milestone: '18.3' -group: group::project management -type: beta -default_enabled: true diff --git a/doc/user/interface_redesign.md b/doc/user/interface_redesign.md index 6086fa5f334c75..7a85e979598612 100644 --- a/doc/user/interface_redesign.md +++ b/doc/user/interface_redesign.md @@ -19,6 +19,7 @@ description: Learn about an upcoming redesign of GitLab user interface. Disabled by default. - [Enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated](https://gitlab.com/gitlab-org/gitlab/-/work_items/574049) in GitLab 18.6. - Toggle [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/212303) in GitLab 18.7. +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/work_items/574049) in GitLab 18.7. Feature flag `paneled_view` removed. {{< /history >}} diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index ff4b60d2c0a13b..dbba04ed8e4a8c 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -106,7 +106,6 @@ def add_gon_feature_flags push_frontend_feature_flag(:glql_work_items, current_user) push_frontend_feature_flag(:glql_aggregation, current_user, type: :wip) push_frontend_feature_flag(:glql_typescript, current_user, type: :wip) - push_frontend_feature_flag(:paneled_view, current_user) push_frontend_feature_flag(:archive_group) push_frontend_feature_flag(:accessible_loading_button, current_user) push_frontend_feature_flag(:allow_iframes_in_markdown, current_user) diff --git a/spec/models/users/project_studio_spec.rb b/spec/models/users/project_studio_spec.rb index 6f041e24673faf..dd5bee5f56462d 100644 --- a/spec/models/users/project_studio_spec.rb +++ b/spec/models/users/project_studio_spec.rb @@ -21,33 +21,20 @@ describe '#enabled?' do context 'when user is nil' do - context 'when the Project Studio is not available' do - before do - stub_feature_flags(paneled_view: false) - end - - it 'returns `false`' do - expect(described_class.new(nil).enabled?).to be false - end - end - - context 'when the Project Studio is available' do - before do - stub_feature_flags(paneled_view: true) - end - - it 'returns `true`' do - expect(described_class.new(nil).enabled?).to be true - end + it 'returns `true`' do + expect(described_class.new(nil).enabled?).to be true end end context 'when user is present' do let(:project_studio) { described_class.new(user) } - context 'when the Project Studio is not available' do + it 'returns true' do + expect(project_studio.enabled?).to be true + end + + context 'when the Project Studio is not available due to CI override' do before do - stub_feature_flags(paneled_view: false) stub_env('GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED', 'false') end @@ -55,16 +42,6 @@ expect(project_studio.enabled?).to be false end end - - context 'when the Project Studio is available' do - before do - stub_feature_flags(paneled_view: true) - end - - it 'returns true' do - expect(project_studio.enabled?).to be true - end - end end end @@ -80,22 +57,8 @@ end context 'when user is present' do - where( - :paneled_view_flag, - :expected_result - ) do - false | false - true | false - end - - with_them do - before do - stub_feature_flags(paneled_view: paneled_view_flag) - end - - it 'returns expected result' do - expect(described_class.new(user).enabled?).to be expected_result - end + it 'returns false' do + expect(described_class.new(user).enabled?).to be false end end end -- GitLab From 0cf912aba7a0f4ef34320d41e9b0823435df90a1 Mon Sep 17 00:00:00 2001 From: Jay McCure Date: Fri, 12 Dec 2025 11:32:29 +1000 Subject: [PATCH 2/7] CI: remove classic UI system test jobs --- .gitlab/ci/rails.gitlab-ci.yml | 29 ------------------------ app/models/users/project_studio.rb | 2 -- spec/models/users/project_studio_spec.rb | 28 ----------------------- 3 files changed, 59 deletions(-) diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index bc2c708ca42c78..bc2d7819080960 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -221,21 +221,6 @@ rspec system pg16: variables: DEBUG_GITLAB_TRANSACTION_STACK: "true" -rspec system pg16 classic-ui: - tags: - - $GLCI_MEDIUM_RUNNER_REQUIRED - extends: - - .rspec-base-pg16 - - .rspec-system-parallel - - .rails:rules:ee-only-system - variables: - DEBUG_GITLAB_TRANSACTION_STACK: "true" - GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED: "false" - rules: - - if: '$CI_MERGE_REQUEST_IID == null' - when: never - - !reference [.rails:rules:ee-only-system, rules] - rspec system pg16 vue3: extends: - rspec system pg16 @@ -1001,20 +986,6 @@ rspec-ee system pg16: - .rspec-ee-system-parallel - .rails:rules:ee-only-system -rspec-ee system pg16 classic-ui: - tags: - - $GLCI_MEDIUM_RUNNER_REQUIRED - extends: - - .rspec-ee-base-pg16 - - .rspec-ee-system-parallel - - .rails:rules:ee-only-system - variables: - GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED: "false" - rules: - - if: '$CI_MERGE_REQUEST_IID == null' - when: never - - !reference [.rails:rules:ee-only-system, rules] - rspec-ee system pg16 single-db: extends: - rspec-ee system pg16 diff --git a/app/models/users/project_studio.rb b/app/models/users/project_studio.rb index a69e79d29932e0..b4b536c1375ad3 100644 --- a/app/models/users/project_studio.rb +++ b/app/models/users/project_studio.rb @@ -12,8 +12,6 @@ def initialize(user) end def enabled? - return false if ENV["GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED"] == "false" - true end diff --git a/spec/models/users/project_studio_spec.rb b/spec/models/users/project_studio_spec.rb index dd5bee5f56462d..9be834e43f949e 100644 --- a/spec/models/users/project_studio_spec.rb +++ b/spec/models/users/project_studio_spec.rb @@ -32,34 +32,6 @@ it 'returns true' do expect(project_studio.enabled?).to be true end - - context 'when the Project Studio is not available due to CI override' do - before do - stub_env('GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED', 'false') - end - - it 'returns `false`' do - expect(project_studio.enabled?).to be false - end - end - end - end - - describe '#enabled? with GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED set to false' do - before do - stub_env('GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED', 'false') - end - - context 'when user is nil' do - it 'returns false' do - expect(described_class.new(nil).enabled?).to be false - end - end - - context 'when user is present' do - it 'returns false' do - expect(described_class.new(user).enabled?).to be false - end end end end -- GitLab From 2230252503fdb587cdd97abfceead34d934fb594 Mon Sep 17 00:00:00 2001 From: Jay McCure Date: Tue, 16 Dec 2025 08:44:23 +1000 Subject: [PATCH 3/7] Remove Users::ProjectStudio class --- app/helpers/application_helper.rb | 2 +- app/models/users/project_studio.rb | 22 --- app/policies/global_policy.rb | 2 +- ee/spec/features/admin/admin_mode_spec.rb | 4 +- ee/spec/features/ai_sidepanel_spec.rb | 19 --- .../user_navigates_duo_chat_history_spec.rb | 1 - .../duo_chat/user_opens_duo_chat_spec.rb | 34 +--- .../epic_boards/epic_boards_sidebar_spec.rb | 6 +- ee/spec/features/learn_gitlab_spec.rb | 4 +- .../security/vulnerability_details_spec.rb | 1 - ee/spec/features/tanuki_bot_chat_spec.rb | 16 +- ...racts_with_explore_duo_core_banner_spec.rb | 4 - .../issues/new/user_creates_issue_spec.rb | 3 +- .../list/user_interacts_with_drawer_spec.rb | 4 - ee/spec/helpers/ee/nav_helper_spec.rb | 37 ----- ee/spec/views/layouts/_page.html.haml_spec.rb | 52 ------ .../_tanuki_bot_chat.html.haml_spec.rb | 36 ----- lib/gitlab/gon_helper.rb | 2 +- spec/features/boards/sidebar_spec.rb | 1 - spec/features/global_search_spec.rb | 6 +- .../incidents/incident_details_spec.rb | 6 +- .../merge_request/batch_comments_spec.rb | 12 +- .../user_comments_on_diff_spec.rb | 12 +- ...comments_on_whitespace_hidden_diff_spec.rb | 6 +- .../user_posts_diff_notes_spec.rb | 6 +- ...diff_notes_and_discussions_resolve_spec.rb | 6 +- .../user_scrolls_to_note_on_load_spec.rb | 24 +-- .../user_sees_avatar_on_diff_notes_spec.rb | 12 +- .../merge_request/user_sees_diff_spec.rb | 6 +- .../merge_request/user_sees_versions_spec.rb | 12 +- .../user_suggests_changes_on_diff_spec.rb | 9 +- .../repository/file_tree_browser_spec.rb | 16 +- .../snippets/user_updates_snippet_spec.rb | 3 +- .../projects/user_sees_sidebar_spec.rb | 19 +-- .../snippets/user_edits_snippet_spec.rb | 3 +- .../list/user_interacts_with_drawer_spec.rb | 150 +++++------------- spec/helpers/application_helper_spec.rb | 16 -- spec/models/users/project_studio_spec.rb | 37 ----- spec/policies/global_policy_spec.rb | 20 +-- ..._on_merge_request_files_shared_examples.rb | 6 +- .../preferences/show.html.haml_spec.rb | 11 -- 41 files changed, 90 insertions(+), 558 deletions(-) delete mode 100644 app/models/users/project_studio.rb delete mode 100644 ee/spec/views/layouts/_page.html.haml_spec.rb delete mode 100644 spec/models/users/project_studio_spec.rb diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d80672e13f0ed2..446dbbc635b5eb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -132,7 +132,7 @@ def simple_sanitize(str) end def project_studio_enabled? - Users::ProjectStudio.new(current_user).enabled? + true end def body_data diff --git a/app/models/users/project_studio.rb b/app/models/users/project_studio.rb deleted file mode 100644 index b4b536c1375ad3..00000000000000 --- a/app/models/users/project_studio.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -module Users - class ProjectStudio - # Convenience class method for checking if Project Studio is enabled for a user. - def self.enabled_for_user?(user) - new(user).enabled? - end - - def initialize(user) - @user = user - end - - def enabled? - true - end - - private - - attr_reader :user - end -end diff --git a/app/policies/global_policy.rb b/app/policies/global_policy.rb index 338861d589b2bb..ebb29df728a2b3 100644 --- a/app/policies/global_policy.rb +++ b/app/policies/global_policy.rb @@ -47,7 +47,7 @@ class GlobalPolicy < BasePolicy end condition(:project_studio_available, scope: :user, score: 0) do - ::Users::ProjectStudio.new(@user).enabled? + true end rule { bot & ~bot_with_quick_actions_permitted }.policy do diff --git a/ee/spec/features/admin/admin_mode_spec.rb b/ee/spec/features/admin/admin_mode_spec.rb index 4db8a2fbf148a4..ab44b6f0c9701c 100644 --- a/ee/spec/features/admin/admin_mode_spec.rb +++ b/ee/spec/features/admin/admin_mode_spec.rb @@ -18,7 +18,7 @@ it 'can enter admin mode via admin button' do visit root_dashboard_path - find_by_testid('user-avatar-content').click if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout + find_by_testid('user-avatar-content').click click_link 'Admin' wait_for_requests @@ -38,6 +38,7 @@ it 'can access admin dashboard without entering admin mode' do visit root_dashboard_path + expect(page).to have_link('Admin') click_link 'Admin' expect(page).to have_current_path(admin_root_path) @@ -53,6 +54,7 @@ it 'can access admin dashboard without entering admin mode' do visit root_dashboard_path + expect(page).to have_link('Admin') click_link 'Admin' expect(page).to have_current_path(admin_root_path) diff --git a/ee/spec/features/ai_sidepanel_spec.rb b/ee/spec/features/ai_sidepanel_spec.rb index 443626f8ae515e..f17afbd270e69b 100644 --- a/ee/spec/features/ai_sidepanel_spec.rb +++ b/ee/spec/features/ai_sidepanel_spec.rb @@ -32,26 +32,7 @@ allow(::Gitlab::Llm::TanukiBot).to receive_messages(chat_disabled_reason: nil, credits_available?: true) end - context 'when Project Studio IS NOT enabled' do - before do - # NOTE: We will stub all existing methods on Users::ProjectStudio to return false, to ensure that - # it always is disabled, regardless of how it may be refactored in the future. - project_studio_instance = instance_double(Users::ProjectStudio, enabled?: false) - allow(Users::ProjectStudio).to receive_messages(new: project_studio_instance, enabled_for_user?: false) - end - - it 'does not show AI sidepanel' do - visit project_path(project) - - expect(page).not_to have_css(ai_sidepanel_selector) - end - end - context 'when Project Studio IS enabled' do - before do - skip 'Test not applicable in classic UI' unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - end - describe 'sidepanel visibility' do it 'shows the AI sidepanel toggle and can expand' do # Enable Agentic mode so sessions toggle appears diff --git a/ee/spec/features/duo_chat/user_navigates_duo_chat_history_spec.rb b/ee/spec/features/duo_chat/user_navigates_duo_chat_history_spec.rb index 1742d3d64f67fe..afc37df7adcd64 100644 --- a/ee/spec/features/duo_chat/user_navigates_duo_chat_history_spec.rb +++ b/ee/spec/features/duo_chat/user_navigates_duo_chat_history_spec.rb @@ -46,7 +46,6 @@ def close_popover allow(::Gitlab::Llm::TanukiBot).to receive(:credits_available?).and_return(true) sign_in(user) - skip 'Test not applicable in classic UI' unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout visit project_path(project) open_duo_chat diff --git a/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb b/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb index 7ed16391bfe46e..b2b8e7df5fa212 100644 --- a/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb +++ b/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb @@ -23,9 +23,6 @@ describe 'opening Duo Chat' do before do visit project_path(project) - - # close button for the popover - find_by_testid('close-button').click unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout end it 'shows the Duo Chat button' do @@ -36,37 +33,25 @@ find('button.js-tanuki-bot-chat-toggle').click wait_for_requests - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page).to have_css('.ai-panel') - else - expect(page).to have_css('.duo-chat-container') - end + expect(page).to have_css('.ai-panel') end end describe 'closing Duo Chat' do before do visit project_path(project) - find_by_testid('close-button').click unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find('button.js-tanuki-bot-chat-toggle').click wait_for_requests end it 'closes Duo Chat drawer when close button is clicked' do - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - if has_testid?('duo-chat-promo-callout-popover', wait: 1) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - within_testid('duo-chat-promo-callout-popover') { find_by_testid('close-icon').click } - end - - find_by_testid('content-container-collapse-button').click + if has_testid?('duo-chat-promo-callout-popover', wait: 1) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout + within_testid('duo-chat-promo-callout-popover') { find_by_testid('close-icon').click } + end - expect(page).not_to have_css('.ai-panel') - else - find_by_testid('chat-close-button').click + find_by_testid('content-container-collapse-button').click - expect(page).not_to have_css('.duo-chat-container') - end + expect(page).not_to have_css('.ai-panel') end end @@ -95,12 +80,7 @@ find_by_testid('rca-duo-button').click wait_for_requests - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page).to have_css('.ai-panel') - else - expect(page).to have_css('.duo-chat-container') - end - + expect(page).to have_css('.ai-panel') expect(page).to have_content(/troubleshoot/i) end end diff --git a/ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb b/ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb index c111358aba69d4..8e7370715f2948 100644 --- a/ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb +++ b/ee/spec/features/epic_boards/epic_boards_sidebar_spec.rb @@ -35,11 +35,7 @@ expect(page).to have_testid('work-item-drawer') - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - click_button 'Close panel' - else - click_button 'Close drawer' - end + click_button 'Close panel' expect(page).not_to have_testid('work-item-drawer') end diff --git a/ee/spec/features/learn_gitlab_spec.rb b/ee/spec/features/learn_gitlab_spec.rb index dc8439ac598ddd..880cf655b01cee 100644 --- a/ee/spec/features/learn_gitlab_spec.rb +++ b/ee/spec/features/learn_gitlab_spec.rb @@ -147,7 +147,7 @@ it 'shows the duo chat promo popover after a page refresh' do page.refresh - find_by_testid('ai-chat-toggle').click if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout + find_by_testid('ai-chat-toggle').click expect(page).to have_selector('[data-testid="duo-chat-promo-callout-popover"]') end end @@ -162,7 +162,7 @@ end it 'shows the duo chat promo popover' do - find_by_testid('ai-chat-toggle').click if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout + find_by_testid('ai-chat-toggle').click expect(page).to have_selector('[data-testid="duo-chat-promo-callout-popover"]') end diff --git a/ee/spec/features/projects/security/vulnerability_details_spec.rb b/ee/spec/features/projects/security/vulnerability_details_spec.rb index ecba877803b826..e3496cf2da1aaf 100644 --- a/ee/spec/features/projects/security/vulnerability_details_spec.rb +++ b/ee/spec/features/projects/security/vulnerability_details_spec.rb @@ -151,7 +151,6 @@ def visit_vulnerability_and_open_ai_dropdown(vulnerability) sign_in(user) visit vulnerability_url(vulnerability) - close_promotion_popover unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout # Open the dropdown click_button 'Explain or Resolve with AI' diff --git a/ee/spec/features/tanuki_bot_chat_spec.rb b/ee/spec/features/tanuki_bot_chat_spec.rb index 88c1068d6f058d..2abfc3dcecf784 100644 --- a/ee/spec/features/tanuki_bot_chat_spec.rb +++ b/ee/spec/features/tanuki_bot_chat_spec.rb @@ -40,13 +40,7 @@ context "when opening the drawer from the breadcrumbs or side panel" do before do - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find_by_testid('ai-chat-toggle').click - else - within_testid('top-bar') do - click_button('GitLab Duo Chat') - end - end + find_by_testid('ai-chat-toggle').click end it_behaves_like 'GitLab Duo drawer' @@ -81,13 +75,7 @@ context "when opening the drawer from the breadcrumbs or side panel" do before do - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find_by_testid('ai-chat-toggle').click - else - within_testid('top-bar') do - click_button('GitLab Duo Chat') - end - end + find_by_testid('ai-chat-toggle').click end it_behaves_like 'GitLab Duo drawer' diff --git a/ee/spec/features/user_interacts_with_explore_duo_core_banner_spec.rb b/ee/spec/features/user_interacts_with_explore_duo_core_banner_spec.rb index 73bed308578725..4be1513b2a6d00 100644 --- a/ee/spec/features/user_interacts_with_explore_duo_core_banner_spec.rb +++ b/ee/spec/features/user_interacts_with_explore_duo_core_banner_spec.rb @@ -7,8 +7,6 @@ it 'dismisses the banner when clicking the close button' do expect(page).to have_content(banner_content) - close_promotion_popover unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - page.within('.explore-duo-core-banner') do find('.gl-banner-close').click # Need to wait for requests or else the queries from this request will get @@ -22,8 +20,6 @@ it 'dismisses the banner when clicking the CTA' do expect(page).to have_content(banner_content) - close_promotion_popover unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - page.within('.explore-duo-core-banner') do click_link 'Explore GitLab Duo Core' wait_for_all_requests diff --git a/ee/spec/features/work_items/issues/new/user_creates_issue_spec.rb b/ee/spec/features/work_items/issues/new/user_creates_issue_spec.rb index 9ec1436c9ca209..2645396375e061 100644 --- a/ee/spec/features/work_items/issues/new/user_creates_issue_spec.rb +++ b/ee/spec/features/work_items/issues/new/user_creates_issue_spec.rb @@ -57,8 +57,7 @@ end it 'has disabled GitLab Duo button' do - skip 'https://gitlab.com/gitlab-org/gitlab/-/issues/578218' if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page).to have_button('GitLab Duo', disabled: true) + expect(find_by_testid('ai-chat-toggle')['aria-disabled']).to eq('true') end end end diff --git a/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb b/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb index 666a882be9b500..dc79e4ddd654c6 100644 --- a/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb +++ b/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb @@ -148,10 +148,6 @@ end context 'when project studio is enabled' do - before do - skip 'Test not applicable in classic UI' unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - end - context 'if user is signed in as developer' do let(:issuable_container) { '[data-testid="issuable-container"]' } diff --git a/ee/spec/helpers/ee/nav_helper_spec.rb b/ee/spec/helpers/ee/nav_helper_spec.rb index 22b394eac531fb..9128bb40a84177 100644 --- a/ee/spec/helpers/ee/nav_helper_spec.rb +++ b/ee/spec/helpers/ee/nav_helper_spec.rb @@ -30,41 +30,4 @@ end end end - - describe '#top_bar_duo_button_enabled?' do - before do - skip 'Test not applicable in new UI' if Users::ProjectStudio.enabled_for_user?(user) - end - - context 'when TanukiBot.show_breadcrumbs_entry_point? returns true' do - before do - allow(::Gitlab::Llm::TanukiBot).to receive(:show_breadcrumbs_entry_point?).with(user: user).and_return(true) - end - - it 'returns true' do - expect(helper).to be_top_bar_duo_button_enabled - end - end - - context 'when TanukiBot.show_breadcrumbs_entry_point? returns false' do - before do - allow(::Gitlab::Llm::TanukiBot).to receive(:show_breadcrumbs_entry_point?).with(user: user).and_return(false) - end - - it 'returns false' do - expect(helper).not_to be_top_bar_duo_button_enabled - end - end - - context 'when current_user is nil' do - before do - allow(helper).to receive(:current_user).and_return(nil) - allow(::Gitlab::Llm::TanukiBot).to receive(:show_breadcrumbs_entry_point?).with(user: nil).and_return(false) - end - - it 'returns false' do - expect(helper).not_to be_top_bar_duo_button_enabled - end - end - end end diff --git a/ee/spec/views/layouts/_page.html.haml_spec.rb b/ee/spec/views/layouts/_page.html.haml_spec.rb deleted file mode 100644 index d01cdb6c2839e3..00000000000000 --- a/ee/spec/views/layouts/_page.html.haml_spec.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'layouts/_page', feature_category: :global_search do - let_it_be(:user) { build_stubbed(:user) } - let_it_be(:project) { build_stubbed(:project) } - - describe 'EE tanuki_bot_chat' do - before do - skip 'Test not applicable in new UI' if Users::ProjectStudio.enabled_for_user?(user) - assign(:project, project) - allow(view).to receive_messages(current_user: user, current_user_mode: Gitlab::Auth::CurrentUserMode.new(user)) - end - - describe 'when project is nil' do - let_it_be(:project) { nil } - - it 'does not render #js-tanuki-bot-chat-app' do - render - - expect(rendered).not_to have_selector('#js-tanuki-bot-chat-app') - end - end - - describe 'when ::Gitlab::Llm::TanukiBot.enabled_for?(user) is true' do - before do - allow(::Gitlab::Llm::TanukiBot).to receive(:enabled_for?) - .with(user: user, container: nil).and_return(true) - end - - it 'renders #js-tanuki-bot-chat-app' do - render - - expect(rendered).to have_selector('#js-tanuki-bot-chat-app') - end - end - - describe 'when ::Gitlab::Llm::TanukiBot.enabled_for?(user) is false' do - before do - allow(::Gitlab::Llm::TanukiBot).to receive(:enabled_for?) - .with(user: user, container: nil).and_return(false) - end - - it 'does not render #js-tanuki-bot-chat-app' do - render - - expect(rendered).not_to have_selector('#js-tanuki-bot-chat-app') - end - end - end -end diff --git a/ee/spec/views/layouts/_tanuki_bot_chat.html.haml_spec.rb b/ee/spec/views/layouts/_tanuki_bot_chat.html.haml_spec.rb index fb312256000b2e..a5900dee0ffdc7 100644 --- a/ee/spec/views/layouts/_tanuki_bot_chat.html.haml_spec.rb +++ b/ee/spec/views/layouts/_tanuki_bot_chat.html.haml_spec.rb @@ -73,40 +73,4 @@ expect(rendered).not_to have_css("#js-duo-agentic-chat-app[data-namespace-id]") end end - - describe 'Tanuki bot chat app' do - before do - skip 'Test not applicable in new UI' if Users::ProjectStudio.enabled_for_user?(current_user) - end - - it 'includes the root_namespace_id in the data attributes' do - render - - expect(rendered).to have_css("#js-tanuki-bot-chat-app[data-root-namespace-id='test_root_namespace_id']") - end - - context 'when AmazonQ is enabled' do - before do - allow(::Ai::AmazonQ).to receive(:enabled?).and_return(true) - end - - it 'sets the correct chat title' do - render - - expect(rendered).to have_css("#js-tanuki-bot-chat-app[data-chat-title='GitLab Duo Chat with Amazon Q']") - end - end - - context 'when AmazonQ is not enabled' do - before do - allow(::Ai::AmazonQ).to receive(:enabled?).and_return(false) - end - - it 'sets the correct chat title' do - render - - expect(rendered).to have_css("#js-tanuki-bot-chat-app[data-chat-title='GitLab Duo Chat']") - end - end - end end diff --git a/lib/gitlab/gon_helper.rb b/lib/gitlab/gon_helper.rb index dbba04ed8e4a8c..3dbcf1b23cbbcb 100644 --- a/lib/gitlab/gon_helper.rb +++ b/lib/gitlab/gon_helper.rb @@ -111,7 +111,7 @@ def add_gon_feature_flags push_frontend_feature_flag(:allow_iframes_in_markdown, current_user) # Expose the Project Studio user preference as if it were a feature flag - push_force_frontend_feature_flag(:project_studio_enabled, Users::ProjectStudio.new(current_user).enabled?) + push_force_frontend_feature_flag(:project_studio_enabled, true) end # Exposes the state of a feature flag to the frontend code. diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index ce24eda655840e..ca518c26901b89 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -20,7 +20,6 @@ context 'when project studio is enabled' do before do - skip 'Test not applicable in classic UI' unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout sign_in(user) visit project_board_path(project, board) diff --git a/spec/features/global_search_spec.rb b/spec/features/global_search_spec.rb index 12b731a30dc619..69a7e714ea82e0 100644 --- a/spec/features/global_search_spec.rb +++ b/spec/features/global_search_spec.rb @@ -17,11 +17,7 @@ shared_examples 'header search' do it 'renders search button' do - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page).to have_selector('[data-testid="super-topbar-search-button"]') - else - expect(page).to have_selector('[data-testid="super-sidebar-search-button"]') - end + expect(page).to have_selector('[data-testid="super-topbar-search-button"]') end it 'opens search modal when shortcut "s" is pressed' do diff --git a/spec/features/incidents/incident_details_spec.rb b/spec/features/incidents/incident_details_spec.rb index f80df4e0b6ce96..f04701bd88a5f4 100644 --- a/spec/features/incidents/incident_details_spec.rb +++ b/spec/features/incidents/incident_details_spec.rb @@ -216,10 +216,6 @@ def current_status end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(developer) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end diff --git a/spec/features/merge_request/batch_comments_spec.rb b/spec/features/merge_request/batch_comments_spec.rb index 2c1c7069a2a398..0ef17d6bc80395 100644 --- a/spec/features/merge_request/batch_comments_spec.rb +++ b/spec/features/merge_request/batch_comments_spec.rb @@ -70,11 +70,7 @@ wait_for_requests # make sure comment form is in view - if Users::ProjectStudio.enabled_for_user?(user) - execute_script("document.querySelector('.js-static-panel-inner').scrollBy(0, 200)") - else - execute_script("window.scrollBy(0, 200)") - end + execute_script("document.querySelector('.js-static-panel-inner').scrollBy(0, 200)") write_comment(text: 'Testing update', button_text: 'Save comment') @@ -328,10 +324,6 @@ def write_reply_to_discussion(button_text: 'Start a review', text: 'Line is wron end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(user) - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end diff --git a/spec/features/merge_request/user_comments_on_diff_spec.rb b/spec/features/merge_request/user_comments_on_diff_spec.rb index 5e62427afdd8e7..35926408cfc28c 100644 --- a/spec/features/merge_request/user_comments_on_diff_spec.rb +++ b/spec/features/merge_request/user_comments_on_diff_spec.rb @@ -95,11 +95,7 @@ expect(find_in_page_or_panel_by_scrolling(".js-discussion-container", index: 0)).to have_content('Line is correct') # Check the same comments in the side-by-side view. - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - page.execute_script "document.querySelector('.js-static-panel-inner').scrollTo(0,0)" - else - execute_script "window.scrollTo(0,0)" - end + page.execute_script "document.querySelector('.js-static-panel-inner').scrollTo(0,0)" find('.js-show-diff-settings').click find_by_testid('listbox-item-parallel').click @@ -290,11 +286,7 @@ def add_comment(start_line) def find_in_page_or_panel_by_scrolling(selector, index: nil, **options) if index.nil? # rubocop:disable RSpec/AvoidConditionalStatements -- This is to make index param optional - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) else all(selector, **options)[index] end diff --git a/spec/features/merge_request/user_comments_on_whitespace_hidden_diff_spec.rb b/spec/features/merge_request/user_comments_on_whitespace_hidden_diff_spec.rb index 6fb95505c4598a..bd2b3b2dec54a9 100644 --- a/spec/features/merge_request/user_comments_on_whitespace_hidden_diff_spec.rb +++ b/spec/features/merge_request/user_comments_on_whitespace_hidden_diff_spec.rb @@ -167,10 +167,6 @@ def hide_whitespace end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end diff --git a/spec/features/merge_request/user_posts_diff_notes_spec.rb b/spec/features/merge_request/user_posts_diff_notes_spec.rb index 1ad7fec13f53d1..c87e4fe1ddd350 100644 --- a/spec/features/merge_request/user_posts_diff_notes_spec.rb +++ b/spec/features/merge_request/user_posts_diff_notes_spec.rb @@ -286,10 +286,6 @@ def assert_form_is_reset end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(user) - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end diff --git a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb index a9bdfc34e5e82b..e12175a35f0311 100644 --- a/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb +++ b/spec/features/merge_request/user_resolves_diff_notes_and_discussions_resolve_spec.rb @@ -334,11 +334,7 @@ page.find('.discussion-next-btn').click end - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page.evaluate_script("document.querySelector('.js-static-panel-inner').scrollTop")).to be > 0 - else - expect(page.evaluate_script("window.pageYOffset")).to be > 0 - end + expect(page.evaluate_script("document.querySelector('.js-static-panel-inner').scrollTop")).to be > 0 end it 'updates updated text after resolving note' do diff --git a/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb b/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb index eab42268485df6..f97b60bbe01006 100644 --- a/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb +++ b/spec/features/merge_request/user_scrolls_to_note_on_load_spec.rb @@ -22,19 +22,11 @@ expect(page).to have_selector(fragment_id.to_s) expect(find(fragment_id).visible?).to eq true - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - panel_scroll_top = page.evaluate_script("document.querySelector('.js-static-panel-inner').scrollTop") - fragment_position_top = page.evaluate_script("Math.round(document.querySelector('#{fragment_id}').getBoundingClientRect().top + document.querySelector('.js-static-panel-inner').scrollTop)") - - expect(fragment_position_top).to be >= panel_scroll_top - expect(page.evaluate_script("document.querySelector('.js-static-panel-inner').scrollTop")).to be > 0 - else - page_scroll_y = page.evaluate_script("window.scrollY") - fragment_position_top = page.evaluate_script("Math.round(document.querySelector('#{fragment_id}').getBoundingClientRect().top + window.pageYOffset)") - - expect(fragment_position_top).to be >= page_scroll_y - expect(page.evaluate_script("window.pageYOffset")).to be > 0 - end + panel_scroll_top = page.evaluate_script("document.querySelector('.js-static-panel-inner').scrollTop") + fragment_position_top = page.evaluate_script("Math.round(document.querySelector('#{fragment_id}').getBoundingClientRect().top + document.querySelector('.js-static-panel-inner').scrollTop)") + + expect(fragment_position_top).to be >= panel_scroll_top + expect(page.evaluate_script("document.querySelector('.js-static-panel-inner').scrollTop")).to be > 0 end it 'renders un-collapsed notes with diff' do @@ -42,11 +34,7 @@ visit "#{project_merge_request_path(project, merge_request)}#{fragment_id}" - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - page.execute_script "document.querySelector('.js-static-panel-inner').scrollTo(0,0)" - else - page.execute_script "window.scrollTo(0,0)" - end + page.execute_script "document.querySelector('.js-static-panel-inner').scrollTo(0,0)" note_element = find(fragment_id) note_container = note_element.ancestor('.js-discussion-container') diff --git a/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb b/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb index 8cb078f4c54940..f4eb4ca27047f0 100644 --- a/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb +++ b/spec/features/merge_request/user_sees_avatar_on_diff_notes_spec.rb @@ -126,11 +126,7 @@ it 'removes avatar when note is deleted', quarantine: 'https://gitlab.com/gitlab-org/quality/test-failure-issues/-/issues/4253' do - if Users::ProjectStudio.enabled_for_user?(user) - open_more_actions_dropdown_in_panel(note) - else - open_more_actions_dropdown(note) - end + open_more_actions_dropdown_in_panel(note) accept_gl_confirm(button_text: 'Delete comment') do find(".note-row-#{note.id} .js-note-delete").click @@ -211,10 +207,6 @@ def find_line(line_code) end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(user) - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end diff --git a/spec/features/merge_request/user_sees_diff_spec.rb b/spec/features/merge_request/user_sees_diff_spec.rb index 2621f4c1057ded..6a29912b3e7e75 100644 --- a/spec/features/merge_request/user_sees_diff_spec.rb +++ b/spec/features/merge_request/user_sees_diff_spec.rb @@ -208,11 +208,7 @@ def create_file(branch_name, file_name, content) end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end end diff --git a/spec/features/merge_request/user_sees_versions_spec.rb b/spec/features/merge_request/user_sees_versions_spec.rb index d1d0e0805089ed..baec36d9051ddb 100644 --- a/spec/features/merge_request/user_sees_versions_spec.rb +++ b/spec/features/merge_request/user_sees_versions_spec.rb @@ -30,11 +30,7 @@ line_code_element = page.find('.diff-grid-row', text: line_text) # scrolling to element's bottom is required in order for .hover action to work # otherwise, the element could be hidden underneath a sticky header - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - scroll_to_panel_elements_bottom(line_code_element) - else - scroll_to_elements_bottom(line_code_element) - end + scroll_to_panel_elements_bottom(line_code_element) line_code_element.hover find_by_testid('left-comment-button', visible: true).click @@ -286,10 +282,6 @@ end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end diff --git a/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb b/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb index 9b9db16f9a8a95..a411fa6c217332 100644 --- a/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb +++ b/spec/features/merge_request/user_suggests_changes_on_diff_spec.rb @@ -22,9 +22,6 @@ def expect_suggestion_has_content(element, expected_changing_content, expected_s let(:user) { create(:user) } before do - # -- temporary Project Studio rollout - skip 'Test not applicable in classic UI' unless Users::ProjectStudio.enabled_for_user?(user) - project.add_maintainer(user) sign_in(user) @@ -451,10 +448,6 @@ def diffs_metadata end def find_in_page_or_panel_by_scrolling(selector, **options) - if Users::ProjectStudio.enabled_for_user?(user) - find_in_panel_by_scrolling(selector, **options) - else - find_by_scrolling(selector, **options) - end + find_in_panel_by_scrolling(selector, **options) end end diff --git a/spec/features/projects/repository/file_tree_browser_spec.rb b/spec/features/projects/repository/file_tree_browser_spec.rb index ea134d970bf313..483125bcbf3d73 100644 --- a/spec/features/projects/repository/file_tree_browser_spec.rb +++ b/spec/features/projects/repository/file_tree_browser_spec.rb @@ -20,20 +20,12 @@ describe 'basic functionality' do it 'shows and hides the file tree browser' do - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page).to have_css('.file-tree-browser-peek') - else - expect(page).to have_css('.file-tree-browser-expanded') - end + expect(page).to have_css('.file-tree-browser-peek') click_button 'Hide file tree browser' wait_for_requests - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page).not_to have_css('.file-tree-browser-peek') - else - expect(page).not_to have_css('.file-tree-browser-expanded') - end + expect(page).not_to have_css('.file-tree-browser-peek') end it 'displays files and directories' do @@ -68,8 +60,8 @@ it 'expands parent directories when navigating directly to a nested file' do visit project_blob_path(project, "#{project.default_branch}/files/ruby/popen.rb") wait_for_requests - # File tree starts collapsed in Project Studio - click_button('Show file tree browser') if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout + # File tree starts collapsed + click_button('Show file tree browser') within('.file-tree-browser') do # Should auto-expand parent directories diff --git a/spec/features/projects/snippets/user_updates_snippet_spec.rb b/spec/features/projects/snippets/user_updates_snippet_spec.rb index d8d3b204f34e63..e7ab39a4f35e95 100644 --- a/spec/features/projects/snippets/user_updates_snippet_spec.rb +++ b/spec/features/projects/snippets/user_updates_snippet_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Projects > Snippets > User updates a snippet', :js, feature_category: :source_code_management do +RSpec.describe 'Projects > Snippets > User updates a snippet', :js, feature_category: :source_code_management, quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/580358' do include Features::SnippetSpecHelpers let_it_be(:user) { create(:user) } @@ -10,7 +10,6 @@ let_it_be(:snippet, reload: true) { create(:project_snippet, :repository, project: project, author: user) } before do - skip 'Test skipped when Project Studio enabled as page load can timeout - https://gitlab.com/gitlab-org/gitlab/-/issues/580358' if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout project.add_maintainer(user) sign_in(user) diff --git a/spec/features/projects/user_sees_sidebar_spec.rb b/spec/features/projects/user_sees_sidebar_spec.rb index 14b084f1e6034d..06f1cbd57451b1 100644 --- a/spec/features/projects/user_sees_sidebar_spec.rb +++ b/spec/features/projects/user_sees_sidebar_spec.rb @@ -19,27 +19,16 @@ expect(page).to have_selector('[data-testid="super-sidebar-collapse-button"]', visible: :visible) find_by_testid('super-sidebar-collapse-button').click - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(find_by_testid('super-sidebar')[:class]).to include('super-sidebar-is-icon-only') - else - expect(page).to have_selector('[data-testid="super-sidebar-collapse-button"]', visible: :hidden) - end + expect(find_by_testid('super-sidebar')[:class]).to include('super-sidebar-is-icon-only') end end shared_examples 'has a collapsed nav sidebar' do it 'has a collapsed nav sidebar on load that can be expanded' do - if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - expect(page).not_to have_selector('[data-testid="super-sidebar-collapse-button"]') - - find_by_testid('super-sidebar-toggle-button').click - expect(page).to have_selector('[data-testid="nav-container"]', visible: :visible) - else - expect(page).to have_selector('[data-testid="super-sidebar-collapse-button"]', visible: :hidden) + expect(page).not_to have_selector('[data-testid="super-sidebar-collapse-button"]') - page.find('.js-super-sidebar-toggle-expand').click - expect(page).to have_selector('[data-testid="super-sidebar-collapse-button"]', visible: :visible) - end + find_by_testid('super-sidebar-toggle-button').click + expect(page).to have_selector('[data-testid="nav-container"]', visible: :visible) end end diff --git a/spec/features/snippets/user_edits_snippet_spec.rb b/spec/features/snippets/user_edits_snippet_spec.rb index 43112ace16ec17..3a615b0496508b 100644 --- a/spec/features/snippets/user_edits_snippet_spec.rb +++ b/spec/features/snippets/user_edits_snippet_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'User edits snippet', :js, feature_category: :source_code_management do +RSpec.describe 'User edits snippet', :js, feature_category: :source_code_management, quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/580358' do include DropzoneHelper include Features::SnippetSpecHelpers @@ -21,7 +21,6 @@ end before do - skip 'Test skipped when Project Studio enabled as page load can timeout - https://gitlab.com/gitlab-org/gitlab/-/issues/580358' if Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout sign_in(user) visit edit_snippet_path(snippet) diff --git a/spec/features/work_items/list/user_interacts_with_drawer_spec.rb b/spec/features/work_items/list/user_interacts_with_drawer_spec.rb index cc2e6141d3fd93..94500717236571 100644 --- a/spec/features/work_items/list/user_interacts_with_drawer_spec.rb +++ b/spec/features/work_items/list/user_interacts_with_drawer_spec.rb @@ -13,142 +13,68 @@ let_it_be(:label) { create(:label, project: project, title: "testing-label") } let_it_be(:milestone) { create(:milestone, project: project) } - context 'when project studio is enabled' do - before do - skip 'Test not applicable in classic UI' unless Users::ProjectStudio.enabled_for_user?(user) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - end - - context 'if user is signed in as developer' do - let(:issuable_container) { '[data-testid="issuable-container"]' } - - before_all do - project.add_developer(user) - end - - context 'when accessing work item from project work item list' do - before do - sign_in(user) + context 'if user is signed in as developer' do + let(:issuable_container) { '[data-testid="issuable-container"]' } - visit project_work_items_path(project) - - first_card.click - - wait_for_requests - end + before_all do + project.add_developer(user) + end - it_behaves_like 'work item drawer on the list page' + context 'when accessing work item from project work item list' do + before do + sign_in(user) - it 'updates start and due date on the list', :aggregate_failures do - within_testid('work-item-drawer') do - within_testid 'work-item-due-dates' do - click_button 'Edit' - fill_in 'Start', with: '2025-01-01' - fill_in 'Due', with: '2025-12-31' - end + visit project_work_items_path(project) - close_drawer - end + first_card.click - expect(first_card).to have_content('Jan 1 – Dec 31, 2025') - end + wait_for_requests end - context 'when accessing work item from project issue list' do - before do - stub_feature_flags(work_item_planning_view: false) - - sign_in(user) - - visit project_issues_path(project) + it_behaves_like 'work item drawer on the list page' - first_card.click - - wait_for_requests - end - - it_behaves_like 'work item drawer on the list page' - - it 'updates start and due date on the list', :aggregate_failures do - within_testid('work-item-drawer') do - within_testid 'work-item-due-dates' do - click_button 'Edit' - fill_in 'Start', with: '2025-01-01' - fill_in 'Due', with: '2025-12-31' - end - - close_drawer + it 'updates start and due date on the list', :aggregate_failures do + within_testid('work-item-drawer') do + within_testid 'work-item-due-dates' do + click_button 'Edit' + fill_in 'Start', with: '2025-01-01' + fill_in 'Due', with: '2025-12-31' end - expect(first_card).to have_content('Jan 1 – Dec 31, 2025') + close_drawer end - end - end - end - - context 'when project studio is disabled' do - context 'if user is signed in as developer' do - let(:issuable_container) { '[data-testid="issuable-container"]' } - before_all do - project.add_developer(user) + expect(first_card).to have_content('Jan 1 – Dec 31, 2025') end + end - context 'when accessing work item from project work item list' do - before do - sign_in(user) - - visit project_work_items_path(project) - - first_card.click - - wait_for_requests - end + context 'when accessing work item from project issue list' do + before do + stub_feature_flags(work_item_planning_view: false) - it_behaves_like 'work item drawer on the list page' + sign_in(user) - it 'updates start and due date on the list', :aggregate_failures do - within_testid('work-item-drawer') do - within_testid 'work-item-due-dates' do - click_button 'Edit' - fill_in 'Start', with: '2025-01-01' - fill_in 'Due', with: '2025-12-31' - end + visit project_issues_path(project) - close_drawer - end + first_card.click - expect(first_card).to have_content('Jan 1 – Dec 31, 2025') - end + wait_for_requests end - context 'when accessing work item from project issue list' do - before do - stub_feature_flags(work_item_planning_view: false) - - sign_in(user) - - visit project_issues_path(project) + it_behaves_like 'work item drawer on the list page' - first_card.click - - wait_for_requests - end - - it_behaves_like 'work item drawer on the list page' - - it 'updates start and due date on the list', :aggregate_failures do - within_testid('work-item-drawer') do - within_testid 'work-item-due-dates' do - click_button 'Edit' - fill_in 'Start', with: '2025-01-01' - fill_in 'Due', with: '2025-12-31' - end - - close_drawer + it 'updates start and due date on the list', :aggregate_failures do + within_testid('work-item-drawer') do + within_testid 'work-item-due-dates' do + click_button 'Edit' + fill_in 'Start', with: '2025-01-01' + fill_in 'Due', with: '2025-12-31' end - expect(first_card).to have_content('Jan 1 – Dec 31, 2025') + close_drawer end + + expect(first_card).to have_content('Jan 1 – Dec 31, 2025') end end end diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index ecd431ca322ffc..4723714d5ace1c 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -512,22 +512,6 @@ def expect_autocomplete_data_sources_to_contain(object, noteable_type, source_ke end end - describe '#project_studio_enabled?' do - let(:user) { build(:user) } - - before do - allow(helper).to receive_messages(current_user: user, cookies: { studio: 'true' }) - end - - it 'calls ProjectStudio#enabled?' do - expect_next_instance_of(Users::ProjectStudio, user) do |studio| - expect(studio).to receive(:enabled?) - end - - helper.project_studio_enabled? - end - end - describe '#body_data' do context 'when @project is not set' do it 'does not include project data in the body data elements' do diff --git a/spec/models/users/project_studio_spec.rb b/spec/models/users/project_studio_spec.rb deleted file mode 100644 index 9be834e43f949e..00000000000000 --- a/spec/models/users/project_studio_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe Users::ProjectStudio, feature_category: :user_profile do - using RSpec::Parameterized::TableSyntax - - let_it_be(:user) { create(:user) } - - describe "sanity check that project studio is default enabled" do - before do - # -- temporary Project Studio rollout - skip 'Test not applicable in classic UI' if ENV["GLCI_OVERRIDE_PROJECT_STUDIO_ENABLED"] == "false" - end - - it "passes", quarantine: 'https://gitlab.com/gitlab-org/quality/test-failure-issues/-/issues/17820' do - expect(described_class.new(user).enabled?).to be(true) - expect(described_class.enabled_for_user?(user)).to be(true) - end - end - - describe '#enabled?' do - context 'when user is nil' do - it 'returns `true`' do - expect(described_class.new(nil).enabled?).to be true - end - end - - context 'when user is present' do - let(:project_studio) { described_class.new(user) } - - it 'returns true' do - expect(project_studio.enabled?).to be true - end - end - end -end diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb index 22793569a98a40..f4ce191e0e7b29 100644 --- a/spec/policies/global_policy_spec.rb +++ b/spec/policies/global_policy_spec.rb @@ -659,25 +659,7 @@ end describe 'enable_project_studio' do - context 'when ProjectStudio is available' do - before do - allow_next_instance_of(Users::ProjectStudio) do |instance| - allow(instance).to receive(:enabled?).and_return(true) - end - end - - it { is_expected.to be_allowed(:enable_project_studio) } - end - - context 'when ProjectStudio is not available' do - before do - allow_next_instance_of(Users::ProjectStudio) do |instance| - allow(instance).to receive(:enabled?).and_return(false) - end - end - - it { is_expected.to be_disallowed(:enable_project_studio) } - end + it { is_expected.to be_allowed(:enable_project_studio) } end describe 'log in' do diff --git a/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb b/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb index 2af7b1fea90a44..4e7f6bc0329745 100644 --- a/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb +++ b/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb @@ -2,11 +2,7 @@ RSpec.shared_examples 'comment on merge request file' do it 'adds a comment' do - if Users::ProjectStudio.enabled_for_user?(user) - click_diff_line(find_in_panel_by_scrolling("[id='#{sample_commit.line_code}']")) - else - click_diff_line(find_by_scrolling("[id='#{sample_commit.line_code}']")) - end + click_diff_line(find_in_panel_by_scrolling("[id='#{sample_commit.line_code}']")) page.within('.js-discussion-note-form') do fill_in(:note_note, with: 'Line is wrong') diff --git a/spec/views/profiles/preferences/show.html.haml_spec.rb b/spec/views/profiles/preferences/show.html.haml_spec.rb index 8fbe203b3295de..6ba5984946ee2a 100644 --- a/spec/views/profiles/preferences/show.html.haml_spec.rb +++ b/spec/views/profiles/preferences/show.html.haml_spec.rb @@ -22,17 +22,6 @@ end end - context 'navigation theme' do - before do - skip 'Test not applicable in new UI' if Users::ProjectStudio.enabled_for_user?(user) - render - end - - it 'has an id for anchoring' do - expect(rendered).to have_css('#navigation-theme') - end - end - context 'syntax highlighting theme' do before do render -- GitLab From b9f5bc2aa75a18db0a4a99c17844e817ecf14067 Mon Sep 17 00:00:00 2001 From: Jay McCure Date: Thu, 18 Dec 2025 16:33:15 +1000 Subject: [PATCH 4/7] Remove more project studio conditionals in tests --- ee/spec/features/ai_sidepanel_spec.rb | 166 +++++++++-------- .../duo_chat/user_opens_duo_chat_spec.rb | 4 +- .../list/user_interacts_with_drawer_spec.rb | 170 +++++------------- spec/features/boards/sidebar_spec.rb | 37 ++-- spec/features/groups/milestone_spec.rb | 4 - spec/features/milestone_spec.rb | 8 - spec/features/projects/ci/editor_spec.rb | 2 +- .../user_sees_collaboration_links_spec.rb | 4 +- .../layouts/application.html.haml_spec.rb | 8 +- 9 files changed, 144 insertions(+), 259 deletions(-) diff --git a/ee/spec/features/ai_sidepanel_spec.rb b/ee/spec/features/ai_sidepanel_spec.rb index f17afbd270e69b..5e4296f319b560 100644 --- a/ee/spec/features/ai_sidepanel_spec.rb +++ b/ee/spec/features/ai_sidepanel_spec.rb @@ -32,122 +32,120 @@ allow(::Gitlab::Llm::TanukiBot).to receive_messages(chat_disabled_reason: nil, credits_available?: true) end - context 'when Project Studio IS enabled' do - describe 'sidepanel visibility' do - it 'shows the AI sidepanel toggle and can expand' do - # Enable Agentic mode so sessions toggle appears - set_cookie('duo_agentic_mode_on', 'true') + describe 'sidepanel visibility' do + it 'shows the AI sidepanel toggle and can expand' do + # Enable Agentic mode so sessions toggle appears + set_cookie('duo_agentic_mode_on', 'true') - visit project_path(project) + visit project_path(project) - expect(page).to have_css(ai_sidepanel_selector) + expect(page).to have_css(ai_sidepanel_selector) - expect(page).not_to have_content("Sessions") + expect(page).not_to have_content("Sessions") - within(ai_sidepanel_selector) do - find_by_testid(sessions_toggle_selector).click - end - - # Verify we're now in the agent sessions view - expect(page).to have_content("Sessions") + within(ai_sidepanel_selector) do + find_by_testid(sessions_toggle_selector).click end + + # Verify we're now in the agent sessions view + expect(page).to have_content("Sessions") end + end - describe 'agent sessions in sidepanel' do - let_it_be(:workflow1) do - create(:duo_workflows_workflow, - project: project, - user: user, - goal: 'Fix pipeline issues', - workflow_definition: 'issue_to_mr', - environment: :web) - end + describe 'agent sessions in sidepanel' do + let_it_be(:workflow1) do + create(:duo_workflows_workflow, + project: project, + user: user, + goal: 'Fix pipeline issues', + workflow_definition: 'issue_to_mr', + environment: :web) + end - let_it_be(:workflow2) do - create(:duo_workflows_workflow, - project: project, - user: user, - goal: 'Review code changes', - workflow_definition: 'code_review', - environment: :web) - end + let_it_be(:workflow2) do + create(:duo_workflows_workflow, + project: project, + user: user, + goal: 'Review code changes', + workflow_definition: 'code_review', + environment: :web) + end - before do - # Enable Agentic mode so sessions toggle appears - set_cookie('duo_agentic_mode_on', 'true') + before do + # Enable Agentic mode so sessions toggle appears + set_cookie('duo_agentic_mode_on', 'true') - visit project_path(project) + visit project_path(project) - within(ai_sidepanel_selector) do - find_by_testid(sessions_toggle_selector).click - end + within(ai_sidepanel_selector) do + find_by_testid(sessions_toggle_selector).click end + end - it 'displays the sessions list' do - expect(page).to have_content("Issue to mr ##{workflow1.id}") - expect(page).to have_content("Code review ##{workflow2.id}") - end + it 'displays the sessions list' do + expect(page).to have_content("Issue to mr ##{workflow1.id}") + expect(page).to have_content("Code review ##{workflow2.id}") + end - it 'navigates to session details when clicked' do - expect(page).not_to have_content('Activity') - expect(page).not_to have_content('Details') + it 'navigates to session details when clicked' do + expect(page).not_to have_content('Activity') + expect(page).not_to have_content('Details') - expect(page).to have_selector('a[href*="/agent-sessions/"]') - find('a[href*="/agent-sessions/"]', match: :first).click + expect(page).to have_selector('a[href*="/agent-sessions/"]') + find('a[href*="/agent-sessions/"]', match: :first).click - expect(page).to have_content('Activity') - expect(page).to have_content('Details') + expect(page).to have_content('Activity') + expect(page).to have_content('Details') - expect(page).to have_selector('.gl-tab-nav-item.active', text: 'Activity') - expect(page).to have_no_content('GraphQL error:') - end + expect(page).to have_selector('.gl-tab-nav-item.active', text: 'Activity') + expect(page).to have_no_content('GraphQL error:') + end - it 'can view session details tab' do - find('a[href*="/agent-sessions/"]', match: :first).click + it 'can view session details tab' do + find('a[href*="/agent-sessions/"]', match: :first).click - click_link 'Details' + click_link 'Details' - expect(page).to have_content('Details') - expect(page).to have_content(project.name) - expect(page).to have_no_content('GraphQL error:') - end + expect(page).to have_content('Details') + expect(page).to have_content(project.name) + expect(page).to have_no_content('GraphQL error:') end + end - describe 'agent sessions empty state in sidepanel' do - before do - Ai::DuoWorkflows::Workflow.where(project: project, user: user).delete_all + describe 'agent sessions empty state in sidepanel' do + before do + Ai::DuoWorkflows::Workflow.where(project: project, user: user).delete_all - # Enable Agentic mode so sessions toggle appears - set_cookie('duo_agentic_mode_on', 'true') + # Enable Agentic mode so sessions toggle appears + set_cookie('duo_agentic_mode_on', 'true') - visit project_path(project) + visit project_path(project) + end + + it 'shows empty state when no sessions exist' do + within(ai_sidepanel_selector) do + find_by_testid(sessions_toggle_selector).click end - it 'shows empty state when no sessions exist' do - within(ai_sidepanel_selector) do - find_by_testid(sessions_toggle_selector).click - end + expect(page).to have_content('No agent sessions yet', wait: 10) + end - expect(page).to have_content('No agent sessions yet', wait: 10) + context 'when duo features are disabled' do + before do + project.project_setting.update!(duo_features_enabled: false) + allow(::Gitlab::Llm::TanukiBot).to receive(:chat_disabled_reason).and_return(:project) + visit project_path(project) end - context 'when duo features are disabled' do - before do - project.project_setting.update!(duo_features_enabled: false) - allow(::Gitlab::Llm::TanukiBot).to receive(:chat_disabled_reason).and_return(:project) - visit project_path(project) - end - - it 'prevents access to sessions tab' do - within(ai_sidepanel_selector) do - sessions_button = find_by_testid(sessions_toggle_selector) + it 'prevents access to sessions tab' do + within(ai_sidepanel_selector) do + sessions_button = find_by_testid(sessions_toggle_selector) - expect(sessions_button['aria-disabled']).to eq('true') + expect(sessions_button['aria-disabled']).to eq('true') - sessions_button.click + sessions_button.click - expect(page).not_to have_content('No agent sessions yet') - end + expect(page).not_to have_content('No agent sessions yet') end end end diff --git a/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb b/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb index b2b8e7df5fa212..bbef8fe71e5979 100644 --- a/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb +++ b/ee/spec/features/duo_chat/user_opens_duo_chat_spec.rb @@ -45,9 +45,7 @@ end it 'closes Duo Chat drawer when close button is clicked' do - if has_testid?('duo-chat-promo-callout-popover', wait: 1) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - within_testid('duo-chat-promo-callout-popover') { find_by_testid('close-icon').click } - end + within_testid('duo-chat-promo-callout-popover') { find_by_testid('close-icon').click } find_by_testid('content-container-collapse-button').click diff --git a/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb b/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb index dc79e4ddd654c6..c83c08786d9b7a 100644 --- a/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb +++ b/ee/spec/features/work_items/list/user_interacts_with_drawer_spec.rb @@ -71,157 +71,79 @@ end end - context 'when project studio is disabled' do - context 'if user is signed in as developer' do - let(:issuable_container) { '[data-testid="issuable-container"]' } + context 'if user is signed in as developer' do + let(:issuable_container) { '[data-testid="issuable-container"]' } - before_all do - group.add_developer(user) - end - - context 'when accessing work item from project work item list' do - before do - stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - - sign_in(user) - - visit project_work_items_path(project) - close_work_item_feedback_popover_if_present - - first_card.click - - wait_for_requests - end - - include_examples 'updates weight of a work item on the list' - include_examples 'updates health status of a work item on the list' - include_examples 'updates iteration of a work item on the list' - end - - context 'when accessing work item from group work item list' do - before do - stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - - sign_in(user) + before_all do + group.add_developer(user) + end - visit group_work_items_path(group) - close_work_item_feedback_popover_if_present + context 'when accessing work item from project work item list' do + before do + stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - first_card.click + sign_in(user) - wait_for_requests - end + visit project_work_items_path(project) + close_work_item_feedback_popover_if_present - it_behaves_like 'work item drawer on the list page' + first_card.click - include_examples 'updates weight of a work item on the list' - include_examples 'updates health status of a work item on the list' - include_examples 'updates iteration of a work item on the list' + wait_for_requests end - context 'when accessing work item from group epics list' do - before do - stub_feature_flags(work_item_planning_view: false) - stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - - sign_in(user) - - visit group_epics_path(group) - close_work_item_feedback_popover_if_present - - first_card.click - - wait_for_requests - end - - it_behaves_like 'work item drawer on the list page' do - let(:issue) { epic } - let(:label) { label_group } - let(:milestone) { milestone_group } - end - - it_behaves_like 'updates health status of a work item on the list' do - let(:issue) { epic } - end - end + include_examples 'updates weight of a work item on the list' + include_examples 'updates health status of a work item on the list' + include_examples 'updates iteration of a work item on the list' end - end - context 'when project studio is enabled' do - context 'if user is signed in as developer' do - let(:issuable_container) { '[data-testid="issuable-container"]' } + context 'when accessing work item from group work item list' do + before do + stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - before_all do - group.add_developer(user) - end + sign_in(user) - context 'when accessing work item from project work item list' do - before do - stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) + visit group_work_items_path(group) + close_work_item_feedback_popover_if_present - sign_in(user) + first_card.click - visit project_work_items_path(project) - close_work_item_feedback_popover_if_present + wait_for_requests + end - first_card.click - - wait_for_requests - end + it_behaves_like 'work item drawer on the list page' + context 'with quarantine', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/570546' do include_examples 'updates weight of a work item on the list' - include_examples 'updates health status of a work item on the list' - include_examples 'updates iteration of a work item on the list' end - context 'when accessing work item from group work item list' do - before do - stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - - sign_in(user) + include_examples 'updates health status of a work item on the list' + include_examples 'updates iteration of a work item on the list' + end - visit group_work_items_path(group) - close_work_item_feedback_popover_if_present + context 'when accessing work item from group epics list' do + before do + stub_feature_flags(work_item_planning_view: false) + stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - first_card.click + sign_in(user) - wait_for_requests - end + visit group_epics_path(group) + close_work_item_feedback_popover_if_present - it_behaves_like 'work item drawer on the list page' + first_card.click - context 'with quarantine', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/570546' do - include_examples 'updates weight of a work item on the list' - end - - include_examples 'updates health status of a work item on the list' - include_examples 'updates iteration of a work item on the list' + wait_for_requests end - context 'when accessing work item from group epics list' do - before do - stub_feature_flags(work_item_planning_view: false) - stub_licensed_features(epics: true, issuable_health_status: true, iterations: true) - - sign_in(user) - - visit group_epics_path(group) - close_work_item_feedback_popover_if_present - - first_card.click - - wait_for_requests - end - - it_behaves_like 'work item drawer on the list page' do - let(:issue) { epic } - let(:label) { label_group } - let(:milestone) { milestone_group } - end + it_behaves_like 'work item drawer on the list page' do + let(:issue) { epic } + let(:label) { label_group } + let(:milestone) { milestone_group } + end - it_behaves_like 'updates health status of a work item on the list' do - let(:issue) { epic } - end + it_behaves_like 'updates health status of a work item on the list' do + let(:issue) { epic } end end end diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index ca518c26901b89..47bb36e72aa430 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -5,43 +5,26 @@ RSpec.describe 'Project issue boards sidebar', :js, feature_category: :portfolio_management do include BoardHelpers - let_it_be(:user) { create(:user) } - let_it_be(:group) { create(:group, :public) } + let_it_be(:user) { create(:user) } + let_it_be(:group) { create(:group, :public) } let_it_be(:project) { create(:project, :public, namespace: group) } - let_it_be(:board) { create(:board, project: project) } - let_it_be(:label) { create(:label, project: project, name: 'Label') } - let_it_be(:list) { create(:list, board: board, label: label, position: 0) } + let_it_be(:board) { create(:board, project: project) } + let_it_be(:label) { create(:label, project: project, name: 'Label') } + let_it_be(:list) { create(:list, board: board, label: label, position: 0) } let_it_be(:issue, reload: true) { create(:issue, project: project, relative_position: 1) } before do project.add_maintainer(user) - end - - context 'when project studio is enabled' do - before do - sign_in(user) + sign_in(user) - visit project_board_path(project, board) - click_button 'Collapse sidebar' # otherwise panel opens as drawer and intercepts clicks + visit project_board_path(project, board) + click_button 'Collapse sidebar' # otherwise panel opens as drawer and intercepts clicks - wait_for_requests - end - - it_behaves_like 'work item drawer on the boards' + wait_for_requests end - context 'when project studio is disabled' do - before do - sign_in(user) - - visit project_board_path(project, board) - - wait_for_requests - end - - it_behaves_like 'work item drawer on the boards' - end + it_behaves_like 'work item drawer on the boards' def first_card find('[data-testid="board-list"]:nth-child(1)').first("[data-testid='board-card']") diff --git a/spec/features/groups/milestone_spec.rb b/spec/features/groups/milestone_spec.rb index 49652a8c61a50f..f88db64430e250 100644 --- a/spec/features/groups/milestone_spec.rb +++ b/spec/features/groups/milestone_spec.rb @@ -51,10 +51,6 @@ click_button 'Create milestone' - if page.has_css?('.milestone-sidebar .js-sidebar-expand', wait: 0) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find('.milestone-sidebar .js-sidebar-expand').click - end - expect(find('.start_date')).to have_content(Date.today.at_beginning_of_month.strftime('%b %-d, %Y')) end diff --git a/spec/features/milestone_spec.rb b/spec/features/milestone_spec.rb index b507e89ee3b7f8..620e966938ed1f 100644 --- a/spec/features/milestone_spec.rb +++ b/spec/features/milestone_spec.rb @@ -81,10 +81,6 @@ wait_for_requests - if page.has_css?('.milestone-sidebar .js-sidebar-expand', wait: 0) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find('.milestone-sidebar .js-sidebar-expand').click - end - within_testid('noTrackingPane') do expect(page).to have_content 'No estimate or time spent' end @@ -103,10 +99,6 @@ wait_for_requests - if page.has_css?('.milestone-sidebar .js-sidebar-expand', wait: 0) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - find('.milestone-sidebar .js-sidebar-expand').click - end - within_testid('spentOnlyPane') do expect(page).to have_content 'Spent: 3h' end diff --git a/spec/features/projects/ci/editor_spec.rb b/spec/features/projects/ci/editor_spec.rb index f920d618f98d02..26e620eec7ec65 100644 --- a/spec/features/projects/ci/editor_spec.rb +++ b/spec/features/projects/ci/editor_spec.rb @@ -216,7 +216,7 @@ describe 'Branch Switcher' do def switch_to_branch(branch) # close button for the popover - find_by_testid('close-button').click if page.has_css?('[data-testid="close-button"]', wait: 0) # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout + find_by_testid('close-button').click within_testid 'branch-selector' do toggle_listbox select_listbox_item(branch, exact_text: true) diff --git a/spec/features/projects/show/user_sees_collaboration_links_spec.rb b/spec/features/projects/show/user_sees_collaboration_links_spec.rb index e4364e296a96c4..38dcb8d4d62ad6 100644 --- a/spec/features/projects/show/user_sees_collaboration_links_spec.rb +++ b/spec/features/projects/show/user_sees_collaboration_links_spec.rb @@ -18,9 +18,7 @@ def find_new_menu_toggle end def within_navigation_panel(&block) - # We search for .super-topbar to account for the Project Studio UI - selector = page.has_css?('.super-topbar') ? '.super-topbar' : '[data-testid="super-sidebar"]' # rubocop:disable RSpec/AvoidConditionalStatements -- temporary Project Studio rollout - within(selector, &block) + within('.super-topbar', &block) end context 'with developer user' do diff --git a/spec/views/layouts/application.html.haml_spec.rb b/spec/views/layouts/application.html.haml_spec.rb index 72fb38b77c14ae..5077e018f9e6aa 100644 --- a/spec/views/layouts/application.html.haml_spec.rb +++ b/spec/views/layouts/application.html.haml_spec.rb @@ -46,11 +46,9 @@ end end - context 'when user has `project studio` feature enabled' do - it 'renders the new global topbar' do - render - expect(rendered).to include('super-topbar') - end + it 'renders the new global topbar' do + render + expect(rendered).to include('super-topbar') end end -- GitLab From af03f45fa899cc8c74e880541a068d57c25ae7d1 Mon Sep 17 00:00:00 2001 From: Kushal Pandya Date: Thu, 18 Dec 2025 09:08:11 -0500 Subject: [PATCH 5/7] Update FF removal milestone --- doc/user/interface_redesign.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/interface_redesign.md b/doc/user/interface_redesign.md index 7a85e979598612..07a28f9ede5070 100644 --- a/doc/user/interface_redesign.md +++ b/doc/user/interface_redesign.md @@ -19,7 +19,7 @@ description: Learn about an upcoming redesign of GitLab user interface. Disabled by default. - [Enabled on GitLab.com, GitLab Self-Managed, and GitLab Dedicated](https://gitlab.com/gitlab-org/gitlab/-/work_items/574049) in GitLab 18.6. - Toggle [removed](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/212303) in GitLab 18.7. -- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/work_items/574049) in GitLab 18.7. Feature flag `paneled_view` removed. +- [Generally available](https://gitlab.com/gitlab-org/gitlab/-/work_items/574049) in GitLab 18.8. Feature flag `paneled_view` removed. {{< /history >}} -- GitLab From 6890fab1326ac64e546ddd61bfac709b7f0b5c9f Mon Sep 17 00:00:00 2001 From: Jay McCure Date: Fri, 19 Dec 2025 09:57:37 +1000 Subject: [PATCH 6/7] Remove redundant wait in admin mode spec --- ee/spec/features/admin/admin_mode_spec.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/ee/spec/features/admin/admin_mode_spec.rb b/ee/spec/features/admin/admin_mode_spec.rb index ab44b6f0c9701c..20e6b3daf4c63c 100644 --- a/ee/spec/features/admin/admin_mode_spec.rb +++ b/ee/spec/features/admin/admin_mode_spec.rb @@ -38,7 +38,6 @@ it 'can access admin dashboard without entering admin mode' do visit root_dashboard_path - expect(page).to have_link('Admin') click_link 'Admin' expect(page).to have_current_path(admin_root_path) @@ -54,7 +53,6 @@ it 'can access admin dashboard without entering admin mode' do visit root_dashboard_path - expect(page).to have_link('Admin') click_link 'Admin' expect(page).to have_current_path(admin_root_path) -- GitLab From f6b22c04f060dd05a46afe0a3e92732c6feed913 Mon Sep 17 00:00:00 2001 From: Jay McCure Date: Fri, 19 Dec 2025 11:45:43 +1000 Subject: [PATCH 7/7] Remove classic UI conditionals from E2E tests --- qa/qa/ee/page/component/duo_chat.rb | 10 ++-------- qa/qa/page/component/issue_board/show.rb | 8 +------- qa/qa/page/milestone/show.rb | 3 +-- qa/qa/page/sub_menus/common.rb | 4 +--- .../sub_menus/super_sidebar/global_search_modal.rb | 14 +++----------- qa/qa/runtime/env.rb | 7 ------- 6 files changed, 8 insertions(+), 38 deletions(-) diff --git a/qa/qa/ee/page/component/duo_chat.rb b/qa/qa/ee/page/component/duo_chat.rb index 3cd8d8f60f0c13..1da8a0aff64daa 100644 --- a/qa/qa/ee/page/component/duo_chat.rb +++ b/qa/qa/ee/page/component/duo_chat.rb @@ -52,14 +52,8 @@ def number_of_messages end def close - if QA::Runtime::Env.project_studio_enabled? - within('.ai-panel-header') do - click_element('dash-icon') - end - else - within_element('chat-header') do - click_element('close-icon') - end + within('.ai-panel-header') do + click_element('dash-icon') end end diff --git a/qa/qa/page/component/issue_board/show.rb b/qa/qa/page/component/issue_board/show.rb index ccc014ab6dc054..3fc2566244e29f 100644 --- a/qa/qa/page/component/issue_board/show.rb +++ b/qa/qa/page/component/issue_board/show.rb @@ -47,13 +47,7 @@ class Show < QA::Page::Base # with the attribute `data-testid` since such element is not unique when the # `is-focused` class is not set, and it was not possible to find a better solution. def focused_board - # Project Studio: .is-focused on parent .content-panels - project_studio_selector = '.is-focused .issue-boards-content.js-focus-mode-board' - - # Legacy UI: .is-focused directly on .issue-boards-content - legacy_ui_selector = '.issue-boards-content.js-focus-mode-board.is-focused' - - find("#{project_studio_selector}, #{legacy_ui_selector}") + find('.is-focused .issue-boards-content.js-focus-mode-board') end def boards_dropdown diff --git a/qa/qa/page/milestone/show.rb b/qa/qa/page/milestone/show.rb index de11dabe761038..f4f60dd354d76e 100644 --- a/qa/qa/page/milestone/show.rb +++ b/qa/qa/page/milestone/show.rb @@ -27,8 +27,7 @@ def has_start_date?(start_date) end def expand_sidebar_if_collapsed - # With the ProjectStudio UI, the sidebar is initially expanded and then automatically collapses, - # so we need to wait for it to collapse + # The sidebar is initially expanded and then automatically collapses, so we need to wait for it to collapse Support::Waiter.wait_until(max_duration: 3, raise_on_failure: false) do has_css?('.issuable-sidebar.collapsed') end diff --git a/qa/qa/page/sub_menus/common.rb b/qa/qa/page/sub_menus/common.rb index a73501668f094c..e0e08e546c0f94 100644 --- a/qa/qa/page/sub_menus/common.rb +++ b/qa/qa/page/sub_menus/common.rb @@ -44,8 +44,7 @@ def within_new_item_menu # @param [String] sub_menu # @return [void] def open_submenu(parent_menu_name, sub_menu) - # If Project Studio is enabled, show the sidebar - expand_sidebar_if_collapsed if Runtime::Env.project_studio_enabled? + expand_sidebar_if_collapsed # prevent closing sub-menu if it was already open unless has_element?('menu-section', section_name: parent_menu_name, wait: 0) @@ -58,7 +57,6 @@ def open_submenu(parent_menu_name, sub_menu) end # Expands the sidebar if it's in icon-only (collapsed) mode - # This is needed when Project Studio is enabled as it defaults to collapsed sidebar # @return [void] def expand_sidebar_if_collapsed click_element('sidebar-icon') if has_css?('.super-sidebar-is-icon-only', wait: 0) diff --git a/qa/qa/page/sub_menus/super_sidebar/global_search_modal.rb b/qa/qa/page/sub_menus/super_sidebar/global_search_modal.rb index 9a67bee2f2c11e..567e5ea9b7119d 100644 --- a/qa/qa/page/sub_menus/super_sidebar/global_search_modal.rb +++ b/qa/qa/page/sub_menus/super_sidebar/global_search_modal.rb @@ -41,12 +41,8 @@ def go_to_explore end def go_to_admin_area - if Runtime::Env.project_studio_enabled? - click_element('topbar-admin-link') - expand_sidebar_if_collapsed - else - go_to_places_item("Admin area") - end + click_element('topbar-admin-link') + expand_sidebar_if_collapsed return unless has_text?('Enter admin mode', wait: 1.0) @@ -79,11 +75,7 @@ def go_to_places_item(places_item) end def open_global_search_modal - if Runtime::Env.project_studio_enabled? - click_element('super-topbar-search-button') - else - click_element('super-sidebar-search-button') - end + click_element('super-topbar-search-button') end end end diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb index acc74d5fe135a4..d11c3309827702 100644 --- a/qa/qa/runtime/env.rb +++ b/qa/qa/runtime/env.rb @@ -709,13 +709,6 @@ def create_unique_test_users? enabled?(ENV["QA_CREATE_UNIQUE_TEST_USERS"], default: true) end - # Run tests against Project Studio UI - # - # @return [Boolean] - def project_studio_enabled? - enabled?(ENV["QA_PROJECT_STUDIO"], default: true) - end - private # Return non empty environment variable value -- GitLab