Skip to content

feature test for public link share expiration date deletion#35175

Merged
individual-it merged 3 commits into
owncloud:masterfrom
haribhandari07:expiration-date
May 24, 2019
Merged

feature test for public link share expiration date deletion#35175
individual-it merged 3 commits into
owncloud:masterfrom
haribhandari07:expiration-date

Conversation

@haribhandari07

@haribhandari07 haribhandari07 commented May 8, 2019

Copy link
Copy Markdown
Contributor

Description

Includes two tests for deletion of expiration date when the expiration date is not enforced and enforced.

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

Comment thread tests/acceptance/features/bootstrap/WebUISharingContext.php Outdated
Comment thread tests/acceptance/features/bootstrap/WebUISharingContext.php Outdated
@codecov

codecov Bot commented May 8, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35175 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             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
Flag Coverage Δ Complexity Δ
#javascript 53.5% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.86% <ø> (-0.01%) 18636 <ø> (ø)
Impacted Files Coverage Δ Complexity Δ
lib/private/DB/Connection.php 65.44% <0%> (-0.74%) 49% <0%> (ø)
lib/private/Files/View.php 84.3% <0%> (-0.31%) 398% <0%> (ø)

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 1d077f7...c393e44. Read the comment docs.

@codecov

codecov Bot commented May 8, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35175 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.9% <ø> (ø) 18647 <ø> (ø) ⬇️

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 6db604e...c6ec250. Read the comment docs.

Comment thread tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature Outdated
Comment thread tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature Outdated
Comment thread tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature Outdated

@paurakhsharma paurakhsharma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some small suggestions

Comment thread tests/acceptance/features/bootstrap/WebUISharingContext.php Outdated
Comment thread tests/acceptance/features/bootstrap/WebUISharingContext.php Outdated

@skshetry skshetry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👍

@paurakhsharma paurakhsharma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me 👍

Comment thread tests/acceptance/features/bootstrap/WebUISharingContext.php Outdated
Comment thread tests/acceptance/features/webUISharingPublic/shareByPublicLink.feature Outdated

@individual-it individual-it left a comment

Copy link
Copy Markdown
Member

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) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
if ($value != null) {
if ($value !== null) {

Copy link
Copy Markdown
Contributor Author

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);

Copy link
Copy Markdown
Member

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(

Copy link
Copy Markdown
Member

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

@individual-it

Copy link
Copy Markdown
Member

@haribhandari07 please fix the conflicts and ping me again for review

@paurakhsharma paurakhsharma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good 👍

@individual-it

Copy link
Copy Markdown
Member

@haribhandari07 please backport to stable10

@haribhandari07

Copy link
Copy Markdown
Contributor Author

Backport on #35369

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants