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
7245e85c
Unverified
Commit
7245e85c
authored
Jul 10, 2020
by
Lyza Gardner
Committed by
GitHub
Jul 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove references to `client_do_not_separate_replies` feature flag (#2325)
parent
c0953568
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
22 deletions
+2
-22
load-annotations.js
src/sidebar/services/load-annotations.js
+1
-2
load-annotations-test.js
src/sidebar/services/test/load-annotations-test.js
+1
-20
No files found.
src/sidebar/services/load-annotations.js
View file @
7245e85c
...
...
@@ -9,7 +9,6 @@ import { isReply } from '../util/annotation-metadata';
// @ngInject
export
default
function
loadAnnotationsService
(
api
,
features
,
store
,
streamer
,
streamFilter
...
...
@@ -41,7 +40,7 @@ export default function loadAnnotationsService(
function
searchAndLoad
(
uris
,
groupId
)
{
searchClient
=
new
SearchClient
(
api
.
search
,
{
incremental
:
true
,
separateReplies
:
!
features
.
flagEnabled
(
'client_do_not_separate_replies'
)
,
separateReplies
:
false
,
});
searchClient
.
on
(
'results'
,
results
=>
{
if
(
results
.
length
)
{
...
...
src/sidebar/services/test/load-annotations-test.js
View file @
7245e85c
...
...
@@ -31,7 +31,6 @@ class FakeSearchClient extends EventEmitter {
describe
(
'loadAnnotationsService'
,
()
=>
{
let
fakeApi
;
let
fakeFeatures
;
let
fakeStore
;
let
fakeStreamer
;
let
fakeStreamFilter
;
...
...
@@ -51,10 +50,6 @@ describe('loadAnnotationsService', () => {
},
};
fakeFeatures
=
{
flagEnabled
:
sinon
.
stub
().
returns
(
false
),
};
fakeStore
=
{
addAnnotations
:
sinon
.
stub
(),
annotationFetchFinished
:
sinon
.
stub
(),
...
...
@@ -100,7 +95,6 @@ describe('loadAnnotationsService', () => {
);
return
loadAnnotationsService
(
fakeApi
,
fakeFeatures
,
fakeStore
,
fakeStreamer
,
fakeStreamFilter
...
...
@@ -224,26 +218,13 @@ describe('loadAnnotationsService', () => {
assert
.
ok
(
searchClients
[
0
].
incremental
);
});
it
(
'loads annotations without separating replies if feature flag is enabled'
,
()
=>
{
fakeFeatures
.
flagEnabled
.
withArgs
(
'client_do_not_separate_replies'
)
.
returns
(
true
);
it
(
'loads annotations without separating replies'
,
()
=>
{
const
svc
=
createService
();
svc
.
load
(
fakeUris
,
fakeGroupId
);
assert
.
isFalse
(
searchClients
[
0
].
separateReplies
);
});
it
(
'loads annotations with separated replies if feature flag is not enabled'
,
()
=>
{
fakeFeatures
.
flagEnabled
.
withArgs
(
'client_do_not_separate_replies'
)
.
returns
(
false
);
const
svc
=
createService
();
svc
.
load
(
fakeUris
,
fakeGroupId
);
assert
.
isTrue
(
searchClients
[
0
].
separateReplies
);
});
it
(
"cancels previously search client if it's still running"
,
()
=>
{
const
svc
=
createService
();
...
...
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