Commit 0382457b authored by Stan Hu's avatar Stan Hu

Merge branch...

Merge branch '223096-flaky-test-spec-features-projects-issues-design_management-user_uploads_designs_spec-rb-51' into 'master'

Improve the en/dis-ablement of the design mgt feature in a flaky test

Closes #223096

See merge request gitlab-org/gitlab!36325
parents 5cd539b8 36f63389
......@@ -14,11 +14,9 @@ RSpec.describe 'User uploads new design', :js do
end
context 'design_management_moved flag disabled' do
context "when the feature is available" do
before do
enable_design_management
enable_design_management(feature_enabled)
stub_feature_flags(design_management_moved: false)
visit project_issue_path(project, issue)
click_link 'Designs'
......@@ -26,6 +24,9 @@ RSpec.describe 'User uploads new design', :js do
wait_for_requests
end
context "when the feature is available" do
let(:feature_enabled) { true }
it 'uploads designs' do
attach_file(:design_file, logo_fixture, make_visible: true)
......@@ -42,14 +43,7 @@ RSpec.describe 'User uploads new design', :js do
end
context 'when the feature is not available' do
before do
stub_feature_flags(design_management_moved: false)
visit project_issue_path(project, issue)
click_link 'Designs'
wait_for_requests
end
let(:feature_enabled) { false }
it 'shows the message about requirements' do
expect(page).to have_content("To enable design management, you'll need to meet the requirements.")
......@@ -58,13 +52,15 @@ RSpec.describe 'User uploads new design', :js do
end
context 'design_management_moved flag enabled' do
context "when the feature is available" do
before do
enable_design_management
enable_design_management(feature_enabled)
stub_feature_flags(design_management_moved: true)
visit project_issue_path(project, issue)
end
context "when the feature is available" do
let(:feature_enabled) { true }
it 'uploads designs', quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/225616' do
attach_file(:design_file, logo_fixture, make_visible: true)
......@@ -81,9 +77,7 @@ RSpec.describe 'User uploads new design', :js do
end
context 'when the feature is not available' do
before do
visit project_issue_path(project, issue)
end
let(:feature_enabled) { false }
it 'shows the message about requirements' do
expect(page).to have_content("To enable design management, you'll need to meet the requirements.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment