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

[stable10] WebUI test check blacklisted group sharing #33029

Merged
merged 1 commit into from
Oct 8, 2018

Conversation

paurakhsharma
Copy link
Member

@paurakhsharma paurakhsharma commented Oct 5, 2018

Description

This PR adds tests for share behavior in group sharing Blacklist

Related issue: #31696 and owncloud/QA#594

How Has This Been Tested?

Locally

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)
  • Acceptance test

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Oct 6, 2018

Codecov Report

Merging #33029 into stable10 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             stable10   #33029   +/-   ##
===========================================
  Coverage       62.91%   62.91%           
  Complexity      18865    18865           
===========================================
  Files            1236     1236           
  Lines           73946    73946           
  Branches         1282     1282           
===========================================
  Hits            46525    46525           
  Misses          27041    27041           
  Partials          380      380
Flag Coverage Δ Complexity Δ
#javascript 53.16% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 63.97% <ø> (ø) 18865 <ø> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5acbede...a202e93. Read the comment docs.

Copy link
Contributor

@phil-davis phil-davis left a comment

Choose a reason for hiding this comment

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

See comments.

throw new ElementNotFoundException(
__METHOD__ .
" xpath $this->groupSharingBlackListFieldXpath " .
"could not input field"
Copy link
Contributor

Choose a reason for hiding this comment

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

could not find input field

@@ -808,5 +811,8 @@ public function reportResult(AfterScenarioScope $afterScenarioScope) {
} else {
\error_log("SCENARIO RESULT: ($passOrFail)");
}
SetupHelper::runOcc(
["config:app:set files_sharing blacklisted_receiver_groups --value"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we save the previous setting in the BeforeScenario and restore it here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we can save the previous settings but restoring the previous settings doesn't work. As we saw it last Friday.

@@ -640,6 +640,9 @@ public function setUpScenario(BeforeScenarioScope $scope) {
);
}
}
SetupHelper::runOcc(
['config:app:set files_sharing blacklisted_receiver_groups --value=']
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this does not need to be cleared for every webUI scenario. We are getting more and more setup happening every scenario that takes many round-trips to the testing app to do occ commands.

It could go in BeforeScenario of WebUIAdminSharingSettingsContext.php ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that makes sense.

@phil-davis
Copy link
Contributor

Note: we need to review what tests we already have for the "opposite" setting Exclude groups from sharing as well as these new tests for Exclude groups from receiving shares - to make sure that we cover both settings, and maybe make a test scenario(s) that has the same group in both lists (just in case somebody does that)

@paurakhsharma paurakhsharma force-pushed the stable10-webUI-sharingWithBlacklistedGroup branch from c346db7 to 1dabe80 Compare October 8, 2018 05:27
@paurakhsharma
Copy link
Member Author

Forward port: #33031

@@ -25,6 +25,8 @@
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
use Behat\MinkExtension\Context\RawMinkContext;
use Page\AdminSharingSettingsPage;
use TestHelpers\SetupHelper;
use Behat\Behat\Hook\Scope\AfterScenarioScope;
Copy link
Contributor

Choose a reason for hiding this comment

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

not needed

@paurakhsharma paurakhsharma force-pushed the stable10-webUI-sharingWithBlacklistedGroup branch from 1dabe80 to a202e93 Compare October 8, 2018 05:40
@paurakhsharma paurakhsharma merged commit 2c62132 into stable10 Oct 8, 2018
@paurakhsharma paurakhsharma deleted the stable10-webUI-sharingWithBlacklistedGroup branch October 8, 2018 06:48
@PVince81 PVince81 modified the milestones: development, QA Jan 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants