Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
65c78edb
Commit
65c78edb
authored
Mar 21, 2018
by
Lyza Danger Gardner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `group.public` property from annotation component
parent
18f59a97
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
annotation.js
src/sidebar/components/annotation.js
+1
-1
annotation-test.js
src/sidebar/components/test/annotation-test.js
+20
-10
No files found.
src/sidebar/components/annotation.js
View file @
65c78edb
...
...
@@ -547,7 +547,7 @@ function AnnotationController(
if
(
!
self
.
editing
()
||
!
self
.
isShared
())
{
return
false
;
}
return
self
.
group
().
public
;
return
self
.
group
().
type
!==
'private'
;
};
init
();
...
...
src/sidebar/components/test/annotation-test.js
View file @
65c78edb
...
...
@@ -20,12 +20,17 @@ var groupFixtures = {
private
:
{
id
:
'private'
,
url
:
'https://example.org/g/private'
,
public
:
false
,
type
:
'private'
,
},
public
:
{
open
:
{
id
:
'world'
,
url
:
'https://example.org/g/public'
,
public
:
true
,
url
:
'https://example.org/g/open'
,
type
:
'open'
,
},
restricted
:
{
id
:
'restricto'
,
url
:
'https://example.org/g/restricto'
,
type
:
'restricted'
,
},
};
...
...
@@ -213,8 +218,8 @@ describe('annotation', function() {
fakeServiceUrl
=
sinon
.
stub
();
fakeGroups
=
{
focused
:
sinon
.
stub
().
returns
(
groupFixtures
.
public
),
get
:
sinon
.
stub
().
returns
(
groupFixtures
.
public
),
focused
:
sinon
.
stub
().
returns
(
groupFixtures
.
open
),
get
:
sinon
.
stub
().
returns
(
groupFixtures
.
open
),
};
fakeSettings
=
{
...
...
@@ -878,12 +883,12 @@ describe('annotation', function() {
},
[{
case_
:
'the annotation is not being edited'
,
draft
:
null
,
group
:
groupFixtures
.
public
,
group
:
groupFixtures
.
open
,
expected
:
false
,
},{
case_
:
'the draft is private'
,
draft
:
draftFixtures
.
private
,
group
:
groupFixtures
.
public
,
group
:
groupFixtures
.
open
,
expected
:
false
,
},{
case_
:
'the group is private'
,
...
...
@@ -891,9 +896,14 @@ describe('annotation', function() {
group
:
groupFixtures
.
private
,
expected
:
false
,
},{
case_
:
'the draft is shared and the group is public'
,
case_
:
'the draft is shared and the group is open'
,
draft
:
draftFixtures
.
shared
,
group
:
groupFixtures
.
open
,
expected
:
true
,
},{
case_
:
'the draft is shared and the group is restricted'
,
draft
:
draftFixtures
.
shared
,
group
:
groupFixtures
.
public
,
group
:
groupFixtures
.
restricted
,
expected
:
true
,
}]);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment