Commit 5b0e5272 authored by Nathan Friend's avatar Nathan Friend

Run releases rspec on both versions of component

This commit updates the feature specs for the Releases index page to
run twice - once with the `releases_index_apollo_client` feature flag
enabled, and once with it disabled.
parent c2aed6e4
......@@ -76,6 +76,7 @@ export default {
<gl-sorting
:text="sortText"
:is-ascending="isDirectionAscending"
data-testid="releases-sort"
@sortDirectionChange="onDirectionChange"
>
<gl-sorting-item
......
......@@ -15,11 +15,11 @@ RSpec.describe 'User views releases', :js do
let_it_be(:guest) { create(:user) }
before do
stub_feature_flags(releases_index_apollo_client: false)
project.add_maintainer(maintainer)
project.add_guest(guest)
end
shared_examples 'releases index page' do
context('when the user is a maintainer') do
before do
sign_in(maintainer)
......@@ -145,4 +145,21 @@ RSpec.describe 'User views releases', :js do
end
end
end
end
context 'when the releases_index_apollo_client feature flag is enabled' do
before do
stub_feature_flags(releases_index_apollo_client: true)
end
it_behaves_like 'releases index page'
end
context 'when the releases_index_apollo_client feature flag is disabled' do
before do
stub_feature_flags(releases_index_apollo_client: false)
end
it_behaves_like 'releases index page'
end
end
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