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.
|
paurakhsharma
left a comment
There was a problem hiding this comment.
Some small suggestions
| 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.
| if ($value != null) { | |
| if ($value !== null) { |
There was a problem hiding this comment.
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.
please make the line shorter / break it
| ); | ||
| } | ||
| } else { | ||
| PHPUnit\Framework\Assert::assertFalse( |
There was a problem hiding this comment.
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 |
|
@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: