Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
95e34407
Unverified
Commit
95e34407
authored
6 years ago
by
Julius Härtl
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for edit permission state on file shares
Signed-off-by:
Julius Härtl
<
jus@bitgrid.net
>
parent
2c990ade
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/js/tests/specs/sharedialogshareelistview.js
+31
-0
31 additions, 0 deletions
core/js/tests/specs/sharedialogshareelistview.js
with
31 additions
and
0 deletions
core/js/tests/specs/sharedialogshareelistview.js
+
31
−
0
View file @
95e34407
...
@@ -90,6 +90,37 @@ describe('OC.Share.ShareDialogShareeListView', function () {
...
@@ -90,6 +90,37 @@ describe('OC.Share.ShareDialogShareeListView', function () {
});
});
describe
(
'
Sets correct initial checkbox state
'
,
function
()
{
describe
(
'
Sets correct initial checkbox state
'
,
function
()
{
it
(
'
marks edit box as unchecked for file shares without edit permissions
'
,
function
()
{
shareModel
.
set
(
'
shares
'
,
[{
id
:
100
,
item_source
:
123
,
permissions
:
1
,
share_type
:
OC
.
Share
.
SHARE_TYPE_USER
,
share_with
:
'
user1
'
,
share_with_displayname
:
'
User One
'
,
uid_owner
:
oc_current_user
,
itemType
:
'
file
'
}]);
listView
.
render
();
expect
(
listView
.
$el
.
find
(
"
input[name='edit']
"
).
is
(
'
:not(:checked)
'
)).
toEqual
(
true
);
});
it
(
'
marks edit box as checked for file shares
'
,
function
()
{
shareModel
.
set
(
'
shares
'
,
[{
id
:
100
,
item_source
:
123
,
permissions
:
1
|
OC
.
PERMISSION_UPDATE
,
share_type
:
OC
.
Share
.
SHARE_TYPE_USER
,
share_with
:
'
user1
'
,
share_with_displayname
:
'
User One
'
,
uid_owner
:
oc_current_user
,
itemType
:
'
file
'
}]);
listView
.
render
();
expect
(
listView
.
$el
.
find
(
"
input[name='edit']
"
).
is
(
'
:checked
'
)).
toEqual
(
true
);
});
it
(
'
marks edit box as indeterminate when only some permissions are given
'
,
function
()
{
it
(
'
marks edit box as indeterminate when only some permissions are given
'
,
function
()
{
shareModel
.
set
(
'
shares
'
,
[{
shareModel
.
set
(
'
shares
'
,
[{
id
:
100
,
id
:
100
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment