From cf568bc09672b250efb51d5906437fc36007a87a Mon Sep 17 00:00:00 2001 From: HariBhandari07 Date: Mon, 3 Aug 2020 16:14:28 +0545 Subject: [PATCH] [Tests-Only]Acceptance test for video playback in public share --- .../webUIPreview/imageMediaViewer.feature | 16 ++++++++++++++++ .../acceptance/stepDefinitions/previewContext.js | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/features/webUIPreview/imageMediaViewer.feature b/tests/acceptance/features/webUIPreview/imageMediaViewer.feature index 626abec3167..9bb8a36570a 100644 --- a/tests/acceptance/features/webUIPreview/imageMediaViewer.feature +++ b/tests/acceptance/features/webUIPreview/imageMediaViewer.feature @@ -14,3 +14,19 @@ Feature: display image in media viewer on the webUI And user "user1" has logged in using the webUI When the user views the file "test_video.mp4" in the mediaviewer using the webUI Then the file "test_video.mp4" should be displayed in the mediaViewer + + Scenario: video playback in public share + Given user "user1" has uploaded file "test_video.mp4" to "simple-empty-folder/test_video.mp4" + And user "user1" has created a public link with following settings + | path | simple-empty-folder | + When the public uses the webUI to access the last public link created by user "user1" + And the public views the file "test_video.mp4" in the mediaviewer using the webUI + Then the file "test_video.mp4" should be displayed in the mediaViewer + + Scenario: image preview in public share + Given user "user1" has uploaded file "testavatar.jpg" to "simple-empty-folder/testavatar.jpg" + And user "user1" has created a public link with following settings + | path | simple-empty-folder | + When the public uses the webUI to access the last public link created by user "user1" + And the public views the file "testavatar.jpg" in the mediaviewer using the webUI + Then the file "testavatar.jpg" should be displayed in the mediaViewer diff --git a/tests/acceptance/stepDefinitions/previewContext.js b/tests/acceptance/stepDefinitions/previewContext.js index d637427357a..4bedb49cc6f 100644 --- a/tests/acceptance/stepDefinitions/previewContext.js +++ b/tests/acceptance/stepDefinitions/previewContext.js @@ -3,7 +3,7 @@ const { When, Then } = require('cucumber') const offCanvasPage = client.page.FilesPageElement.offCanvasPage() const filesList = client.page.FilesPageElement.filesList() -When('the user views the file {string} in the mediaviewer using the webUI', async function( +When('the user/public views the file {string} in the mediaviewer using the webUI', async function( fileName ) { await filesList.clickOnFileName(fileName)