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
1a3a21d6
Commit
1a3a21d6
authored
Jan 14, 2020
by
Natalia Tepluhina
Committed by
Phil Hughes
Jan 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace v-show on Designs toolbar with d-none class
parent
f2731aac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
11 deletions
+13
-11
ee/app/assets/javascripts/design_management/pages/index.vue
ee/app/assets/javascripts/design_management/pages/index.vue
+2
-2
ee/spec/frontend/design_management/pages/__snapshots__/index_spec.js.snap
.../design_management/pages/__snapshots__/index_spec.js.snap
+1
-1
ee/spec/frontend/design_management/pages/index_spec.js
ee/spec/frontend/design_management/pages/index_spec.js
+10
-8
No files found.
ee/app/assets/javascripts/design_management/pages/index.vue
View file @
1a3a21d6
...
@@ -195,7 +195,7 @@ export default {
...
@@ -195,7 +195,7 @@ export default {
<header
v-if=
"showToolbar"
class=
"row-content-block border-top-0 p-2 d-flex"
>
<header
v-if=
"showToolbar"
class=
"row-content-block border-top-0 p-2 d-flex"
>
<div
class=
"d-flex justify-content-between align-items-center w-100"
>
<div
class=
"d-flex justify-content-between align-items-center w-100"
>
<design-version-dropdown
/>
<design-version-dropdown
/>
<div
v-show=
"hasDesigns"
class=
"d-flex qa-selector-toolbar
"
>
<div
:class=
"['qa-selector-toolbar',
{ 'd-flex': hasDesigns, 'd-none': !hasDesigns }]
">
<gl-button
<gl-button
v-if=
"isLatestVersion"
v-if=
"isLatestVersion"
variant=
"link"
variant=
"link"
...
@@ -204,7 +204,7 @@ export default {
...
@@ -204,7 +204,7 @@ export default {
>
{{
selectAllButtonText
}}
</gl-button
>
{{
selectAllButtonText
}}
</gl-button
>
>
<design-destroyer
<design-destroyer
v-slot=
"
{ mutate, loading
, error
}"
v-slot=
"
{ mutate, loading }"
:filenames="selectedDesigns"
:filenames="selectedDesigns"
:project-path="projectPath"
:project-path="projectPath"
:iid="issueIid"
:iid="issueIid"
...
...
ee/spec/frontend/design_management/pages/__snapshots__/index_spec.js.snap
View file @
1a3a21d6
...
@@ -69,7 +69,7 @@ exports[`Design management index page designs renders designs list and header wi
...
@@ -69,7 +69,7 @@ exports[`Design management index page designs renders designs list and header wi
<design-version-dropdown-stub />
<design-version-dropdown-stub />
<div
<div
class="
d-flex qa-selector-toolbar
"
class="
qa-selector-toolbar d-flex
"
>
>
<gl-button-stub
<gl-button-stub
class="mr-2 js-select-all"
class="mr-2 js-select-all"
...
...
ee/spec/frontend/design_management/pages/index_spec.js
View file @
1a3a21d6
...
@@ -303,7 +303,7 @@ describe('Design management index page', () => {
...
@@ -303,7 +303,7 @@ describe('Design management index page', () => {
});
});
});
});
describe
(
'
on latest version
'
,
()
=>
{
describe
(
'
on latest version
when has designs
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createComponent
({
designs
:
mockDesigns
,
allVersions
:
[
mockVersion
]
});
createComponent
({
designs
:
mockDesigns
,
allVersions
:
[
mockVersion
]
});
});
});
...
@@ -312,13 +312,10 @@ describe('Design management index page', () => {
...
@@ -312,13 +312,10 @@ describe('Design management index page', () => {
expect
(
findDesignCheckboxes
().
length
).
toBe
(
mockDesigns
.
length
);
expect
(
findDesignCheckboxes
().
length
).
toBe
(
mockDesigns
.
length
);
});
});
it
(
'
renders Delete selected button
'
,
()
=>
{
it
(
'
renders toolbar buttons
'
,
()
=>
{
expect
(
findDeleteButton
().
exists
()).
toBe
(
true
);
expect
(
findToolbar
().
exists
()).
toBe
(
true
);
});
expect
(
findToolbar
().
classes
()).
toContain
(
'
d-flex
'
);
expect
(
findToolbar
().
classes
()).
not
.
toContain
(
'
d-none
'
);
it
(
'
renders a button with Select all text
'
,
()
=>
{
expect
(
findSelectAllButton
().
exists
()).
toBe
(
true
);
expect
(
findSelectAllButton
().
text
()).
toBe
(
'
Select all
'
);
});
});
it
(
'
adds two designs to selected designs when their checkboxes are checked
'
,
()
=>
{
it
(
'
adds two designs to selected designs when their checkboxes are checked
'
,
()
=>
{
...
@@ -375,6 +372,11 @@ describe('Design management index page', () => {
...
@@ -375,6 +372,11 @@ describe('Design management index page', () => {
});
});
});
});
it
(
'
on latest version when has no designs does not render toolbar buttons
'
,
()
=>
{
createComponent
({
designs
:
[],
allVersions
:
[
mockVersion
]
});
expect
(
findToolbar
().
exists
()).
toBe
(
false
);
});
describe
(
'
on non-latest version
'
,
()
=>
{
describe
(
'
on non-latest version
'
,
()
=>
{
beforeEach
(()
=>
{
beforeEach
(()
=>
{
createComponent
({
designs
:
mockDesigns
,
allVersions
:
[
mockVersion
]
});
createComponent
({
designs
:
mockDesigns
,
allVersions
:
[
mockVersion
]
});
...
...
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