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

chore : Comprehensive e2e testing for public sharing #50260

Merged
merged 4 commits into from
Feb 3, 2025

Conversation

nfebe
Copy link
Contributor

@nfebe nfebe commented Jan 18, 2025

This PR enhances the testing framework for public sharing by introducing modular improvements and extending test coverage with "before create public share" checks.

Adds the following tests:

  • Password and expiration date enforced
  • Password enforced with a default expiration date
  • Expiration date enforced with optional password
  • Default password and expiration date without enforcement
  • Password enforced, expiration date set but not enforced
  • Both password and expiration date not enforced, but defaults set
  • Password not enforced, expiration date enforced
  • Password not enforced, default expiration date set
  • Password and expiration date not enforced with no defaults

Screencast for e2e plays

public-sharing-e2e-tests.mp4

@nfebe nfebe force-pushed the enhancements/files-sharing-tests branch 4 times, most recently from 088f24e to 2133889 Compare January 20, 2025 17:28
@nfebe nfebe requested review from susnux, artonge, Pytal, provokateurin and a team January 20, 2025 17:31
@nfebe nfebe marked this pull request as ready for review January 20, 2025 17:31
@nfebe nfebe changed the title chore : Improved testing and feature enhancements for public sharing chore : Comprehensive e2e testing public sharing Jan 20, 2025
@nfebe nfebe changed the title chore : Comprehensive e2e testing public sharing chore : Comprehensive e2e testing for public sharing Jan 20, 2025
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

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

Feels like the missing piece is now to ensure that the submitted share options are effective by accessing the share.

@nfebe nfebe force-pushed the enhancements/files-sharing-tests branch 2 times, most recently from 4b32508 to 96b7fdb Compare January 23, 2025 09:19
@nfebe nfebe force-pushed the enhancements/files-sharing-tests branch from 96b7fdb to 3b0ee61 Compare January 31, 2025 19:58
@nfebe nfebe requested review from artonge and susnux January 31, 2025 20:01
@nfebe
Copy link
Contributor Author

nfebe commented Jan 31, 2025

/compile

Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

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

🐘

@szaimen szaimen added enhancement 3. to review Waiting for reviews labels Feb 3, 2025
@szaimen szaimen added this to the Nextcloud 32 milestone Feb 3, 2025
nfebe and others added 4 commits February 3, 2025 12:38
This update enhances the testing framework for public sharing by
improving the setup and management of share contexts.
It refactors the code to make the `createShare` function reusable externally,
ensuring better testability and flexibility.
Additionally, the update optimizes share permission adjustments and
improves state management, making public share setups more efficient and maintainable.

Signed-off-by: nfebe <[email protected]>
This commit introduces end-to-end tests for various public link sharing scenarios in the `files_sharing` app. It validates the behavior under multiple configurations:

- Password and expiration date enforced
- Password enforced with a default expiration date
- Expiration date enforced with optional password
- Default password and expiration date without enforcement
- Password enforced, expiration date set but not enforced
- Both password and expiration date not enforced, but defaults set
- Password not enforced, expiration date enforced
- Password not enforced, default expiration date set
- Password and expiration date not enforced with no defaults

The tests ensure proper validation and functionality of the configurations, leveraging the `setupData` and `createShare` utilities.

Signed-off-by: nfebe <[email protected]>
Signed-off-by: nextcloud-command <[email protected]>
@nfebe nfebe force-pushed the enhancements/files-sharing-tests branch from c3b8d2c to 6d37e16 Compare February 3, 2025 11:38
@nfebe nfebe enabled auto-merge February 3, 2025 11:38
@nfebe nfebe merged commit e9cb614 into master Feb 3, 2025
119 of 120 checks passed
@nfebe nfebe deleted the enhancements/files-sharing-tests branch February 3, 2025 11:47
@nfebe
Copy link
Contributor Author

nfebe commented Feb 3, 2025

/backport to stable31

@nfebe
Copy link
Contributor Author

nfebe commented Feb 3, 2025

/backport to stable30

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

Successfully merging this pull request may close these issues.

5 participants