Fix video channel videos url when scrolling
authorChocobozzz <me@florianbigard.com>
Thu, 15 Nov 2018 16:12:41 +0000 (17:12 +0100)
committerChocobozzz <me@florianbigard.com>
Thu, 15 Nov 2018 16:13:27 +0000 (17:13 +0100)
client/src/app/+video-channels/video-channel-videos/video-channel-videos.component.ts
server/tests/api/server/handle-down.ts

index 800d97b7fcbf9d6e39e8b46c13ff49f7554fed86..1f0744fb13cc9cc71d67fc0f0da30f2bca072a9a 100644 (file)
@@ -25,7 +25,7 @@ import { ScreenService } from '@app/shared/misc/screen.service'
 export class VideoChannelVideosComponent extends AbstractVideoList implements OnInit, OnDestroy {
   titlePage: string
   marginContent = false // Disable margin
-  currentRoute = '/video-channel/videos'
+  currentRoute = '/video-channels/videos'
   loadOnInit = false
 
   private videoChannel: VideoChannel
@@ -55,7 +55,7 @@ export class VideoChannelVideosComponent extends AbstractVideoList implements On
     this.videoChannelSub = this.videoChannelService.videoChannelLoaded
       .subscribe(videoChannel => {
         this.videoChannel = videoChannel
-        this.currentRoute = '/video-channel/' + this.videoChannel.uuid + '/videos'
+        this.currentRoute = '/video-channels/' + this.videoChannel.uuid + '/videos'
 
         this.reloadVideos()
         this.generateSyndicationList()
index ed15c8090659ec0cc095e781bcefdfd17556b229..0421b2b40eeeeeec281b52b9f5ded9b908fcdaac 100644 (file)
@@ -5,7 +5,7 @@ import 'mocha'
 import { JobState, Video } from '../../../../shared/models'
 import { VideoPrivacy } from '../../../../shared/models/videos'
 import { VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
-import { completeVideoCheck, getVideo, immutableAssign, reRunServer, unfollow, viewVideo } from '../../utils'
+import { completeVideoCheck, getVideo, immutableAssign, reRunServer, unfollow, updateVideo, viewVideo } from '../../utils'
 import {
   flushAndRunMultipleServers,
   getVideosList,
@@ -194,15 +194,15 @@ describe('Test handle downs', function () {
     expect(res.body.data).to.have.lengthOf(2)
   })
 
-  it('Should send a view to server 3, and automatically fetch the video', async function () {
+  it('Should send an update to server 3, and automatically fetch the video', async function () {
     this.timeout(15000)
 
     const res1 = await getVideosList(servers[2].url)
     expect(res1.body.data).to.be.an('array')
     expect(res1.body.data).to.have.lengthOf(11)
 
-    await viewVideo(servers[0].url, missedVideo1.uuid)
-    await viewVideo(servers[0].url, unlistedVideo.uuid)
+    await updateVideo(servers[0].url, servers[0].accessToken, missedVideo1.uuid, { })
+    await updateVideo(servers[0].url, servers[0].accessToken, unlistedVideo.uuid, { })
 
     await waitJobs(servers)