Test regression with public link not created when default expiration date set and enforced#35594
Conversation
|
I am currently testing this without the fix in #35564. I'll just remove comments when the tests fail. TODO:
|
|
@skshetry Fix got merged in
|
d6b3876 to
f2fd57d
Compare
Codecov Report
@@ Coverage Diff @@
## master #35594 +/- ##
============================================
+ Coverage 65.37% 65.67% +0.29%
+ Complexity 18775 18763 -12
============================================
Files 1222 1222
Lines 70898 70887 -11
Branches 1289 1289
============================================
+ Hits 46353 46555 +202
+ Misses 24167 23954 -213
Partials 378 378
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #35594 +/- ##
=========================================
Coverage 65.77% 65.77%
Complexity 18781 18781
=========================================
Files 1222 1222
Lines 70870 70870
Branches 1289 1289
=========================================
Hits 46618 46618
Misses 23874 23874
Partials 378 378
Continue to review full report at Codecov.
|
4e315c5 to
f8822d1
Compare
| */ | ||
| public function theUserShouldSeeAnErrorMessageOnThPublicLinkPopupSaying($message) { | ||
| // update public-sharing popup, as it might not have been set previously. | ||
| $this->publicSharingPopup = $this->publicShareTab->updateSharingPopup($this->getSession()); |
There was a problem hiding this comment.
There's no way to get the popup. It's not the best way, but I went with the easiest way.
| } | ||
|
|
||
| /** | ||
| * @When /^user "([^"]*)" gets the info of the last public link using the sharing API$/ |
There was a problem hiding this comment.
I think this should go inside Sharing.php
There was a problem hiding this comment.
I feel this is good-enough, because if I put this in Sharing.php:
- The similar step will exist.
- Other developers might use this step even though, they should be using other step (due to suggestion from autocompletion).
- Might need to use xpath on most element (due to responseXml differences).
- This is only needed for
webUIstuffs. Keeping onwebUIprevents step2 from happening and provide isolation.
Your argument does hold. api related calls for Sharing should be in Sharing.php, I agree.
paurakhsharma
left a comment
There was a problem hiding this comment.
Just a small comment, other looks good for me.
|
looks good |
| } | ||
|
|
||
| /** | ||
| * @When /^user "([^"]*)" gets the info of the last public link using the sharing API$/ |
There was a problem hiding this comment.
why not using userGetsInfoOfLastShareUsingTheSharingApi()?
There was a problem hiding this comment.
Creating public links does not set lastShareData which userGetsInfoOfLastShareUsingTheSharingApi uses. So, I have to manually set.
There was a problem hiding this comment.
OK, you don't have the id of the share here, get it and then use userGetsInfoOfLastShareUsingTheSharingApi
f8822d1 to
7a46531
Compare
individual-it
left a comment
There was a problem hiding this comment.
also fix aded639#diff-7a6686160e3f99113ae6c2c807e63a58R801
I think that is what you are stumbling about.
in isFieldInResponse we mostly use data from the last response $this->getResponseXml() but for the expiration date we get the data when the share was created $this->getServerLastShareTime() this is not correct if the share was created but an other response like
And the user gets the info of the last share using the sharing API was done afterwards
| } | ||
|
|
||
| /** | ||
| * @When /^user "([^"]*)" gets the info of the last public link using the sharing API$/ |
There was a problem hiding this comment.
OK, you don't have the id of the share here, get it and then use userGetsInfoOfLastShareUsingTheSharingApi
d6cc58d to
affec79
Compare
fc07092 to
d5083fb
Compare
d5083fb to
c19f092
Compare
c19f092 to
3845c54
Compare
|
@skshetry please make the |
|
Backport for |
Description
This adds a regression test that public link was not getting created when default expiration date was set and enforced. This also tests the functionality of #34960.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: