Skip to content

Commit 7a92c77

Browse files
committed
deleted most mentions of linkedcat
1 parent 1d88e2e commit 7a92c77

9 files changed

Lines changed: 8 additions & 614 deletions

File tree

vis/js/components/Heading.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ export default connect(mapStateToProps)(Heading);
4747

4848
// This should probably make its way to a more global config
4949
const MAX_LENGTH_VIPER = 47;
50-
const MAX_LENGTH_LINKEDCAT = 115;
5150
const MAX_LENGTH_CUSTOM = 100;
5251

5352
/**
@@ -69,10 +68,6 @@ const renderTitle = (localization, query, headingParams) => {
6968
);
7069
}
7170

72-
if (headingParams.titleStyle === "linkedcat") {
73-
return renderLinkedCatTitle(label, query);
74-
}
75-
7671
if (
7772
headingParams.titleStyle === "custom" &&
7873
typeof headingParams.customTitle !== "undefined" &&
@@ -108,11 +103,6 @@ const renderViperTitle = (title, acronym, projectId) => {
108103
);
109104
};
110105

111-
const renderLinkedCatTitle = (label, query) => {
112-
let shortTitle = sliceText(query, MAX_LENGTH_LINKEDCAT);
113-
return <StandardTitle label={label} title={query} shortTitle={shortTitle} />;
114-
};
115-
116106
const renderCustomTitle = (title, label, query, localization) => {
117107
let shortTitle = sliceText(title, MAX_LENGTH_CUSTOM);
118108
// this is necessary, because the custom title is already escaped

vis/js/default-config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,6 @@ var config = {
195195
, pubmed: "PubMed"
196196
, doaj: "DOAJ"
197197
, openaire: "OpenAIRE"
198-
, linkedcat: "LinkedCat+"
199-
, linkedcat_authorview: "LinkedCat+"
200-
, linkedcat_browseview: "LinkedCat+"
201198
, triple_km: "GoTriple"
202199
, triple_sg: "GoTriple"
203200
},

vis/test/component/heading.test.js

Lines changed: 0 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -352,180 +352,6 @@ describe("Heading component", () => {
352352
});
353353
});
354354

355-
describe("linkedcat", () => {
356-
const setupLinkedcat = (overrideStore) => {
357-
const { storeObject } = setup();
358-
storeObject.heading.titleStyle = "linkedcat";
359-
storeObject.query.text = "Some query";
360-
361-
Object.assign(storeObject, overrideStore);
362-
363-
const store = mockStore(storeObject);
364-
365-
return { store, storeObject };
366-
};
367-
368-
it("renders with correct streamgraph author label", () => {
369-
const LABEL = "Special Streamgraph Author Test Label";
370-
371-
const { storeObject } = setupLinkedcat();
372-
storeObject.heading.titleLabelType = "authorview-streamgraph";
373-
storeObject.localization.streamgraph_authors_label = LABEL;
374-
375-
const store = mockStore(storeObject);
376-
377-
act(() => {
378-
render(
379-
<Provider store={store}>
380-
<Heading />
381-
</Provider>,
382-
container
383-
);
384-
});
385-
386-
expect(container.querySelector("h4").textContent).toContain(LABEL);
387-
});
388-
389-
it("renders with correct knowledgemap author label", () => {
390-
const LABEL = "Special Knowledgemap Author Test Label";
391-
392-
const { storeObject } = setupLinkedcat();
393-
storeObject.heading.titleLabelType = "authorview-knowledgemap";
394-
storeObject.localization.overview_authors_label = LABEL;
395-
396-
const store = mockStore(storeObject);
397-
398-
act(() => {
399-
render(
400-
<Provider store={store}>
401-
<Heading />
402-
</Provider>,
403-
container
404-
);
405-
});
406-
407-
expect(container.querySelector("h4").textContent).toContain(LABEL);
408-
});
409-
410-
it("renders with correct streamgraph non-author label", () => {
411-
const LABEL = "Special Streamgraph non-Author Test Label";
412-
413-
const { storeObject } = setupLinkedcat();
414-
storeObject.heading.titleLabelType = "keywordview-streamgraph";
415-
storeObject.localization.streamgraph_label = LABEL;
416-
417-
const store = mockStore(storeObject);
418-
419-
act(() => {
420-
render(
421-
<Provider store={store}>
422-
<Heading />
423-
</Provider>,
424-
container
425-
);
426-
});
427-
428-
expect(container.querySelector("h4").textContent).toContain(LABEL);
429-
});
430-
431-
it("renders with correct knowledgemap non-author label", () => {
432-
const LABEL = "Special Knowledgemap non-Author Test Label";
433-
434-
const { storeObject } = setupLinkedcat();
435-
storeObject.heading.titleLabelType = "keywordview-knowledgemap";
436-
storeObject.localization.overview_label = LABEL;
437-
438-
const store = mockStore(storeObject);
439-
440-
act(() => {
441-
render(
442-
<Provider store={store}>
443-
<Heading />
444-
</Provider>,
445-
container
446-
);
447-
});
448-
449-
expect(container.querySelector("h4").textContent).toContain(LABEL);
450-
});
451-
452-
it("renders with correct query", () => {
453-
const QUERY = "Special Test Query";
454-
455-
const { store } = setupLinkedcat({ query: { text: QUERY } });
456-
457-
act(() => {
458-
render(
459-
<Provider store={store}>
460-
<Heading />
461-
</Provider>,
462-
container
463-
);
464-
});
465-
466-
expect(
467-
container.querySelector("#search-term-unique").textContent
468-
).toEqual(QUERY);
469-
});
470-
471-
it("renders with correct title attribute", () => {
472-
const QUERY = "Special Test Query";
473-
474-
const { store } = setupLinkedcat({ query: { text: QUERY } });
475-
476-
act(() => {
477-
render(
478-
<Provider store={store}>
479-
<Heading />
480-
</Provider>,
481-
container
482-
);
483-
});
484-
485-
expect(
486-
container.querySelector("#search-term-unique").getAttribute("title")
487-
).toEqual(QUERY);
488-
});
489-
490-
it("renders with correct but long title", () => {
491-
const QUERY = "Special Test Query".repeat(100);
492-
493-
const { store } = setupLinkedcat({ query: { text: QUERY } });
494-
495-
act(() => {
496-
render(
497-
<Provider store={store}>
498-
<Heading />
499-
</Provider>,
500-
container
501-
);
502-
});
503-
504-
expect(
505-
container.querySelector("#search-term-unique").textContent
506-
).toContain("...");
507-
});
508-
509-
it("renders with correct but long title attribute", () => {
510-
const QUERY = "Special Test Query".repeat(100);
511-
512-
const { store } = setupLinkedcat({ query: { text: QUERY } });
513-
514-
act(() => {
515-
render(
516-
<Provider store={store}>
517-
<Heading />
518-
</Provider>,
519-
container
520-
);
521-
});
522-
523-
expect(
524-
container.querySelector("#search-term-unique").getAttribute("title")
525-
).toEqual(QUERY);
526-
});
527-
});
528-
529355
describe("custom title", () => {
530356
const setupCustom = (overrideStore) => {
531357
const { storeObject } = setup();

vis/test/component/knowledgemap.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import KnowledgeMap from "../../js/components/KnowledgeMap";
1212

1313
import initialTestData, { initialTestAreas } from "../data/simple";
1414
import covisData from "../data/covis";
15-
import linkedcatData from "../data/linkedcat-streamgraph";
1615
import localData from "../data/local-files";
1716
import pubmedData from "../data/pubmed";
1817
import viperData from "../data/viper";

0 commit comments

Comments
 (0)