diff --git a/client/.prettierignore b/client/.prettierignore new file mode 100644 index 000000000..1600bef28 --- /dev/null +++ b/client/.prettierignore @@ -0,0 +1 @@ +index_template.html \ No newline at end of file diff --git a/client/__tests__/e2e/cellxgeneActions.js b/client/__tests__/e2e/cellxgeneActions.js index 303875e7b..ed305de43 100644 --- a/client/__tests__/e2e/cellxgeneActions.js +++ b/client/__tests__/e2e/cellxgeneActions.js @@ -256,7 +256,7 @@ export async function assertGenesetExists(genesetName) { /* - GENE + SAMPLE */ diff --git a/client/__tests__/reducers/genesets.test.js b/client/__tests__/reducers/genesets.test.js index ad377f6cd..3177833ad 100644 --- a/client/__tests__/reducers/genesets.test.js +++ b/client/__tests__/reducers/genesets.test.js @@ -10,11 +10,11 @@ describe("initial reducer state", () => { }); }); -describe("geneset: initial load", () => { +describe("sampleset: initial load", () => { test("missing JSON response", () => { expect(() => genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", }) ).toThrow("missing or malformed JSON response"); }); @@ -22,7 +22,7 @@ describe("geneset: initial load", () => { test("empty geneset", () => { expect( genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 0, genesets: [], @@ -38,7 +38,7 @@ describe("geneset: initial load", () => { test("non-empty geneset", () => { expect( genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 99, genesets: [ @@ -94,9 +94,9 @@ describe("geneset: initial load", () => { }); }); -describe("geneset: create", () => { +describe("sampleset: create", () => { const initialState = genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 0, genesets: [], @@ -106,7 +106,7 @@ describe("geneset: create", () => { test("simple create", () => { expect( genesetsReducer(initialState, { - type: "geneset: create", + type: "sampleset: create", genesetName: "a geneset", genesetDescription: "", }) @@ -129,12 +129,12 @@ describe("geneset: create", () => { expect(() => { genesetsReducer( genesetsReducer(initialState, { - type: "geneset: create", + type: "sampleset: create", genesetName: "foo", genesetDescription: "foo", }), { - type: "geneset: create", + type: "sampleset: create", genesetName: "foo", genesetDescription: "bar", } @@ -145,22 +145,22 @@ describe("geneset: create", () => { test("error - missing required action values", () => { expect(() => { genesetsReducer(initialState, { - type: "geneset: create", + type: "sampleset: create", genesetDescription: "foo", }); }).toThrow(); expect(() => { genesetsReducer(initialState, { - type: "geneset: create", + type: "sampleset: create", genesetName: "foo", }); }).toThrow("name or description unspecified"); }); }); -describe("geneset: delete", () => { +describe("sampleset: delete", () => { const initialState = genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 0, genesets: [], @@ -171,12 +171,12 @@ describe("geneset: delete", () => { expect( genesetsReducer( genesetsReducer(initialState, { - type: "geneset: create", + type: "sampleset: create", genesetName: "foo", genesetDescription: "foo", }), { - type: "geneset: delete", + type: "sampleset: delete", genesetName: "foo", } ) @@ -190,16 +190,16 @@ describe("geneset: delete", () => { test("error - missing name", () => { expect(() => { genesetsReducer(initialState, { - type: "geneset: delete", + type: "sampleset: delete", genesetName: "foo", }); }).toThrow("name does not exist"); }); }); -describe("geneset: update", () => { +describe("sampleset: update", () => { const initialState = genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 0, genesets: [], @@ -211,18 +211,18 @@ describe("geneset: update", () => { genesetsReducer( genesetsReducer( genesetsReducer(initialState, { - type: "geneset: create", + type: "sampleset: create", genesetName: "foo1", genesetDescription: "foo1", }), { - type: "geneset: create", + type: "sampleset: create", genesetName: "foo2", genesetDescription: "foo2", } ), { - type: "geneset: update", + type: "sampleset: update", genesetName: "foo1", update: { genesetName: "bar", @@ -249,7 +249,7 @@ describe("geneset: update", () => { test("error - unknown name", () => { expect(() => { genesetsReducer(initialState, { - type: "geneset: update", + type: "sampleset: update", genesetName: "foo", update: { genesetName: "foo", @@ -263,12 +263,12 @@ describe("geneset: update", () => { expect(() => { genesetsReducer( genesetsReducer(initialState, { - type: "geneset: create", + type: "sampleset: create", genesetName: "foo", genesetDescription: "foo", }), { - type: "geneset: update", + type: "sampleset: update", genesetName: "foo", update: { genesetName: "foo", @@ -280,17 +280,17 @@ describe("geneset: update", () => { }); }); -describe("geneset: add genes", () => { +describe("sampleset: add samples", () => { const initialState = genesetsReducer( genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 0, genesets: [], }, }), { - type: "geneset: create", + type: "sampleset: create", genesetName: "test", genesetDescription: "", } @@ -299,7 +299,7 @@ describe("geneset: add genes", () => { test("add a gene", () => { expect( genesetsReducer(initialState, { - type: "geneset: add genes", + type: "sampleset: add samples", genesetName: "test", genes: [{ geneSymbol: "F5" }], }) @@ -319,7 +319,7 @@ describe("geneset: add genes", () => { expect( genesetsReducer(initialState, { - type: "geneset: add genes", + type: "sampleset: add samples", genesetName: "test", genes: [ { geneSymbol: "F5", geneDescription: "desc" }, @@ -347,7 +347,7 @@ describe("geneset: add genes", () => { test("no such geneset error", () => { expect(() => { genesetsReducer(initialState, { - type: "geneset: add genes", + type: "sampleset: add samples", genesetName: "mumble", genes: [], }); @@ -355,24 +355,24 @@ describe("geneset: add genes", () => { }); }); -describe("geneset: delete genes", () => { +describe("sampleset: delete samples", () => { const initialState = genesetsReducer( genesetsReducer( genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 0, genesets: [], }, }), { - type: "geneset: create", + type: "sampleset: create", genesetName: "test", genesetDescription: "", } ), { - type: "geneset: add genes", + type: "sampleset: add samples", genesetName: "test", genes: [{ geneSymbol: "F5" }], } @@ -381,7 +381,7 @@ describe("geneset: delete genes", () => { test("simple", () => { expect( genesetsReducer(initialState, { - type: "geneset: delete genes", + type: "sampleset: delete samples", genesetName: "test", geneSymbols: ["F5"], }) @@ -403,7 +403,7 @@ describe("geneset: delete genes", () => { test("no such geneset error", () => { expect(() => { genesetsReducer(initialState, { - type: "geneset: delete genes", + type: "sampleset: delete samples", genesetName: "mumble", geneSymbols: [], }); @@ -411,24 +411,24 @@ describe("geneset: delete genes", () => { }); }); -describe("geneset: set gene description", () => { +describe("sampleset: set sample description", () => { const initialState = genesetsReducer( genesetsReducer( genesetsReducer(undefined, { - type: "geneset: initial load", + type: "sampleset: initial load", data: { tid: 0, genesets: [], }, }), { - type: "geneset: create", + type: "sampleset: create", genesetName: "test", genesetDescription: "", } ), { - type: "geneset: add genes", + type: "sampleset: add samples", genesetName: "test", genes: [{ geneSymbol: "F5" }], } @@ -437,7 +437,7 @@ describe("geneset: set gene description", () => { test("simple set", () => { expect( genesetsReducer(initialState, { - type: "geneset: set gene description", + type: "sampleset: set sample description", genesetName: "test", update: { geneSymbol: "F5", @@ -464,7 +464,7 @@ describe("geneset: set gene description", () => { test("no such geneset error", () => { expect(() => { genesetsReducer(initialState, { - type: "geneset: set gene description", + type: "sampleset: set sample description", genesetName: "does not exist", update: { geneSymbol: "F5", @@ -477,7 +477,7 @@ describe("geneset: set gene description", () => { test("no such gene error", () => { expect(() => { genesetsReducer(initialState, { - type: "geneset: set gene description", + type: "sampleset: set sample description", genesetName: "test", update: { geneSymbol: "NO SUCH GENE", @@ -488,11 +488,11 @@ describe("geneset: set gene description", () => { }); }); -describe("geneset: set tid", () => { +describe("sampleset: set tid", () => { test("simple set", () => { expect( genesetsReducer(undefined, { - type: "geneset: set tid", + type: "sampleset: set tid", tid: 1, }) ).toMatchObject({ lastTid: 1 }); @@ -503,7 +503,7 @@ describe("geneset: set tid", () => { genesetsReducer( { lastTid: 1 }, { - type: "geneset: set tid", + type: "sampleset: set tid", tid: "0", } ); @@ -515,7 +515,7 @@ describe("geneset: set tid", () => { genesetsReducer( { lastTid: 1 }, { - type: "geneset: set tid", + type: "sampleset: set tid", tid: 0, } ); diff --git a/client/__tests__/reducers/genesetsUI.test.js b/client/__tests__/reducers/genesetsUI.test.js index 0c0ca6a57..b2ac66658 100644 --- a/client/__tests__/reducers/genesetsUI.test.js +++ b/client/__tests__/reducers/genesetsUI.test.js @@ -5,7 +5,7 @@ import genesetsUIReducer from "../../src/reducers/genesetsUI"; const initialState = { createGenesetModeActive: false, isEditingGenesetName: false, - isAddingGenesToGeneset: false, + sampleset: false, }; /* initial */ @@ -17,58 +17,58 @@ describe("geneset UI states", () => { }) ).toMatchObject(initialState); }); - test("geneset: activate add new geneset mode", () => { + test("sampleset: activate add new sampleset mode", () => { expect( genesetsUIReducer(initialState, { - type: "geneset: activate add new geneset mode", + type: "sampleset: activate add new sampleset mode", }) ).toMatchObject({ createGenesetModeActive: true, isEditingGenesetName: false, - isAddingGenesToGeneset: false, + sampleset: false, }); }); - test("geneset: disable create geneset mode", () => { + test("sampleset: disable create sampleset mode", () => { expect( genesetsUIReducer(undefined, { isEditingGenesetName: false }) ).toMatchObject(initialState); }); - test("activate add new genes mode", () => { + test("activate add new samples mode", () => { expect( genesetsUIReducer(undefined, { - type: "geneset: activate add new genes mode", - geneset: "a geneset name", + type: "sampleset: activate add new samples mode", + sampleset: "a sampleset name", }) ).toMatchObject({ createGenesetModeActive: false, isEditingGenesetName: false, - isAddingGenesToGeneset: "a geneset name", + sampleset: "a sampleset name", }); }); - test("disable create geneset mode", () => { + test("disable create sampleset mode", () => { expect( genesetsUIReducer(undefined, { - type: "geneset: disable create geneset mode", + type: "sampleset: disable create sampleset mode", }) ).toMatchObject(initialState); }); - test("activate rename geneset mode", () => { + test("activate rename sampleset mode", () => { expect( genesetsUIReducer(undefined, { - type: "geneset: activate rename geneset mode", - data: "a geneset name", + type: "sampleset: activate rename sampleset mode", + data: "a sampleset name", }) ).toMatchObject({ createGenesetModeActive: false, - isEditingGenesetName: "a geneset name", - isAddingGenesToGeneset: false, + isEditingGenesetName: "a sampleset name", + sampleset: false, }); }); - test("disable rename geneset mode", () => { + test("disable rename sampleset mode", () => { expect( genesetsUIReducer(undefined, { - type: "geneset: disable rename geneset mode", + type: "sampleset: disable rename sampleset mode", }) ).toMatchObject(initialState); }); diff --git a/client/configuration/webpack/obsoleteHTMLTemplate.html b/client/configuration/webpack/obsoleteHTMLTemplate.html index d5ca7df48..f58847db6 100644 --- a/client/configuration/webpack/obsoleteHTMLTemplate.html +++ b/client/configuration/webpack/obsoleteHTMLTemplate.html @@ -22,7 +22,7 @@ >
-
+
Unsupported Browser
-
- cellxgene is currently supported on the following browsers +
+ proteinxlocation is currently supported on the following browsers
-
+
Chrome > 60
Firefox ≥ 60
Edge ≥ 79
diff --git a/client/index.html b/client/index.html index 1fd68f2b6..d2ac5bb4b 100644 --- a/client/index.html +++ b/client/index.html @@ -3,7 +3,7 @@ - CELL×GENE | Annotate + PROTEIN×LOCATION | Annotate