diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/features/ide_spec.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/features/ide_spec.rb')
-rw-r--r-- | spec/features/ide_spec.rb | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/spec/features/ide_spec.rb b/spec/features/ide_spec.rb index 2505ab0afee..c7c740c2293 100644 --- a/spec/features/ide_spec.rb +++ b/spec/features/ide_spec.rb @@ -4,12 +4,14 @@ require 'spec_helper' RSpec.describe 'IDE', :js do describe 'sub-groups' do + let(:ide_iframe_selector) { '#ide iframe' } let(:user) { create(:user) } let(:group) { create(:group) } let(:subgroup) { create(:group, parent: group) } let(:subgroup_project) { create(:project, :repository, namespace: subgroup) } before do + stub_feature_flags(vscode_web_ide: vscode_ff) subgroup_project.add_maintainer(user) sign_in(user) @@ -20,8 +22,28 @@ RSpec.describe 'IDE', :js do wait_for_requests end - it 'loads project in web IDE' do - expect(page).to have_selector('.context-header', text: subgroup_project.name) + context 'with vscode feature flag on' do + let(:vscode_ff) { true } + + it 'loads project in Web IDE' do + iframe = find(ide_iframe_selector) + + page.within_frame(iframe) do + expect(page).to have_selector('.title', text: subgroup_project.name.upcase) + end + end + end + + context 'with vscode feature flag off' do + let(:vscode_ff) { false } + + it 'loads project in legacy Web IDE' do + expect(page).to have_selector('.context-header', text: subgroup_project.name) + end + + it 'does not load new Web IDE' do + expect(page).not_to have_selector(ide_iframe_selector) + end end end end |