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
e62bc455
Commit
e62bc455
authored
Oct 12, 2021
by
Frédéric Caplette
Committed by
Sarah Groff Hennigh-Palermo
Oct 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature flag for CTA in empty state
parent
c64f7311
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
75 deletions
+4
-75
app/assets/javascripts/pipeline_editor/components/ui/pipeline_editor_empty_state.vue
...line_editor/components/ui/pipeline_editor_empty_state.vue
+1
-13
app/controllers/projects/ci/pipeline_editor_controller.rb
app/controllers/projects/ci/pipeline_editor_controller.rb
+0
-1
config/feature_flags/development/pipeline_editor_empty_state_action.yml
..._flags/development/pipeline_editor_empty_state_action.yml
+0
-8
spec/frontend/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js
..._editor/components/ui/pipeline_editor_empty_state_spec.js
+0
-21
spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
+3
-32
No files found.
app/assets/javascripts/pipeline_editor/components/ui/pipeline_editor_empty_state.vue
View file @
e62bc455
...
...
@@ -2,7 +2,6 @@
import
{
GlButton
,
GlSprintf
}
from
'
@gitlab/ui
'
;
import
{
__
}
from
'
~/locale
'
;
import
PipelineEditorFileNav
from
'
~/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
components
:
{
...
...
@@ -17,17 +16,11 @@ export default {
),
btnText
:
__
(
'
Create new CI/CD pipeline
'
),
},
mixins
:
[
glFeatureFlagsMixin
()],
inject
:
{
emptyStateIllustrationPath
:
{
default
:
''
,
},
},
computed
:
{
showCTAButton
()
{
return
this
.
glFeatures
.
pipelineEditorEmptyStateAction
;
},
},
methods
:
{
createEmptyConfigFile
()
{
this
.
$emit
(
'
createEmptyConfigFile
'
);
...
...
@@ -48,12 +41,7 @@ export default {
</
template
>
</gl-sprintf>
</p>
<gl-button
v-if=
"showCTAButton"
variant=
"confirm"
class=
"gl-mt-3"
@
click=
"createEmptyConfigFile"
>
<gl-button
variant=
"confirm"
class=
"gl-mt-3"
@
click=
"createEmptyConfigFile"
>
{{ $options.i18n.btnText }}
</gl-button>
</div>
...
...
app/controllers/projects/ci/pipeline_editor_controller.rb
View file @
e62bc455
...
...
@@ -3,7 +3,6 @@
class
Projects::Ci::PipelineEditorController
<
Projects
::
ApplicationController
before_action
:check_can_collaborate!
before_action
do
push_frontend_feature_flag
(
:pipeline_editor_empty_state_action
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:pipeline_editor_drawer
,
@project
,
default_enabled: :yaml
)
push_frontend_feature_flag
(
:schema_linting
,
@project
,
default_enabled: :yaml
)
end
...
...
config/feature_flags/development/pipeline_editor_empty_state_action.yml
deleted
100644 → 0
View file @
c64f7311
---
name
:
pipeline_editor_empty_state_action
introduced_by_url
:
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55414
rollout_issue_url
:
https://gitlab.com/gitlab-org/gitlab/-/issues/323229
milestone
:
'
13.10'
type
:
development
group
:
group::pipeline authoring
default_enabled
:
true
spec/frontend/pipeline_editor/components/ui/pipeline_editor_empty_state_spec.js
View file @
e62bc455
...
...
@@ -6,9 +6,6 @@ import PipelineEditorEmptyState from '~/pipeline_editor/components/ui/pipeline_e
describe
(
'
Pipeline editor empty state
'
,
()
=>
{
let
wrapper
;
const
defaultProvide
=
{
glFeatures
:
{
pipelineEditorEmptyStateAction
:
false
,
},
emptyStateIllustrationPath
:
'
my/svg/path
'
,
};
...
...
@@ -51,24 +48,6 @@ describe('Pipeline editor empty state', () => {
expect
(
findFileNav
().
exists
()).
toBe
(
true
);
});
describe
(
'
with feature flag off
'
,
()
=>
{
it
(
'
does not renders a CTA button
'
,
()
=>
{
expect
(
findConfirmButton
().
exists
()).
toBe
(
false
);
});
});
});
describe
(
'
with feature flag on
'
,
()
=>
{
beforeEach
(()
=>
{
createComponent
({
provide
:
{
glFeatures
:
{
pipelineEditorEmptyStateAction
:
true
,
},
},
});
});
it
(
'
renders a CTA button
'
,
()
=>
{
expect
(
findConfirmButton
().
exists
()).
toBe
(
true
);
expect
(
findConfirmButton
().
text
()).
toBe
(
wrapper
.
vm
.
$options
.
i18n
.
btnText
);
...
...
spec/frontend/pipeline_editor/pipeline_editor_app_spec.js
View file @
e62bc455
...
...
@@ -22,7 +22,6 @@ import {
mockCiConfigPath
,
mockCiConfigQueryResponse
,
mockBlobContentQueryResponse
,
mockBlobContentQueryResponseEmptyCiFile
,
mockBlobContentQueryResponseNoCiFile
,
mockCiYml
,
mockCommitSha
,
...
...
@@ -43,9 +42,6 @@ const MockSourceEditor = {
const
mockProvide
=
{
ciConfigPath
:
mockCiConfigPath
,
defaultBranch
:
mockDefaultBranch
,
glFeatures
:
{
pipelineEditorEmptyStateAction
:
false
,
},
projectFullPath
:
mockProjectFullPath
,
};
...
...
@@ -221,37 +217,12 @@ describe('Pipeline editor app component', () => {
});
});
describe
(
'
with an empty CI config file
'
,
()
=>
{
describe
(
'
with empty state feature flag on
'
,
()
=>
{
it
(
'
does not show the empty screen state
'
,
async
()
=>
{
mockBlobContentData
.
mockResolvedValue
(
mockBlobContentQueryResponseEmptyCiFile
);
await
createComponentWithApollo
({
provide
:
{
glFeatures
:
{
pipelineEditorEmptyStateAction
:
true
,
},
},
});
expect
(
findEmptyState
().
exists
()).
toBe
(
false
);
expect
(
findTextEditor
().
exists
()).
toBe
(
true
);
});
});
});
describe
(
'
when landing on the empty state with feature flag on
'
,
()
=>
{
it
(
'
user can click on CTA button and see an empty editor
'
,
async
()
=>
{
describe
(
'
with no CI config setup
'
,
()
=>
{
it
(
'
user can click on CTA button to get started
'
,
async
()
=>
{
mockBlobContentData
.
mockResolvedValue
(
mockBlobContentQueryResponseNoCiFile
);
mockLatestCommitShaQuery
.
mockResolvedValue
(
mockEmptyCommitShaResults
);
await
createComponentWithApollo
({
provide
:
{
glFeatures
:
{
pipelineEditorEmptyStateAction
:
true
,
},
},
});
await
createComponentWithApollo
();
expect
(
findEmptyState
().
exists
()).
toBe
(
true
);
expect
(
findTextEditor
().
exists
()).
toBe
(
false
);
...
...
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