+
+ await browser.waitForAngularEnabled(true)
+ })
+
+ it('Should update the video', async () => {
+ if (await skipIfUploadNotSupported()) return
+
+ await browser.get(videoWatchUrl)
+
+ await videoWatchPage.clickOnUpdate()
+
+ await videoUpdatePage.updateName('my new name')
+
+ await videoUpdatePage.validUpdate()
+
+ const name = await videoWatchPage.getVideoName()
+ expect(name).toEqual('my new name')
+ })
+
+ it('Should add the video in my playlist', async () => {
+ if (await skipIfUploadNotSupported()) return
+
+ await videoWatchPage.clickOnSave()
+ await videoWatchPage.saveToWatchLater()
+
+ await videoUploadPage.navigateTo()
+
+ await videoUploadPage.uploadVideo()
+ await videoUploadPage.validSecondUploadStep('second video')
+
+ await videoWatchPage.clickOnSave()
+ await videoWatchPage.saveToWatchLater()
+ })
+
+ it('Should have the watch later playlist in my account', async () => {
+ if (await skipIfUploadNotSupported()) return
+
+ await myAccountPage.navigateToMyPlaylists()
+
+ const name = await myAccountPage.getLastUpdatedPlaylistName()
+ expect(name).toEqual('Watch later')
+
+ const videosNumberText = await myAccountPage.getLastUpdatedPlaylistVideosText()
+ expect(videosNumberText).toEqual('2 videos')
+
+ await myAccountPage.clickOnLastUpdatedPlaylist()
+
+ const count = await myAccountPage.countTotalPlaylistElements()
+ expect(count).toEqual(2)
+ })
+
+ it('Should watch the playlist', async () => {
+ if (await skipIfUploadNotSupported()) return
+
+ await myAccountPage.playPlaylist()
+
+ await videoWatchPage.waitUntilVideoName('second video', 20000 * 1000)
+ })
+
+ it('Should have the video in my account', async () => {
+ if (await skipIfUploadNotSupported()) return
+
+ await myAccountPage.navigateToMyVideos()
+
+ const lastVideoName = await myAccountPage.getLastVideoName()
+ expect(lastVideoName).toEqual('second video')
+ })
+
+ it('Should delete the last video', async () => {
+ if (await skipIfUploadNotSupported()) return
+
+ await myAccountPage.removeLastVideo()
+ await myAccountPage.validRemove()
+
+ const count = await myAccountPage.countVideos()
+ expect(count).toEqual(1)
+ })
+
+ it('Should delete the first video', async () => {
+ if (await skipIfUploadNotSupported()) return
+
+ await myAccountPage.removeLastVideo()
+ await myAccountPage.validRemove()
+
+ const count = await myAccountPage.countVideos()
+ expect(count).toEqual(0)