Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

features/webUIPreview/imageMediaViewer.feature:57 is failing in CI and needs investigation #6275

Closed
SwikritiT opened this issue Jan 19, 2022 · 7 comments
Assignees
Labels

Comments

@SwikritiT
Copy link
Contributor

SwikritiT commented Jan 19, 2022

This test is passing locally but for some reason failing on CI so it needs investigation

Scenario: navigate to next and previous media resource with media viewer is possible (attempt 2) # features/webUIPreview/imageMediaViewer.feature:57
   ✔ Before # setup.js:34
   ✔ Before # setup.js:38
   ✔ Before # setup.js:42
   ✔ Before # setup.js:59
   ✔ Before # setup.js:66
   ✔ Before # setup.js:77
   ✔ Before # stepDefinitions/filesContext.js:18
   ✔ Before # stepDefinitions/generalContext.js:288
   ✔ Before # stepDefinitions/generalContext.js:334
   ✔ Before # stepDefinitions/middlewareContext.js:46
   ✔ Given user "Alice" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given user "Alice" has uploaded file "testavatar.jpg" to "testavatar.jpg" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has uploaded file "testavatar.png" to "testavatar.png" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:70
   ✔ When the user views the file "testavatar.jpg" in the media viewer using the webUI # stepDefinitions/previewContext.js:15
   ✔ And the user navigates to the next media resource using the webUI # stepDefinitions/previewContext.js:22
   ✔ Then the file "testavatar.png" should be displayed in the media viewer webUI # stepDefinitions/previewContext.js:38
   ✔ When the user navigates to the previous media resource using the webUI # stepDefinitions/previewContext.js:26
   ✖ Then the file "testavatar.jpg" should be displayed in the media viewer webUI # stepDefinitions/previewContext.js:38
       Timed out while waiting for element <//p[contains(@class, "media-viewer-file-name") and contains(text(),"testavatar.jpg")]> to be present for 10000 milliseconds. - expected "visible" but got: "not found" (10011ms)
           at Proxy.waitForMediaViewerLoaded (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/mediaViewerPage.js:16:30)
           at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/previewContext.js:39:26)
   ✔ After # stepDefinitions/middlewareContext.js:60
   ✔ After # stepDefinitions/generalContext.js:352
   ✔ After # stepDefinitions/generalContext.js:313
   ✔ After # stepDefinitions/generalContext.js:254
   ✔ After # setup.js:110
   ✔ After # setup.js:106
   ✔ After # setup.js:102
   ✔ After # setup.js:95
   ✔ After # setup.js:86

Here's the screenShot for the failure #6257 (comment)

@phil-davis
Copy link
Contributor

phil-davis commented Jan 19, 2022

https://drone.owncloud.com/owncloud/web/22019/50/16

9) Scenario: navigate to next and previous media resource with media viewer is possible (attempt 2) # features/webUIPreview/imageMediaViewer.feature:57
   ✔ Before # setup.js:34
   ✔ Before # setup.js:38
   ✔ Before # setup.js:42
   ✔ Before # setup.js:59
   ✔ Before # setup.js:66
   ✔ Before # setup.js:77
   ✔ Before # stepDefinitions/filesContext.js:18
   ✔ Before # stepDefinitions/generalContext.js:288
   ✔ Before # stepDefinitions/generalContext.js:334
   ✔ Before # stepDefinitions/middlewareContext.js:46
   ✔ Given user "Alice" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given user "Alice" has uploaded file "testavatar.jpg" to "testavatar.jpg" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has uploaded file "testavatar.png" to "testavatar.png" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:70
   ✔ When the user views the file "testavatar.jpg" in the media viewer using the webUI # stepDefinitions/previewContext.js:15
   ✔ And the user navigates to the next media resource using the webUI # stepDefinitions/previewContext.js:22
   ✔ Then the file "testavatar.png" should be displayed in the media viewer webUI # stepDefinitions/previewContext.js:38
   ✔ When the user navigates to the previous media resource using the webUI # stepDefinitions/previewContext.js:26
   ✖ Then the file "testavatar.jpg" should be displayed in the media viewer webUI # stepDefinitions/previewContext.js:38
       Timed out while waiting for element <//p[contains(@class, "media-viewer-file-name") and contains(text(),"testavatar.jpg")]> to be present for 10000 milliseconds. - expected "visible" but got: "not found" (10019ms)
           at Proxy.waitForMediaViewerLoaded (/var/www/owncloud/web/tests/acceptance/pageObjects/FilesPageElement/mediaViewerPage.js:16:30)
           at World.<anonymous> (/var/www/owncloud/web/tests/acceptance/stepDefinitions/previewContext.js:39:26)
   ✔ After # stepDefinitions/middlewareContext.js:60
   ✔ After # stepDefinitions/generalContext.js:352
   ✔ After # stepDefinitions/generalContext.js:313
   ✔ After # stepDefinitions/generalContext.js:254
   ✔ After # setup.js:110
   ✔ After # setup.js:106
   ✔ After # setup.js:102
   ✔ After # setup.js:95
   ✔ After # setup.js:86

"testavatar.png" is still displayed. The back button does not seem to work in this case.

But the example at line 56 passes. That has two mp4 videos. The test go go back from test_video1.mp4 to test_video0.mp4, so the general test code and web/server code seems to be working.

We will have to look tomorrow and see if we can reproduce this problem locally somehow.

@pascalwengerter
Copy link
Contributor

You don't need CI to debug that, fails locally as well

@individual-it
Copy link
Member

individual-it commented Jan 19, 2022

@SwikritiT claims it does not fail for her locally and also it passes in ocis drone https://drone.owncloud.com/owncloud/ocis/8804/36/9 (from line 462)
So I guess there is some difference in the way web / ocis is started

@SwikritiT
Copy link
Contributor Author

Yes, the test is passing for me locally

  Scenario Outline: navigate to next and previous media resource with media viewer is possible # features/webUIPreview/imageMediaViewer.feature:45
ℹ Connected to 172.17.0.1 on port 4444 (304ms).
  Using: chrome (87.0.4280.66) on Linux platform.

	Could not read config file.
	Set correct path of config file in WEB_UI_CONFIG env variable to fix this.
	Some tests may fail as a result.
    Given user "Alice" has been created with default attributes and without skeleton files in the server
    Given user "Alice" has uploaded file "testavatar.jpg" to "testavatar.jpg" in the server
    And user "Alice" has uploaded file "testavatar.png" to "testavatar.png" in the server
    And user "Alice" has logged in using the webUI
√ Element <input[autocomplete="kopano-account username"]> was visible after 1276 milliseconds.
√ Element <input[autocomplete="kopano-account username"]> was not present after 54 milliseconds.
√ Element <.app-content> was visible after 700 milliseconds.
    When the user views the file "testavatar.jpg" in the media viewer using the webUI
√ Element <//span[contains(@class, "oc-resource-name") and (@data-test-resource-name='testavatar.jpg' or @data-test-resource-path='/testavatar.jpg')]/ancestor::tr[contains(@class, "oc-tbody-tr")]> was present after 15 milliseconds.
√ Element <.files-table .oc-tbody-tr> was present after 9 milliseconds.
waiting for 500ms ...
√ Element <//*[@id="sidebar-panel-actions-item"]//*[contains(@class, "sidebar-panel__body-content")]> was present after 14 milliseconds.
    And the user navigates to the next media resource using the webUI
√ Element <//div[contains(@class, "media-viewer-controls-action-bar")]//button[contains(@class, "media-viewer-controls-next")]> was visible after 22 milliseconds.
waiting for 500ms ...
Timeout waiting for Ajax calls to start
    Then the file "testavatar.png" should be displayed in the media viewer webUI
√ Element <//p[contains(@class, "media-viewer-file-name") and contains(text(),"testavatar.png")]> was visible after 25 milliseconds.
    When the user navigates to the previous media resource using the webUI
√ Element <//div[contains(@class, "media-viewer-controls-action-bar")]//button[contains(@class, "media-viewer-controls-previous")]> was visible after 23 milliseconds.
Timeout waiting for Ajax calls to start
    Then the file "testavatar.jpg" should be displayed in the media viewer webUI
√ Element <//p[contains(@class, "media-viewer-file-name") and contains(text(),"testavatar.jpg")]> was visible after 25 milliseconds.

1 scenario (1 passed)
9 steps (9 passed)
0m13.968s (executing steps: 0m13.922s)

imageMediaViewer.mp4

@phil-davis
Copy link
Contributor

@SwikritiT I think it also passes when running full-ci in the oCIS repo. The first thing to do is to look closely at all the drone CI settings for the pipeline that runs the webUIPreview tests in oCIS CI, and compare them to the settings used in the similar pipeline in web drone CI. Hopefully there is some difference (env variable, or oCIS build/startup/config setting), and we need to adjust the CI settings.

@SwikritiT SwikritiT self-assigned this Jan 20, 2022
@SwikritiT
Copy link
Contributor Author

I was previously building ocis, middleware from the source code but running them in docker has reproduced the issue locally for me

1) Scenario: navigate to next and previous media resource with media viewer is possible # features/webUIPreview/imageMediaViewer.feature:57
   ✔ Before # setup.js:34
   ✔ Before # setup.js:38
   ✔ Before # setup.js:42
   ✔ Before # setup.js:59
   ✔ Before # setup.js:66
   ✔ Before # setup.js:77
   ✔ Before # stepDefinitions/filesContext.js:18
   ✔ Before # stepDefinitions/generalContext.js:288
   ✔ Before # stepDefinitions/generalContext.js:334
   ✔ Before # stepDefinitions/middlewareContext.js:46
   ✔ Given user "Alice" has been created with default attributes and without skeleton files in the server # stepDefinitions/middlewareContext.js:66
   ✔ Given user "Alice" has uploaded file "testavatar.jpg" to "testavatar.jpg" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has uploaded file "testavatar.png" to "testavatar.png" in the server # stepDefinitions/middlewareContext.js:66
   ✔ And user "Alice" has logged in using the webUI # stepDefinitions/loginContext.js:70
   ✔ When the user views the file "testavatar.jpg" in the media viewer using the webUI # stepDefinitions/previewContext.js:15
   ✔ And the user navigates to the next media resource using the webUI # stepDefinitions/previewContext.js:22
   ✔ Then the file "testavatar.png" should be displayed in the media viewer webUI # stepDefinitions/previewContext.js:38
   ✔ When the user navigates to the previous media resource using the webUI # stepDefinitions/previewContext.js:26
   ✖ Then the file "testavatar.jpg" should be displayed in the media viewer webUI # stepDefinitions/previewContext.js:38
       Timed out while waiting for element <//p[contains(@class, "media-viewer-file-name") and contains(text(),"testavatar.jpg")]> to be present for 10000 milliseconds. - expected "visible" but got: "not found" (10019ms)
           at Proxy.waitForMediaViewerLoaded (/home/swikriti/www/web/tests/acceptance/pageObjects/FilesPageElement/mediaViewerPage.js:16:30)
           at World.<anonymous> (/home/swikriti/www/web/tests/acceptance/stepDefinitions/previewContext.js:39:26)
   ✔ After # stepDefinitions/middlewareContext.js:60
   ✔ After # stepDefinitions/generalContext.js:352
   ✔ After # stepDefinitions/generalContext.js:313
   ✔ After # stepDefinitions/generalContext.js:254
   ✔ After # setup.js:110
   ✔ After # setup.js:106
   ✔ After # setup.js:102
   ✔ After # setup.js:95
   ✔ After # setup.js:86

1 scenario (1 failed)
9 steps (1 failed, 8 passed)

@SwikritiT
Copy link
Contributor Author

@phil-davis @individual-it @pascalwengerter I created a separate issue for this #6289. So closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants