- const overview: VideosOverview = res.body
- expect(overview.tags).to.have.lengthOf(2)
- expect(overview.categories).to.have.lengthOf(1)
- expect(overview.channels).to.have.lengthOf(1)
+ testOverviewCount(body, 0)
+ })
+
+ it('Should upload another video and include all videos in the overview', async function () {
+ this.timeout(30000)
+
+ {
+ for (let i = 1; i < 6; i++) {
+ await uploadVideo(server.url, server.accessToken, {
+ name: 'video ' + i,
+ category: 3,
+ tags: [ 'coucou1', 'coucou2' ]
+ })
+ }
+
+ await wait(3000)
+ }
+
+ {
+ const body = await server.overviewsCommand.getVideos({ page: 1 })
+
+ testOverviewCount(body, 1)
+ }
+
+ {
+ const overview = await server.overviewsCommand.getVideos({ page: 2 })
+
+ expect(overview.tags).to.have.lengthOf(1)
+ expect(overview.categories).to.have.lengthOf(0)
+ expect(overview.channels).to.have.lengthOf(0)
+ }