owncloud / web

:dragon_face: Next generation frontend for ownCloud Infinite Scale
https://owncloud.dev/clients/web/
GNU Affero General Public License v3.0
418 stars 157 forks source link

All E2E nightly tests for `app-provider` are failing #11108

Closed SagarGi closed 1 week ago

SagarGi commented 1 week ago

Description

Scenario: open office suite files with Collabora and onlyOffice (attempt 1, retried) # tests/e2e/cucumber/features/app-provider/urlJourneys.feature:10
   ✔ Before # tests/e2e/cucumber/environment/index.ts:44
   ✔ Given "Admin" creates following users using API # tests/e2e/cucumber/steps/api.ts:7
       | id    |
       | Alice |
   ✔ And "Alice" logs in # tests/e2e/cucumber/steps/ui/session.ts:45
   ✔ And "Alice" creates the following files into personal space using API # tests/e2e/cucumber/steps/api.ts:108
       | pathToFile       | content              |
       | OpenDocument.odt | OpenDocument Content |
   ✖ And "Alice" creates the following resources # tests/e2e/cucumber/steps/ui/resources.ts:19
       | resource           | type           | content                |
       | MicrosoftWord.docx | Microsoft Word | Microsoft Word Content |
       page.waitForURL: Timeout 30000ms exceeded.
       =========================== logs ===========================
       waiting for navigation to "**/external/**" until "load"
         navigated to "https://ocis:9200/files/spaces/personal/alice?fileId=a9fe6c93-462a-46aa-90aa-530bf0e62c44%2408061085-bab3-4595-a519-916d9f0dca9d%2108061085-bab3-4595-a519-916d9f0dca9d&items-per-page=100&files-spaces-generic-view-mode=resource-table&tiles-size=2"
         navigated to "https://ocis:9200/external-onlyoffice/personal/alice/MicrosoftWord.docx?fileId=a9fe6c93-462a-46aa-90aa-530bf0e62c44%2408061085-bab3-4595-a519-916d9f0dca9d%21c33a50ae-9e8c-4921-bd8b-5fc2f9790363&contextRouteName=files-spaces-generic&contextRouteParams.driveAliasAndItem=personal%2Falice&contextRouteQuery.fileId=a9fe6c93-462a-46aa-90aa-530bf0e62c44%2408061085-bab3-4595-a519-916d9f0dca9d%2108061085-bab3-4595-a519-916d9f0dca9d"
       ============================================================
           at createDocumentFile (/var/www/owncloud/web/tests/e2e/support/objects/app-files/resource/actions.ts:354:10)
           at async createNewFileOrFolder (/var/www/owncloud/web/tests/e2e/support/objects/app-files/resource/actions.ts:327:7)
           at async Object.createResources (/var/www/owncloud/web/tests/e2e/support/objects/app-files/resource/actions.ts:499:3)
           at async Resource.create (/var/www/owncloud/web/tests/e2e/support/objects/app-files/resource/index.ts:15:5)
           at async World.<anonymous> (/var/www/owncloud/web/tests/e2e/cucumber/steps/ui/resources.ts:26:7)
   - And "Alice" opens the "files" app # tests/e2e/cucumber/steps/ui/application.ts:15
   - When "Alice" opens the file "OpenDocument.odt" of space "personal" in Collabora through the URL for desktop client # tests/e2e/cucumber/steps/ui/navigateByUrl.ts:31
   - Then "Alice" should see the content "OpenDocument Content" in editor "Collabora" # tests/e2e/cucumber/steps/ui/public.ts:87
   - When "Alice" opens the file "MicrosoftWord.docx" of space "personal" in OnlyOffice through the URL for desktop client # tests/e2e/cucumber/steps/ui/navigateByUrl.ts:31
   - Then "Alice" should see the content "Microsoft Word Content" in editor "OnlyOffice" # tests/e2e/cucumber/steps/ui/public.ts:87
   - When "Alice" opens the file "OpenDocument.odt" of space "personal" in Collabora through the URL for mobile client # tests/e2e/cucumber/steps/ui/navigateByUrl.ts:31
   - Then "Alice" should see the content "OpenDocument Content" in editor "Collabora" # tests/e2e/cucumber/steps/ui/public.ts:87
   - When "Alice" opens the file "MicrosoftWord.docx" of space "personal" in OnlyOffice through the URL for mobile client # tests/e2e/cucumber/steps/ui/navigateByUrl.ts:31
   - Then "Alice" should see the content "Microsoft Word Content" in editor "OnlyOffice" # tests/e2e/cucumber/steps/ui/public.ts:87
   - And "Alice" logs out # tests/e2e/cucumber/steps/ui/session.ts:58
   ✔ After # tests/e2e/cucumber/environment/index.ts:112

6 scenarios (6 failed)
151 steps (6 failed, 108 skipped, 37 passed)
7m34.730s (executing steps: 7m34.171s)
 ELIFECYCLE  Command failed with exit code 1

Drone Build: https://drone.owncloud.com/owncloud/web/45483/14/16 Something might have been changed to cause this hard failure. Need some investigation regarding it.

saw-jan commented 1 week ago

Hmm, the change was made in PR https://github.com/owncloud/web/pull/11103. now we have /external-onlyoffice/ and /external-collabora/ url paths instead of /external/. this breaks the tests. This can be fixed in the test.

But we have test scenario for url navigation which navigates to: /external/open-with-web/?appName=${editorName}&fileId=${fileId} from desktop client: /external?contextRouteName=files-spaces-personal&fileId=${fileId} web cannot load this url:

Screenshot from 2024-06-28 12-23-17

/external/open-with-web/?appName=${editorName}&fileId=${fileId} /external?contextRouteName=files-spaces-personal&fileId=${fileId}

should this url work?

CC @ScharfViktor @kulmann

saw-jan commented 1 week ago

These urls doesn't work: :x:

but this does: :heavy_check_mark:

ScharfViktor commented 1 week ago

https://github.com/owncloud/web/pull/11103 was merged without [full-ci] tag in the PR title so we we missed this regression

kulmann commented 1 week ago

Ah dang, everything correct here, I forgot [full-ci] on https://github.com/owncloud/web/pull/11103 - sorry for the trouble.

https://github.com/owncloud/web/pull/11103 brought new URLs for the specific app provider apps (e.g. /external-collabora/ instead of /external/...?app=Collabora for Collabora). However, I built a redirect page so that the old URLs with only /external/ in the path continue to work and do a redirect to the new URLs. That also includes the URLs that the backend generates on the endpoint /external/open-with-web.

My assumption is that the e2e tests need to learn to wait until after the redirect has happened. During the redirect the page with One moment please... is visible.

Should I take care of this myself? If yes, please assign me to this issue.

saw-jan commented 1 week ago

During the redirect the page with One moment please... is visible.

how long does the redirect takes? because I couldn't see the online office even waiting for some time. so I was wondering if redirect was working

saw-jan commented 1 week ago

Should I take care of this myself? If yes, please assign me to this issue.

I will take care of it if it's only the test code adjustments

saw-jan commented 1 week ago

I see this error in the browser log: Screenshot from 2024-06-28 13-03-16

maybe this is for app query param: ?app=Collabora. just a guess because url with ?app=Collabora works but others don't

kulmann commented 1 week ago

I see this error in the browser log:

Screenshot from 2024-06-28 13-03-16

maybe this is for app query param: ?app=Collabora. just a guess because url with ?app=Collabora works but others don't

I'll fix this! Was able to reproduce it locally.

kulmann commented 1 week ago

@saw-jan I fixed the bug in the web ui, but the tests still need to be adjusted afaict. Could you take over?

saw-jan commented 1 week ago

@saw-jan I fixed the bug in the web ui, but the tests still need to be adjusted afaict. Could you take over?

Okey, will push a PR with adjustments

kulmann commented 1 week ago

Thank you @saw-jan ❤️