Skip to content

Commit

Permalink
fix: Missing published state
Browse files Browse the repository at this point in the history
  • Loading branch information
ptbrowne committed Feb 16, 2024
1 parent 8f5e588 commit e11e4b9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/configurator/configurator-state.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import {
ConfiguratorStateConfiguringChart,
DataSource,
Filters,
MapConfig,
getChartConfig,
MapConfig,
} from "@/config-types";
import {
ConfiguratorStateAction,
applyNonTableDimensionToFilters,
applyTableDimensionToFilters,
ConfiguratorStateAction,
deriveFiltersFromFields,
getFiltersByMappingStatus,
getLocalStorageKey,
Expand Down Expand Up @@ -153,7 +153,11 @@ describe("initChartFromLocalStorage", () => {
it("should initialize from localStorage if valid", async () => {
localStorage.setItem(
getLocalStorageKey("viz1234"),
JSON.stringify({ state: "CONFIGURING_CHART", ...fakeVizFixture })
JSON.stringify({
state: "CONFIGURING_CHART",
published_state: "PUBLISHED",
...fakeVizFixture,
})
);
const state = await initChartStateFromLocalStorage("viz1234");
expect(state).not.toBeUndefined();
Expand Down
1 change: 1 addition & 0 deletions app/docs/columns.docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ ${(
},
chartConfigs: [chartConfig],
activeChartKey: "scatterplot",
published_state: "PUBLISHED",
}}
>
<InteractiveFiltersProvider>
Expand Down
2 changes: 2 additions & 0 deletions app/docs/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const states: ConfiguratorState[] = [
state: "SELECTING_DATASET",
version: CONFIGURATOR_STATE_VERSION,
dataSource: DEFAULT_DATA_SOURCE,
published_state: "PUBLISHED",
chartConfigs: undefined,
layout: undefined,
activeChartKey: undefined,
Expand All @@ -18,6 +19,7 @@ export const states: ConfiguratorState[] = [
state: "CONFIGURING_CHART",
version: CONFIGURATOR_STATE_VERSION,
dataSource: DEFAULT_DATA_SOURCE,
published_state: "PUBLISHED",
layout: {
type: "tab",
meta: {
Expand Down
1 change: 1 addition & 0 deletions app/docs/lines.docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ ${(
version: CONFIGURATOR_STATE_VERSION,
state: "PUBLISHED",
dataSource: { type: "sparql", url: "" },
published_state: "PUBLISHED",
layout: {
type: "tab",
meta: {
Expand Down
1 change: 1 addition & 0 deletions app/docs/scatterplot.docs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ${(
version: CONFIGURATOR_STATE_VERSION,
state: "PUBLISHED",
dataSource: { type: "sparql", url: "" },
published_state: "PUBLISHED",
layout: {
type: "tab",
meta: {
Expand Down

0 comments on commit e11e4b9

Please sign in to comment.