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
ec969158
Commit
ec969158
authored
Jun 05, 2020
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update CSS selector for sticky section
parent
ad2656fc
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
22 deletions
+27
-22
ee/app/assets/javascripts/security_dashboard/components/security_dashboard_layout.vue
...curity_dashboard/components/security_dashboard_layout.vue
+5
-1
ee/spec/frontend/security_dashboard/components/security_dashboard_layout_spec.js
...ty_dashboard/components/security_dashboard_layout_spec.js
+22
-21
No files found.
ee/app/assets/javascripts/security_dashboard/components/security_dashboard_layout.vue
View file @
ec969158
...
@@ -20,7 +20,11 @@ export default {
...
@@ -20,7 +20,11 @@ export default {
<slot
name=
"header"
></slot>
<slot
name=
"header"
></slot>
</header>
</header>
<section
v-if=
"hasStickySlot"
class=
"position-sticky gl-z-index-2 security_dashboard_filters"
>
<section
v-if=
"hasStickySlot"
data-testid=
"sticky-section"
class=
"position-sticky gl-z-index-2 security_dashboard_filters"
>
<slot
name=
"sticky"
></slot>
<slot
name=
"sticky"
></slot>
</section>
</section>
...
...
ee/spec/frontend/security_dashboard/components/security_dashboard_layout_spec.js
View file @
ec969158
...
@@ -4,6 +4,7 @@ import SecurityDashboardLayout from 'ee/security_dashboard/components/security_d
...
@@ -4,6 +4,7 @@ import SecurityDashboardLayout from 'ee/security_dashboard/components/security_d
describe
(
'
Security Dashboard Layout component
'
,
()
=>
{
describe
(
'
Security Dashboard Layout component
'
,
()
=>
{
let
wrapper
;
let
wrapper
;
const
SMALLER_SECTION_CLASS
=
'
col-xl-7
'
;
const
SMALLER_SECTION_CLASS
=
'
col-xl-7
'
;
const
STICKY_SECTION_SELECTOR
=
'
[data-testid="sticky-section"]
'
;
const
DummyComponent
=
{
const
DummyComponent
=
{
name
:
'
dummy-component
'
,
name
:
'
dummy-component
'
,
...
@@ -17,7 +18,7 @@ describe('Security Dashboard Layout component', () => {
...
@@ -17,7 +18,7 @@ describe('Security Dashboard Layout component', () => {
const
findArticle
=
()
=>
wrapper
.
find
(
'
article
'
);
const
findArticle
=
()
=>
wrapper
.
find
(
'
article
'
);
const
findHeader
=
()
=>
wrapper
.
find
(
'
header
'
);
const
findHeader
=
()
=>
wrapper
.
find
(
'
header
'
);
const
findAside
=
()
=>
wrapper
.
find
(
'
aside
'
);
const
findAside
=
()
=>
wrapper
.
find
(
'
aside
'
);
const
findStickySection
=
()
=>
wrapper
.
find
(
'
section
'
);
const
findStickySection
=
()
=>
wrapper
.
find
(
STICKY_SECTION_SELECTOR
);
afterEach
(()
=>
{
afterEach
(()
=>
{
wrapper
.
destroy
();
wrapper
.
destroy
();
...
@@ -35,7 +36,7 @@ describe('Security Dashboard Layout component', () => {
...
@@ -35,7 +36,7 @@ describe('Security Dashboard Layout component', () => {
${
'
article
'
}
|
${
true
}
${
'
article
'
}
|
${
true
}
${
'
header
'
}
|
${
false
}
${
'
header
'
}
|
${
false
}
${
'
aside
'
}
|
${
false
}
${
'
aside
'
}
|
${
false
}
${
'
section section
'
}
|
${
false
}
${
STICKY_SECTION_SELECTOR
}
|
${
false
}
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
});
});
...
@@ -66,7 +67,7 @@ describe('Security Dashboard Layout component', () => {
...
@@ -66,7 +67,7 @@ describe('Security Dashboard Layout component', () => {
${
'
article
'
}
|
${
true
}
${
'
article
'
}
|
${
true
}
${
'
header
'
}
|
${
true
}
${
'
header
'
}
|
${
true
}
${
'
aside
'
}
|
${
false
}
${
'
aside
'
}
|
${
false
}
${
'
section section
'
}
|
${
false
}
${
STICKY_SECTION_SELECTOR
}
|
${
false
}
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
});
});
...
@@ -96,7 +97,7 @@ describe('Security Dashboard Layout component', () => {
...
@@ -96,7 +97,7 @@ describe('Security Dashboard Layout component', () => {
${
'
article
'
}
|
${
true
}
${
'
article
'
}
|
${
true
}
${
'
header
'
}
|
${
false
}
${
'
header
'
}
|
${
false
}
${
'
aside
'
}
|
${
false
}
${
'
aside
'
}
|
${
false
}
${
'
section section
'
}
|
${
true
}
${
STICKY_SECTION_SELECTOR
}
|
${
true
}
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
});
});
...
@@ -127,7 +128,7 @@ describe('Security Dashboard Layout component', () => {
...
@@ -127,7 +128,7 @@ describe('Security Dashboard Layout component', () => {
${
'
article
'
}
|
${
true
}
${
'
article
'
}
|
${
true
}
${
'
header
'
}
|
${
false
}
${
'
header
'
}
|
${
false
}
${
'
aside
'
}
|
${
true
}
${
'
aside
'
}
|
${
true
}
${
'
section section
'
}
|
${
false
}
${
STICKY_SECTION_SELECTOR
}
|
${
false
}
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
`
(
'
should find that $element exists is $exists
'
,
({
element
,
exists
})
=>
{
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
expect
(
wrapper
.
find
(
element
).
exists
()).
toBe
(
exists
);
});
});
...
...
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