Unverified Commit 7245e85c authored by Lyza Gardner's avatar Lyza Gardner Committed by GitHub

Remove references to `client_do_not_separate_replies` feature flag (#2325)

parent c0953568
......@@ -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) {
......
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment