Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
907dc8ba
Commit
907dc8ba
authored
Jan 28, 2021
by
Ammar Alakkad
Committed by
Heinrich Lee Yu
Jan 28, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up saas_manual_renew_button feature flag
Updating tests and related files
parent
322d1214
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
33 deletions
+18
-33
ee/app/assets/javascripts/billings/subscriptions/components/subscription_table.vue
.../billings/subscriptions/components/subscription_table.vue
+1
-1
ee/app/controllers/groups/billings_controller.rb
ee/app/controllers/groups/billings_controller.rb
+0
-1
ee/changelogs/unreleased/288804-clean-up-feature-flag.yml
ee/changelogs/unreleased/288804-clean-up-feature-flag.yml
+5
-0
ee/config/feature_flags/development/saas_manual_renew_button.yml
...ig/feature_flags/development/saas_manual_renew_button.yml
+0
-8
ee/spec/features/groups/billing_spec.rb
ee/spec/features/groups/billing_spec.rb
+5
-12
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
...lings/subscriptions/components/subscription_table_spec.js
+7
-11
No files found.
ee/app/assets/javascripts/billings/subscriptions/components/subscription_table.vue
View file @
907dc8ba
...
...
@@ -53,7 +53,7 @@ export default {
return
this
.
glFeatures
.
saasAddSeatsButton
&&
!
this
.
isFreePlan
;
},
canRenew
()
{
return
this
.
glFeatures
.
saasManualRenewButton
&&
!
this
.
isFreePlan
;
return
!
this
.
isFreePlan
;
},
canUpgrade
()
{
return
this
.
isFreePlan
||
this
.
plan
.
upgradable
;
...
...
ee/app/controllers/groups/billings_controller.rb
View file @
907dc8ba
...
...
@@ -5,7 +5,6 @@ class Groups::BillingsController < Groups::ApplicationController
before_action
:verify_namespace_plan_check_enabled
before_action
only:
[
:index
]
do
push_frontend_feature_flag
(
:saas_manual_renew_button
)
push_frontend_feature_flag
(
:saas_add_seats_button
)
end
...
...
ee/changelogs/unreleased/288804-clean-up-feature-flag.yml
0 → 100644
View file @
907dc8ba
---
title
:
Add manual renew button to billings page
merge_request
:
52652
author
:
type
:
other
ee/config/feature_flags/development/saas_manual_renew_button.yml
deleted
100644 → 0
View file @
322d1214
---
name
:
saas_manual_renew_button
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/48610
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/288804
milestone
:
'
13.7'
type
:
development
group
:
group::fulfillment
default_enabled
:
false
ee/spec/features/groups/billing_spec.rb
View file @
907dc8ba
...
...
@@ -78,7 +78,6 @@ RSpec.describe 'Groups > Billing', :js do
context
'with disabled feature flags'
do
before
do
stub_feature_flags
(
saas_manual_renew_button:
false
)
stub_feature_flags
(
saas_add_seats_button:
false
)
visit
group_billings_path
(
group
)
end
...
...
@@ -86,7 +85,6 @@ RSpec.describe 'Groups > Billing', :js do
it
'does not show "Add Seats" button'
do
within
subscription_table
do
expect
(
page
).
not_to
have_link
(
"Add seats"
)
expect
(
page
).
not_to
have_link
(
"Renew"
)
end
end
end
...
...
@@ -111,13 +109,10 @@ RSpec.describe 'Groups > Billing', :js do
end
context
'with feature flags'
do
using
RSpec
::
Parameterized
::
TableSyntax
where
(
:saas_manual_renew_button
,
:saas_add_seats_button
)
do
true
|
true
true
|
false
false
|
true
false
|
false
where
(
:saas_add_seats_button
)
do
[
true
,
false
]
end
let
(
:plan
)
{
'bronze'
}
...
...
@@ -128,7 +123,6 @@ RSpec.describe 'Groups > Billing', :js do
with_them
do
before
do
stub_feature_flags
(
saas_manual_renew_button:
saas_manual_renew_button
)
stub_feature_flags
(
saas_add_seats_button:
saas_add_seats_button
)
end
...
...
@@ -136,8 +130,7 @@ RSpec.describe 'Groups > Billing', :js do
visit
group_billings_path
(
group
)
expect
(
page
).
to
have_pushed_frontend_feature_flags
(
saasAddSeatsButton:
saas_add_seats_button
,
saasManualRenewButton:
saas_manual_renew_button
saasAddSeatsButton:
saas_add_seats_button
)
end
end
...
...
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
View file @
907dc8ba
...
...
@@ -19,7 +19,7 @@ describe('SubscriptionTable component', () => {
let
store
;
let
wrapper
;
const
defaultFlags
=
{
saas
ManualRenewButton
:
false
,
saas
AddSeatsButton
:
false
};
const
defaultFlags
=
{
saasAddSeatsButton
:
false
};
const
findAddSeatsButton
=
()
=>
wrapper
.
findByTestId
(
'
add-seats-button
'
);
const
findManageButton
=
()
=>
wrapper
.
findByTestId
(
'
manage-button
'
);
...
...
@@ -143,19 +143,15 @@ describe('SubscriptionTable component', () => {
describe
(
'
Renew button
'
,
()
=>
{
describe
.
each
`
planCode | featureFlag | expected | testDescription
${
'
silver
'
}
|
${
true
}
|
${
true
}
|
${
'
renders the button
'
}
${
'
silver
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
true
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
free
'
}
|
${
true
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
free
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
planCode | expected | testDescription
${
'
silver
'
}
|
${
true
}
|
${
'
renders the button
'
}
${
null
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
free
'
}
|
${
false
}
|
${
'
does not render the button
'
}
`
(
'
given a plan with state: planCode = $planCode
and saasManualRenewButton = $featureFlag
'
,
({
planCode
,
featureFlag
,
expected
,
testDescription
})
=>
{
'
given a plan with state: planCode = $planCode
'
,
({
planCode
,
expected
,
testDescription
})
=>
{
beforeEach
(()
=>
{
createComponentWithStore
({
featureFlags
:
{
saasManualRenewButton
:
featureFlag
},
state
:
{
isLoadingSubscription
:
false
,
plan
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment