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

[test-only][full-ci] added tests for reading content of a file by fileId using WebDav API #6958

Merged

Conversation

PrajwolAmatya
Copy link
Contributor

@PrajwolAmatya PrajwolAmatya commented Aug 3, 2023

Description

This PR adds the test scenarios for reading the content of a file inside personal space, project space, inside sub-folder, and shared files/folders.
The added test is done with and without remote.php, in the destination URL.

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

@PrajwolAmatya PrajwolAmatya self-assigned this Aug 3, 2023
@update-docs
Copy link

update-docs bot commented Aug 3, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from e5bcc53 to ed03c7f Compare August 4, 2023 06:47
@PrajwolAmatya PrajwolAmatya changed the title [test-only][full-ci] create webdav api test for accessing files by fileid [test-only][full-ci] added tests for reading content of a file by fileId using WebDav API Aug 4, 2023
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from ed03c7f to 809ff98 Compare August 4, 2023 08:27
@PrajwolAmatya PrajwolAmatya marked this pull request as ready for review August 4, 2023 08:29
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from 809ff98 to f78b85e Compare August 4, 2023 08:31
tests/TestHelpers/WebDavHelper.php Outdated Show resolved Hide resolved
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from f78b85e to e48828b Compare August 7, 2023 06:27
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from e48828b to 49f37e5 Compare August 7, 2023 06:53
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from 49f37e5 to d6e897b Compare August 7, 2023 07:10

Scenario Outline: get content of a file
Given user "Alice" has uploaded file with content "some data" to "/textfile.txt"
When user "Alice" gets the content of file "/textfile.txt" with path "<dav-path>" using WebDav API
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any good suggestions here?

Suggested change
When user "Alice" gets the content of file "/textfile.txt" with path "<dav-path>" using WebDav API
When user "Alice" gets the content of file "/textfile.txt" from fileId and path "<dav-path>" using WebDav API

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When user "Alice" gets the content of file "/textfile.txt" with path "<dav-path>" using WebDav API
When user "Alice" sends HTTP "GET" request to file "/textfile.txt" with path "<dav-path>"

Copy link
Contributor Author

@PrajwolAmatya PrajwolAmatya Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of adding this new step we can use the existing step When user "Alice" sends HTTP method "GET" to URL "<dav-path>".
@saw-jan @SwikritiT @amrita-shrestha

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be great 👍

Copy link
Contributor

@SwikritiT SwikritiT Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any good suggestions here?

re-using the already present step is great but that doesn't really answer this IMO and I'm just thinking out loud here, I don't have any suggestions, maybe the feature file's name should be explanation enough that the request is done through the fileId ?

@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from d132e35 to 0e118f6 Compare August 7, 2023 10:21
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from 0e118f6 to 45042be Compare August 14, 2023 10:57
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from 45042be to 8c5de07 Compare August 15, 2023 03:49
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from 8c5de07 to 9fad8cf Compare August 15, 2023 04:04
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from 9fad8cf to affbd47 Compare August 15, 2023 04:09
@PrajwolAmatya PrajwolAmatya force-pushed the create-webdav-api-test-for-accessing-files-by-fileid branch from affbd47 to f1200f7 Compare August 17, 2023 08:46
@sonarcloud
Copy link

sonarcloud bot commented Aug 17, 2023

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
No Duplication information No Duplication information

Copy link
Member

@saw-jan saw-jan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@amrita-shrestha amrita-shrestha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@amrita-shrestha amrita-shrestha merged commit 84bc7d8 into master Aug 18, 2023
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the create-webdav-api-test-for-accessing-files-by-fileid branch August 18, 2023 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants