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
7d6903a4
Commit
7d6903a4
authored
Jan 10, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove scroll fade tests from boards_selector_spec.js
parent
ef1a5483
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
42 deletions
+8
-42
ee/spec/javascripts/boards/components/boards_selector_spec.js
...pec/javascripts/boards/components/boards_selector_spec.js
+8
-42
No files found.
ee/spec/javascripts/boards/components/boards_selector_spec.js
View file @
7d6903a4
import
Vue
from
'
vue
'
;
import
BoardService
from
'
ee/boards/services/board_service
'
;
import
BoardsSelector
from
'
ee/boards/components/boards_selector.vue
'
;
import
setTimeoutPromiseHelper
from
'
spec/helpers/set_timeout_promise_helper
'
;
import
mountComponent
from
'
spec/helpers/vue_mount_component_helper
'
;
import
{
TEST_HOST
}
from
'
spec/test_constants
'
;
const
throttleDuration
=
1
;
function
waitForScroll
()
{
return
Vue
.
nextTick
()
.
then
(()
=>
setTimeoutPromiseHelper
(
throttleDuration
))
.
then
(()
=>
Vue
.
nextTick
());
}
describe
(
'
BoardsSelector
'
,
()
=>
{
let
vm
;
let
scrollContainer
;
let
scrollFade
;
let
boardServiceResponse
;
const
boards
=
new
Array
(
20
).
fill
().
map
((
board
,
id
)
=>
{
const
name
=
`board
${
id
}
`
;
...
...
@@ -75,13 +66,6 @@ describe('BoardsSelector', () => {
boardServiceResponse
.
then
(()
=>
vm
.
$nextTick
())
.
then
(()
=>
{
scrollFade
=
vm
.
$el
.
querySelector
(
'
.js-scroll-fade
'
);
scrollContainer
=
scrollFade
.
querySelector
(
'
.js-dropdown-list
'
);
scrollContainer
.
style
.
maxHeight
=
'
100px
'
;
scrollContainer
.
style
.
overflowY
=
'
scroll
'
;
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
...
...
@@ -91,29 +75,6 @@ describe('BoardsSelector', () => {
window
.
gl
.
boardService
=
undefined
;
});
it
(
'
shows the scroll fade if isScrolledUp
'
,
done
=>
{
vm
.
scrollFadeInitialized
=
false
;
scrollContainer
.
scrollTop
=
0
;
waitForScroll
()
.
then
(()
=>
{
expect
(
scrollFade
.
classList
.
contains
(
'
fade-out
'
)).
toEqual
(
false
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
hides the scroll fade if not isScrolledUp
'
,
done
=>
{
scrollContainer
.
scrollTop
=
scrollContainer
.
scrollHeight
;
waitForScroll
()
.
then
(()
=>
{
expect
(
scrollFade
.
classList
.
contains
(
'
fade-out
'
)).
toEqual
(
true
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
describe
(
'
filtering
'
,
()
=>
{
const
fillSearchBox
=
filterTerm
=>
{
const
{
searchBox
}
=
vm
.
$refs
;
...
...
@@ -122,10 +83,15 @@ describe('BoardsSelector', () => {
searchBoxInput
.
dispatchEvent
(
new
Event
(
'
input
'
));
};
it
(
'
shows all boards without filtering
'
,
()
=>
{
it
(
'
shows all boards without filtering
'
,
done
=>
{
vm
.
$nextTick
()
.
then
(()
=>
{
const
dropdownItemCount
=
vm
.
$el
.
querySelectorAll
(
'
.js-dropdown-item
'
);
expect
(
dropdownItemCount
.
length
).
toBe
(
boards
.
length
);
})
.
then
(
done
)
.
catch
(
done
.
fail
);
});
it
(
'
shows only matching boards when filtering
'
,
done
=>
{
...
...
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