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

[tests-only] add test download previos version of file. Add check download file #5661

Closed
wants to merge 4 commits into from

Conversation

ScharfViktor
Copy link
Contributor

  • A test for this error 2261 is written
  • added a check that the file was downloaded successfully

@ownclouders
Copy link
Contributor

Results for oC10SharingPublicManagement https://drone.owncloud.com/owncloud/web/18194/34/1
The following scenarios passed on retry:

  • webUISharingPublicManagement/publicLinkIndicator.feature:27

@ownclouders
Copy link
Contributor

Results for oC10SharingExternalRoot https://drone.owncloud.com/owncloud/web/18194/40/1
The following scenarios passed on retry:

  • webUISharingExternalToRoot/federationSharing.feature:356

@ownclouders
Copy link
Contributor

Results for oC10XGAPortrait2 https://drone.owncloud.com/owncloud/web/18194/43/1
💥 The acceptance tests pipeline failed. The build has been cancelled.

@phil-davis phil-davis changed the title [test-only] add test download previos version of file. Add check download file [tests-only] add test download previos version of file. Add check download file Aug 12, 2021
@owncloud owncloud deleted a comment from update-docs bot Aug 12, 2021
@phil-davis
Copy link
Contributor

Note: there are API test scenarios for this issue that are failing in oCIS CI:

#### [downloading an old version of a file returns 501](https://github.com/owncloud/ocis/issues/2261)
-    [apiVersions/fileVersions.feature:437](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersions.feature#L437)
-    [apiVersions/fileVersions.feature:455](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersions.feature#L455)
-    [apiVersions/fileVersionsSharingToShares.feature:301](https://github.com/owncloud/core/blob/master/tests/acceptance/features/apiVersions/fileVersionsSharingToShares.feature#L301)

So the bug is in the server. But I guess it is useful to have a web scenario for this, because when the server bug is fixed, and the API scenarios pass, we then want to know that web UI can actually display and download versions.

@ScharfViktor ScharfViktor force-pushed the downloadOldversionFile branch from d02e8e5 to 33130b8 Compare August 12, 2021 11:41
@ownclouders
Copy link
Contributor

Results for oC10SharingInternalGroupsSharingIndicator https://drone.owncloud.com/owncloud/web/18236/24/1
The following scenarios passed on retry:

  • webUISharingInternalGroupsToRootSharingIndicator/shareWithGroups.feature:104
  • webUISharingInternalGroupsSharingIndicator/shareWithGroups.feature:114

@ownclouders
Copy link
Contributor

Results for oCISFiles1 https://drone.owncloud.com/owncloud/web/18236/52/1
💥 The acceptance tests pipeline failed. The build has been cancelled.

@fschade
Copy link
Contributor

fschade commented Aug 13, 2021

as discussed, if the tests run in ci the downloaded files (in selenium) are not available on the test runner.
That means path.join(__dirname, '/../download/', file) will never be successflul.

The best would be to mount a download dir into the selenium image and then path.join(__dirname, '/../download/', file) should work.

Similar how we do it for the files to upload in drone

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@pascalwengerter
Copy link
Contributor

@ScharfViktor I fear this one needs a rebase, can we help you with finalizing this PR?

@ScharfViktor
Copy link
Contributor Author

@ScharfViktor I fear this one needs a rebase, can we help you with finalizing this PR?

@pascalwengerter yeah, that would be great. I could not figure out how to drone add volume like in docker-compose
volumes: - ./tests/acceptance/download:/home/seluser/Downloads

@pascalwengerter
Copy link
Contributor

@ScharfViktor this needs a big rebase. Can you ping me early next week and we do it together? Or do you want to add it to the smoke tests instead and close (=supersede) this PR?

@phil-davis
Copy link
Contributor

See core PR owncloud/core#39442
That added tests with the ability to download files with chrome browser and then to be able to access the Download directory from within test steps. The oC10 tests added there check that the correct filename downloaded, and check the content of the downloaded files ("raw" txxt files, zip/tar files)

That might give some clues for the test infrastructure setup.

@pascalwengerter
Copy link
Contributor

@ScharfViktor can you maybe shift this test to Playwright? "Real" downloads there work already out of the box so you'd "only" have to figure out how to access the downloaded file's content

@pascalwengerter
Copy link
Contributor

@ScharfViktor can you maybe shift this test to Playwright? "Real" downloads there work already out of the box so you'd "only" have to figure out how to access the downloaded file's content

Plus it'd work locally as well the same it does in CI, without mounting volumes or the likes

@ScharfViktor
Copy link
Contributor Author

@ScharfViktor can you maybe shift this test to Playwright? "Real" downloads there work already out of the box so you'd "only" have to figure out how to access the downloaded file's content

I agree, it's a good idea))

@ScharfViktor
Copy link
Contributor Author

See core PR owncloud/core#39442
That added tests with the ability to download files with chrome browser and then to be able to access the Download directory from within test steps. The oC10 tests added there check that the correct filename downloaded, and check the content of the downloaded files ("raw" txxt files, zip/tar files)

@phil-davis thanks for the tip

@ScharfViktor ScharfViktor force-pushed the downloadOldversionFile branch from 086e059 to 09ac427 Compare November 18, 2021 22:37
@ScharfViktor
Copy link
Contributor Author

ScharfViktor commented Nov 19, 2021

Now smoke tests have a good file download check:
we check for file load, file length, and name. We can also check the content of the file.

So I did not duplicate the file download check in the "acceptance" tests.

I moved the check "download previos version" to another task #6038, so as not to bother with the "rebase"

@pascalwengerter pascalwengerter deleted the downloadOldversionFile branch December 3, 2021 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants