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
d45702d2
Commit
d45702d2
authored
Dec 17, 2020
by
Angelo Gulina
Committed by
Nicolò Maria Mezzopera
Dec 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update check for free plan with both code and null
parent
19d08365
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
1 deletion
+13
-1
ee/app/assets/javascripts/billings/subscriptions/store/getters.js
...ssets/javascripts/billings/subscriptions/store/getters.js
+1
-1
ee/changelogs/unreleased/294249-plan-free-state-code-changed-from-null-to-string-causing-unwant.yml
...state-code-changed-from-null-to-string-causing-unwant.yml
+5
-0
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
...lings/subscriptions/components/subscription_table_spec.js
+7
-0
No files found.
ee/app/assets/javascripts/billings/subscriptions/store/getters.js
View file @
d45702d2
export
const
isFreePlan
=
state
=>
state
.
plan
.
code
===
null
;
export
const
isFreePlan
=
state
=>
[
'
free
'
,
null
].
includes
(
state
.
plan
.
code
)
;
ee/changelogs/unreleased/294249-plan-free-state-code-changed-from-null-to-string-causing-unwant.yml
0 → 100644
View file @
d45702d2
---
title
:
50275 Update check for free plan with both code and
null
merge_request
:
50275
author
:
type
:
fixed
ee/spec/frontend/billings/subscriptions/components/subscription_table_spec.js
View file @
d45702d2
...
@@ -116,6 +116,7 @@ describe('SubscriptionTable component', () => {
...
@@ -116,6 +116,7 @@ describe('SubscriptionTable component', () => {
planCode | expected | testDescription
planCode | expected | testDescription
${
'
bronze
'
}
|
${
true
}
|
${
'
renders the button
'
}
${
'
bronze
'
}
|
${
true
}
|
${
'
renders the button
'
}
${
null
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
free
'
}
|
${
false
}
|
${
'
does not render the button
'
}
`
(
`
(
'
given a plan with state: planCode = $planCode and saasAddSeatsButton = $featureFlag
'
,
'
given a plan with state: planCode = $planCode and saasAddSeatsButton = $featureFlag
'
,
({
planCode
,
upgradable
,
expected
,
testDescription
})
=>
{
({
planCode
,
upgradable
,
expected
,
testDescription
})
=>
{
...
@@ -145,6 +146,8 @@ describe('SubscriptionTable component', () => {
...
@@ -145,6 +146,8 @@ describe('SubscriptionTable component', () => {
${
'
silver
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
silver
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
true
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
true
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
false
}
|
${
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
'
}
`
(
`
(
'
given a plan with state: planCode = $planCode and saasManualRenewButton = $featureFlag
'
,
'
given a plan with state: planCode = $planCode and saasManualRenewButton = $featureFlag
'
,
({
planCode
,
featureFlag
,
expected
,
testDescription
})
=>
{
({
planCode
,
featureFlag
,
expected
,
testDescription
})
=>
{
...
@@ -174,6 +177,8 @@ describe('SubscriptionTable component', () => {
...
@@ -174,6 +177,8 @@ describe('SubscriptionTable component', () => {
${
'
silver
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
silver
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
true
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
true
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
false
}
|
${
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
'
}
`
(
`
(
'
given a plan with state: planCode = $planCode and saasAddSeatsButton = $featureFlag
'
,
'
given a plan with state: planCode = $planCode and saasAddSeatsButton = $featureFlag
'
,
({
planCode
,
featureFlag
,
expected
,
testDescription
})
=>
{
({
planCode
,
featureFlag
,
expected
,
testDescription
})
=>
{
...
@@ -204,6 +209,8 @@ describe('SubscriptionTable component', () => {
...
@@ -204,6 +209,8 @@ describe('SubscriptionTable component', () => {
${
'
bronze
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
'
bronze
'
}
|
${
false
}
|
${
false
}
|
${
'
does not render the button
'
}
${
null
}
|
${
true
}
|
${
true
}
|
${
'
renders the button
'
}
${
null
}
|
${
true
}
|
${
true
}
|
${
'
renders the button
'
}
${
null
}
|
${
false
}
|
${
true
}
|
${
'
renders the button
'
}
${
null
}
|
${
false
}
|
${
true
}
|
${
'
renders the button
'
}
${
'
free
'
}
|
${
true
}
|
${
true
}
|
${
'
renders the button
'
}
${
'
free
'
}
|
${
false
}
|
${
true
}
|
${
'
renders the button
'
}
`
(
`
(
'
given a plan with state: planCode = $planCode, upgradable = $upgradable
'
,
'
given a plan with state: planCode = $planCode, upgradable = $upgradable
'
,
({
planCode
,
upgradable
,
expected
,
testDescription
})
=>
{
({
planCode
,
upgradable
,
expected
,
testDescription
})
=>
{
...
...
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