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
a029a4b7
Commit
a029a4b7
authored
Jan 04, 2021
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor specs with reviewer feedback
Update feature flag description
parent
0a7b35b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
22 deletions
+21
-22
app/controllers/jira_connect/subscriptions_controller.rb
app/controllers/jira_connect/subscriptions_controller.rb
+1
-1
config/feature_flags/development/new_jira_connect_ui.yml
config/feature_flags/development/new_jira_connect_ui.yml
+2
-2
spec/frontend/jira_connect/components/app_spec.js
spec/frontend/jira_connect/components/app_spec.js
+18
-19
No files found.
app/controllers/jira_connect/subscriptions_controller.rb
View file @
a029a4b7
...
...
@@ -20,7 +20,7 @@ class JiraConnect::SubscriptionsController < JiraConnect::ApplicationController
before_action
:verify_qsh_claim!
,
only: :index
before_action
:authenticate_user!
,
only: :create
before_action
do
push_frontend_feature_flag
(
:new_jira_connect_ui
,
type: :development
)
push_frontend_feature_flag
(
:new_jira_connect_ui
,
type: :development
,
default_enabled: :yaml
)
end
def
index
...
...
config/feature_flags/development/new_jira_connect_ui.yml
View file @
a029a4b7
---
name
:
new_jira_connect_ui
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/
4920
2
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/
5069
2
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/295647
milestone
:
'
13.
7
'
milestone
:
'
13.
8
'
type
:
development
group
:
group::ecosystem
default_enabled
:
false
spec/frontend/jira_connect/components/app_spec.js
View file @
a029a4b7
...
...
@@ -5,23 +5,35 @@ import JiraConnectApp from '~/jira_connect/components/app.vue';
describe
(
'
JiraConnectApp
'
,
()
=>
{
let
wrapper
;
const
createComponent
=
(
{
...
options
})
=>
{
const
createComponent
=
(
options
=
{
})
=>
{
wrapper
=
shallowMount
(
JiraConnectApp
,
{
provide
:
{
glFeatures
:
{
newJiraConnectUi
:
true
},
},
...
options
,
});
};
afterEach
(()
=>
{
if
(
wrapper
)
{
wrapper
.
destroy
();
wrapper
=
null
;
}
wrapper
.
destroy
();
wrapper
=
null
;
});
const
findHeader
=
()
=>
wrapper
.
find
(
'
h3
'
);
const
findHeaderText
=
()
=>
wrapper
.
find
(
'
h3
'
).
text
();
const
findHeaderText
=
()
=>
findHeader
(
).
text
();
describe
(
'
template
'
,
()
=>
{
it
(
'
renders new UI
'
,
()
=>
{
createComponent
({
provide
:
{
glFeatures
:
{
newJiraConnectUi
:
true
},
},
});
expect
(
findHeader
().
exists
()).
toBe
(
true
);
expect
(
findHeaderText
()).
toBe
(
'
Linked namespaces
'
);
});
describe
(
'
newJiraConnectUi is false
'
,
()
=>
{
it
(
'
does not render new UI
'
,
()
=>
{
createComponent
({
...
...
@@ -33,18 +45,5 @@ describe('JiraConnectApp', () => {
expect
(
findHeader
().
exists
()).
toBe
(
false
);
});
});
describe
(
'
newJiraConnectUi is true
'
,
()
=>
{
it
(
'
renders new UI
'
,
()
=>
{
createComponent
({
provide
:
{
glFeatures
:
{
newJiraConnectUi
:
true
},
},
});
expect
(
findHeader
().
exists
()).
toBe
(
true
);
expect
(
findHeaderText
()).
toBe
(
'
Linked namespaces
'
);
});
});
});
});
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