Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
interfect
funkwhale
Commits
80af4268
Commit
80af4268
authored
Mar 31, 2018
by
Bat
Browse files
Tests
parent
6b8dc1b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
front/test/unit/specs/store/queue.spec.js
View file @
80af4268
...
...
@@ -204,22 +204,33 @@ describe('store/queue', () => {
expectedActions
:
[]
},
done
)
})
it
(
'
previous when at beginning
does nothing
'
,
(
done
)
=>
{
it
(
'
previous when at beginning
'
,
(
done
)
=>
{
testAction
({
action
:
store
.
actions
.
previous
,
params
:
{
state
:
{
currentIndex
:
0
}},
expectedActions
:
[]
expectedActions
:
[
{
type
:
'
currentIndex
'
,
payload
:
0
}
]
},
done
)
})
it
(
'
previous
'
,
(
done
)
=>
{
it
(
'
previous
after less than 3 seconds of playback
'
,
(
done
)
=>
{
testAction
({
action
:
store
.
actions
.
previous
,
params
:
{
state
:
{
currentIndex
:
1
}},
params
:
{
state
:
{
currentIndex
:
1
}
,
rootState
:
{
player
:
{
currentTime
:
1
}}
},
expectedActions
:
[
{
type
:
'
currentIndex
'
,
payload
:
0
}
]
},
done
)
})
it
(
'
previous after more than 3 seconds of playback
'
,
(
done
)
=>
{
testAction
({
action
:
store
.
actions
.
previous
,
params
:
{
state
:
{
currentIndex
:
1
},
rootState
:
{
player
:
{
currentTime
:
3
}}},
expectedActions
:
[
{
type
:
'
currentIndex
'
,
payload
:
1
}
]
},
done
)
})
it
(
'
next on last track when looping on queue
'
,
(
done
)
=>
{
testAction
({
action
:
store
.
actions
.
next
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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