-
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
feature test for public link share expiration date deletion #35175
feature test for public link share expiration date deletion #35175
Conversation
Codecov Report
@@ Coverage Diff @@
## master #35175 +/- ##
============================================
- Coverage 65.48% 65.48% -0.01%
Complexity 18636 18636
============================================
Files 1217 1217
Lines 70535 70535
Branches 1296 1296
============================================
- Hits 46193 46189 -4
- Misses 23965 23969 +4
Partials 377 377
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #35175 +/- ##
=========================================
Coverage 65.54% 65.54%
Complexity 18647 18647
=========================================
Files 1218 1218
Lines 70546 70546
Branches 1288 1288
=========================================
Hits 46236 46236
Misses 23933 23933
Partials 377 377
Continue to review full report at Codecov.
|
tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature
Outdated
Show resolved
Hide resolved
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.
Some small suggestions
tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/PublicLinkTab.php
Show resolved
Hide resolved
tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php
Outdated
Show resolved
Hide resolved
tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php
Outdated
Show resolved
Hide resolved
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.
👍
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.
Looks good to me 👍
tests/acceptance/features/lib/FilesPageElement/SharingDialogElement/EditPublicLinkPopup.php
Outdated
Show resolved
Hide resolved
tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature
Outdated
Show resolved
Hide resolved
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.
just small things
if (!$this->isFieldInResponse($field, $value)) { | ||
PHPUnit\Framework\Assert::fail( | ||
"$field doesn't have value $value" | ||
if ($value != null) { |
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.
if ($value != null) { | |
if ($value !== null) { |
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.
since we are changing the expiration to " " which is empty string(not null) it's better to use (!empty($value))
* @throws ElementNotFoundException | ||
*/ | ||
public function getErrorMessage() { | ||
$errorMessageElement = $this->popupElement->find("xpath", $this->expirationDateRequiredErrorMessageXpath); |
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 make the line shorter / break it
); | ||
} | ||
} else { | ||
PHPUnit\Framework\Assert::assertFalse( |
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.
this logic does not look correct to me. We expect the field to be in the response and be empty, so isFieldInResponse()
should return true
@haribhandari07 please fix the conflicts and ping me again for review |
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.
Looks good 👍
@haribhandari07 please backport to stable10 |
Backport on #35369 |
Description
Includes two tests for deletion of expiration date when the expiration date is not enforced and enforced.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist:
Open tasks: