1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 02:39:33 +02:00

Enh #106 : Add an autoPlayVideo user attribute (#159)

Warning : I was not able to run the tests on my machine. It uses a different approach to handle databse connexion and didn't find where to configure it...

- create a migration file to add a boolean column in user table
- add autoPlayVideo attribute everywhere it is needed (both on client and server side)
- add tests
- add a way to configure this attribute in account-settings
- use the attribute in video-watch component to actually autoplay or not the video
This commit is contained in:
Andréas Livet 2017-12-19 10:45:49 +01:00 committed by Chocobozzz
parent 228077efd7
commit 7efe153b0b
18 changed files with 105 additions and 12 deletions

View file

@ -350,6 +350,14 @@ describe('Test users API validators', function () {
await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
})
it('Should fail with an invalid autoPlayVideo attribute', async function () {
const fields = {
autoPlayVideo: -1
}
await makePutBodyRequest({ url: server.url, path: path + 'me', token: userAccessToken, fields })
})
it('Should fail with an non authenticated user', async function () {
const fields = {
password: 'my super password'
@ -362,6 +370,7 @@ describe('Test users API validators', function () {
const fields = {
password: 'my super password',
displayNSFW: true,
autoPlayVideo: false,
email: 'super_email@example.com'
}