Skip to content

api test for sharing with user by entering username in capital letters#35309

Merged
dpakach merged 1 commit into
owncloud:masterfrom
haribhandari07:api-small-username-share
May 29, 2019
Merged

api test for sharing with user by entering username in capital letters#35309
dpakach merged 1 commit into
owncloud:masterfrom
haribhandari07:api-small-username-share

Conversation

@haribhandari07

@haribhandari07 haribhandari07 commented May 23, 2019

Copy link
Copy Markdown
Contributor

Description

includes api test for creating new shares using sharing api by entering username in capital letters

Related Issue

Part of issue #35354

Motivation and Context

How Has This Been Tested?

CI

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)

@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.

please check also if the user did receive the file
there are steps line ... should see following elements

| 2 | 200 | No newline at end of file
| 2 | 200 |

Scenario: share with user by entering username in capital letters

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
Scenario: share with user by entering username in capital letters
Scenario: share with user when username contains capital letters

@codecov

codecov Bot commented May 23, 2019

Copy link
Copy Markdown

Codecov Report

Merging #35309 into master will decrease coverage by 0.6%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #35309      +/-   ##
============================================
- Coverage     65.54%   64.93%   -0.61%     
  Complexity    18647    18647              
============================================
  Files          1218     1218              
  Lines         70546    70512      -34     
  Branches       1288     1288              
============================================
- Hits          46236    45789     -447     
- Misses        23933    24346     +413     
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.23% <ø> (-0.68%) 18647 <ø> (ø)
Impacted Files Coverage Δ Complexity Δ
lib/private/DB/AdapterOCI8.php 0% <0%> (-86.67%) 4% <0%> (ø)
...ivate/Files/ObjectStore/HomeObjectStoreStorage.php 0% <0%> (-86.67%) 8% <0%> (ø)
...Builder/ExpressionBuilder/OCIExpressionBuilder.php 0% <0%> (-85.19%) 18% <0%> (ø)
lib/private/DB/OracleMigrator.php 0% <0%> (-80.71%) 29% <0%> (ø)
lib/private/DB/OracleConnection.php 0% <0%> (-66.67%) 12% <0%> (ø)
lib/private/Files/Storage/Wrapper/Availability.php 10.38% <0%> (-38.97%) 80% <0%> (ø)
lib/private/Files/ObjectStore/NoopScanner.php 68.75% <0%> (-18.75%) 6% <0%> (ø)
lib/private/Share/Share.php 27.04% <0%> (-16.33%) 70% <0%> (ø)
...b/private/Files/ObjectStore/ObjectStoreStorage.php 70.97% <0%> (-14.34%) 102% <0%> (ø)
lib/private/Preview/MP3.php 45.16% <0%> (-12.91%) 13% <0%> (ø)
... and 22 more

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...f34b5d8. Read the comment docs.

@codecov

codecov Bot commented May 23, 2019

Copy link
Copy Markdown

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #35309   +/-   ##
=========================================
  Coverage     65.53%   65.53%           
  Complexity    18648    18648           
=========================================
  Files          1218     1218           
  Lines         70549    70549           
  Branches       1288     1288           
=========================================
  Hits          46236    46236           
  Misses        23936    23936           
  Partials        377      377
Flag Coverage Δ Complexity Δ
#javascript 53.69% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.89% <ø> (ø) 18648 <ø> (ø) ⬇️

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 413e3e3...5c15a34. Read the comment docs.

@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.

Tests look good to me 👍

Scenario: share with user when username contains capital letters
Given these users have been created:
| username |
| ocuser0 |

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.

Suggested change
| ocuser0 |
| user0 |

Given these users have been created:
| username |
| ocuser0 |
| ocuser1 |

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.

Suggested change
| ocuser1 |
| user1 |

| file_target | /welcome.txt |
| path | /welcome.txt |
| permissions | 19 |
| uid_owner | ocuser0 |

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.

Suggested change
| uid_owner | ocuser0 |
| uid_owner | user0 |

Comment thread tests/acceptance/features/apiShareManagementBasic/createShare.feature Outdated
Comment thread tests/acceptance/features/apiShareManagementBasic/createShare.feature Outdated
Comment thread tests/acceptance/features/apiShareManagementBasic/createShare.feature Outdated
Then the OCS status code should be "100"
And the HTTP status code should be "200"
And the fields of the last response should include
| share_with | ocuser1 |

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.

Suggested change
| share_with | ocuser1 |
| share_with | user1 |

| path | /welcome.txt |
| permissions | 19 |
| uid_owner | ocuser0 |
And user "ocuser1" should see the following elements

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.

Suggested change
And user "ocuser1" should see the following elements
And user "user1" should see the following elements

| file_target | /welcome.txt |
| path | /welcome.txt |
| permissions | 19 |
| uid_owner | user0 |

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 fix formating

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.

same for other places

| user1 |
And group "grp1" has been created
And user "user1" has been added to group "grp1"
When user "user0" shares file "/welcome.txt" with user "USER1" using the sharing API

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.

it would be more interesting to share with that group

Suggested change
When user "user0" shares file "/welcome.txt" with user "USER1" using the sharing API
And user "USER1" has been added to group "grp1"
When user "user0" shares file "/welcome.txt" with group "grp1" using the sharing API

@phil-davis

phil-davis commented May 28, 2019

Copy link
Copy Markdown
Contributor

@haribhandari07 is there an issue to go with this PR?
If not, we can create one, because there are other test combinations in user management and webUI sharing... that could have mixed user and group name scenarios.

Issue #35354

@haribhandari07

Copy link
Copy Markdown
Contributor Author

backport on #35357

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.

6 participants