-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add methods to toggle disable/enable sharing settings #32043
Conversation
4008a80
to
fbfe15f
Compare
Codecov Report
@@ Coverage Diff @@
## master #32043 +/- ##
=========================================
Coverage 63.6% 63.6%
Complexity 18562 18562
=========================================
Files 1169 1169
Lines 69703 69703
Branches 1264 1264
=========================================
Hits 44338 44338
Misses 24996 24996
Partials 369 369
Continue to review full report at Codecov.
|
fbfe15f
to
8ae60b0
Compare
public function theAdminDisablesTheShareApiUsingTheWebUI() { | ||
$this->adminSharingSettingsPage->disableShareApi(); | ||
public function adminTogglesShareApiUsingTheWebui($requiredState) { | ||
$this->getSession()->reload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need the reloads everywhere?
$this->adminSharingSettingsPage->waitForAjaxCallsToStartAndFinish( | ||
$this->getSession() | ||
); | ||
} | ||
|
||
/** | ||
* @When the admin disables share via link using the webUI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use regular expression in the step to have the same line for enable/disable, then you could use the old steps and don't need to change existing scenarios
* | ||
* @return void | ||
*/ | ||
public function disableShareApi() { | ||
public function toggleShareApi($requiredState) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of duplicated in the toggle functions, maybe we can combine them?
232b9ec
to
b2a653e
Compare
$shareApiCheckbox->click(); | ||
public function toggleCheckbox($action, $checkboxXpath, $checkboxId) { | ||
$checkbox = $this->find("xpath", $checkboxXpath); | ||
$checkCheckbox = $this->findById($checkboxId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check if find*()
returns null
* Disable users to share via link | ||
* toggle the Share API | ||
* | ||
* @param string $action e.g "|enables|disables|" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not "e.g." only "enables" or "disables" can be used
| capability | path_to_element | value | | ||
| files_sharing | public@@@password@@@enforced_for@@@upload_only | EMPTY | | ||
|
||
Scenario: enable resharing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indent
b2a653e
to
1bc0235
Compare
@individual-it can you please review it again. Thank you 🙂 |
looks good lets see what 🤖 says |
@PVince81 Some problem with codecov. Can you please merge this PR. |
please backport |
Ok, thank you |
Backport on #32054 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
This PR adds toggle functions to disabling/enabling sharing settings.
Related Issue
#31983
How Has This Been Tested?
Locally
Types of changes
Checklist: