Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philipp Wolfer
funkwhale
Commits
ad80ddfc
Verified
Commit
ad80ddfc
authored
Sep 24, 2021
by
Georg Krause
Browse files
Fix frontend tests
parent
1a3cb023
Changes
4
Hide whitespace changes
Inline
Side-by-side
front/src/store/auth.js
View file @
ad80ddfc
...
...
@@ -183,10 +183,7 @@ export default {
axios
.
get
(
'
users/me/
'
).
then
((
response
)
=>
{
logger
.
default
.
info
(
'
Successfully fetched user profile
'
)
dispatch
(
'
ui/initSettings
'
,
response
.
data
.
settings
,
{
root
:
true
})
dispatch
(
'
updateProfile
'
,
response
.
data
).
then
(()
=>
{
resolve
(
response
.
data
)
})
dispatch
(
'
updateProfile
'
,
response
.
data
)
dispatch
(
'
ui/fetchUnreadNotifications
'
,
null
,
{
root
:
true
})
if
(
response
.
data
.
permissions
.
library
)
{
dispatch
(
'
ui/fetchPendingReviewEdits
'
,
null
,
{
root
:
true
})
...
...
@@ -200,6 +197,7 @@ export default {
dispatch
(
'
libraries/fetchFollows
'
,
null
,
{
root
:
true
})
dispatch
(
'
moderation/fetchContentFilters
'
,
null
,
{
root
:
true
})
dispatch
(
'
playlists/fetchOwn
'
,
null
,
{
root
:
true
})
resolve
(
response
.
data
)
},
(
response
)
=>
{
logger
.
default
.
info
(
'
Error while fetching user profile
'
)
reject
(
new
Error
(
'
Error while fetching user profile
'
))
...
...
front/tests/unit/specs/store/auth.spec.js
View file @
ad80ddfc
...
...
@@ -159,7 +159,13 @@ describe('store/auth', () => {
{
type
:
'
permission
'
,
payload
:
{
key
:
'
admin
'
,
status
:
true
}
}
],
expectedActions
:
[
{
type
:
'
ui/initSettings
'
,
payload
:
{
root
:
true
}
},
{
type
:
'
updateProfile
'
,
payload
:
profile
},
{
type
:
'
ui/fetchUnreadNotifications
'
,
payload
:
null
},
{
type
:
'
favorites/fetch
'
,
payload
:
null
,
options
:
{
root
:
true
}
},
{
type
:
'
channels/fetchSubscriptions
'
,
payload
:
null
,
options
:
{
root
:
true
}
},
{
type
:
'
libraries/fetchFollows
'
,
payload
:
null
,
options
:
{
root
:
true
}
},
{
type
:
'
moderation/fetchContentFilters
'
,
payload
:
null
,
options
:
{
root
:
true
}
},
{
type
:
'
playlists/fetchOwn
'
,
payload
:
null
,
options
:
{
root
:
true
}
}
]
})
...
...
front/tests/unit/specs/store/queue.spec.js
View file @
ad80ddfc
...
...
@@ -274,7 +274,7 @@ describe('store/queue', () => {
it
(
'
shuffle
'
,
()
=>
{
let
_shuffle
=
sandbox
.
stub
(
_
,
'
shuffle
'
)
let
tracks
=
[
'
a
'
,
'
b
'
,
'
c
'
,
'
d
'
,
'
e
'
]
let
shuffledTracks
=
[
'
e
'
,
'
d
'
,
'
c
'
]
let
shuffledTracks
=
[
'
a
'
,
'
b
'
,
'
e
'
,
'
d
'
,
'
c
'
]
_shuffle
.
returns
(
shuffledTracks
)
testAction
({
action
:
store
.
actions
.
shuffle
,
...
...
@@ -283,7 +283,8 @@ describe('store/queue', () => {
{
type
:
'
tracks
'
,
payload
:
[]
}
],
expectedActions
:
[
{
type
:
'
appendMany
'
,
payload
:
{
tracks
:
[
'
a
'
,
'
b
'
].
concat
(
shuffledTracks
)}
}
{
type
:
'
appendMany
'
,
payload
:
{
tracks
:
shuffledTracks
}
},
{
type
:
'
currentIndex
'
,
payload
:
{
tracks
:
shuffledTracks
}
}
]
})
})
...
...
front/tests/unit/specs/store/radios.spec.js
View file @
ad80ddfc
...
...
@@ -51,7 +51,7 @@ describe('store/radios', () => {
{
type
:
'
running
'
,
payload
:
true
}
],
expectedActions
:
[
{
type
:
'
populateQueue
'
}
{
type
:
'
populateQueue
'
,
payload
:
true
}
]
})
})
...
...
Write
Preview
Supports
Markdown
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