mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
chore(test): add smart playlist into data fixture
This commit is contained in:
parent
265d89918a
commit
111ad75a0d
5 changed files with 72 additions and 6 deletions
|
@ -431,6 +431,40 @@
|
|||
"name": "Simple Playlist",
|
||||
"rules": null,
|
||||
"is_smart": false
|
||||
},
|
||||
{
|
||||
"name": "Smart Playlist",
|
||||
"rules": [
|
||||
{
|
||||
"id": 1609438260491,
|
||||
"rules": [
|
||||
{
|
||||
"id": 1609438270184,
|
||||
"model": "length",
|
||||
"operator": "isGreaterThan",
|
||||
"value": [
|
||||
"40"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1609438286276,
|
||||
"rules": [
|
||||
{
|
||||
"id": 1609438289914,
|
||||
"model": "title",
|
||||
"operator": "is",
|
||||
"value": [
|
||||
"Whatever"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"id": 2,
|
||||
"is_smart": true,
|
||||
"songs": []
|
||||
}
|
||||
],
|
||||
"interactions": [
|
||||
|
|
|
@ -431,6 +431,40 @@
|
|||
"name": "Simple Playlist",
|
||||
"rules": null,
|
||||
"is_smart": false
|
||||
},
|
||||
{
|
||||
"name": "Smart Playlist",
|
||||
"rules": [
|
||||
{
|
||||
"id": 1609438260491,
|
||||
"rules": [
|
||||
{
|
||||
"id": 1609438270184,
|
||||
"model": "length",
|
||||
"operator": "isGreaterThan",
|
||||
"value": [
|
||||
"40"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1609438286276,
|
||||
"rules": [
|
||||
{
|
||||
"id": 1609438289914,
|
||||
"model": "title",
|
||||
"operator": "is",
|
||||
"value": [
|
||||
"Whatever"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"id": 2,
|
||||
"is_smart": true,
|
||||
"songs": []
|
||||
}
|
||||
],
|
||||
"interactions": [
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
]
|
||||
}
|
||||
],
|
||||
"id": 1,
|
||||
"id": 3,
|
||||
"is_smart": true,
|
||||
"songs": []
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "A New Playlist",
|
||||
"rules": null,
|
||||
"id": 2,
|
||||
"id": 3,
|
||||
"is_smart": false,
|
||||
"songs": []
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ context('Playlists', () => {
|
|||
})
|
||||
|
||||
it('creates a simple playlist from the sidebar', () => {
|
||||
cy.intercept('GET', '/api/playlist/2/songs', [])
|
||||
cy.intercept('GET', '/api/playlist/3/songs', [])
|
||||
|
||||
cy.intercept('POST', '/api/playlist', {
|
||||
fixture: 'playlist.post.200.json'
|
||||
|
@ -113,13 +113,11 @@ context('Playlists', () => {
|
|||
})
|
||||
|
||||
it('creates a smart playlist', () => {
|
||||
cy.intercept('GET', '/api/playlist/2/songs', [])
|
||||
|
||||
cy.intercept('POST', '/api/playlist', {
|
||||
fixture: 'playlist-smart.post.200.json'
|
||||
})
|
||||
|
||||
cy.intercept('GET', '/api/playlist/1/songs', {
|
||||
cy.intercept('GET', '/api/playlist/3/songs', {
|
||||
fixture: 'playlist-songs.get.200.json'
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue