Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 226 additions & 0 deletions src/pages/sponsors/__tests__/edit-sponsor-page.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
import React from "react";
import userEvent from "@testing-library/user-event";
import { act, screen } from "@testing-library/react";
import EditSponsorPage, {
getFragmentFromValue,
getTabFromUrlFragment
} from "../edit-sponsor-page";
import { renderWithRedux } from "../../../utils/test-utils";
import {
DEFAULT_STATE as currentSponsorDefaultState
} from "../../../reducers/sponsors/sponsor-reducer";
import {
DEFAULT_ENTITY as defaultSummitEntity,
DEFAULT_STATE as currentSummitDefaultState
} from "../../../reducers/summits/current-summit-reducer";

global.window = { location: { pathname: "/sponsor-forms/items" } };
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Step 1: Verify EditSponsorPage uses hashchange/addEventListener so the real window APIs are required
rg -n "hashchange|addEventListener\(|window\.location\.hash" src/pages/sponsors/edit-sponsor-page.js

Repository: fntechgit/summit-admin

Length of output: 207


🏁 Script executed:

# Step 2: Examine the test file around line 17 to understand context
head -50 src/pages/sponsors/__tests__/edit-sponsor-page.test.js | cat -n

Repository: fntechgit/summit-admin

Length of output: 2017


🏁 Script executed:

# Step 3: Check if there are hash-change tests and understand what the test is doing
rg -n "hashchange|addEventListener|location\.hash" src/pages/sponsors/__tests__/edit-sponsor-page.test.js -A 3 -B 3

Repository: fntechgit/summit-admin

Length of output: 1833


🏁 Script executed:

# Step 4: Examine the actual component implementation to understand hash handling
cat -n src/pages/sponsors/edit-sponsor-page.js | head -150

Repository: fntechgit/summit-admin

Length of output: 5445


🏁 Script executed:

# Step 5: Look for useEffect and hash change logic in the component
rg -n "useEffect|hashchange|addEventListener" src/pages/sponsors/edit-sponsor-page.js -B 2 -A 5

Repository: fntechgit/summit-admin

Length of output: 873


🏁 Script executed:

# Step 6: Check if there's any listener setup or initialization in the component
sed -n '50,200p' src/pages/sponsors/edit-sponsor-page.js | cat -n

Repository: fntechgit/summit-admin

Length of output: 5213


🏁 Script executed:

# Check the specific test that asserts hash value at line 150
sed -n '140,160p' src/pages/sponsors/__tests__/edit-sponsor-page.test.js | cat -n

Repository: fntechgit/summit-admin

Length of output: 732


🏁 Script executed:

# Check if there are any other tests that involve hash manipulation or tab changes
rg -n "should change the tab|fragment change" src/pages/sponsors/__tests__/edit-sponsor-page.test.js -A 20

Repository: fntechgit/summit-admin

Length of output: 652


🏁 Script executed:

# Check what the full test file looks like to understand the testing strategy
wc -l src/pages/sponsors/__tests__/edit-sponsor-page.test.js

Repository: fntechgit/summit-admin

Length of output: 124


🏁 Script executed:

# Check where originalWindowLocation is defined and what it contains
rg -n "originalWindowLocation" src/pages/sponsors/__tests__/edit-sponsor-page.test.js -B 5 -A 2

Repository: fntechgit/summit-admin

Length of output: 1197


🏁 Script executed:

# View the complete test to understand setup/teardown
head -30 src/pages/sponsors/__tests__/edit-sponsor-page.test.js | cat -n

Repository: fntechgit/summit-admin

Length of output: 1348


🏁 Script executed:

# Check if there's a beforeEach or beforeAll that might be resetting window
rg -n "beforeEach|beforeAll|afterEach|afterAll" src/pages/sponsors/__tests__/edit-sponsor-page.test.js -A 5

Repository: fntechgit/summit-admin

Length of output: 245


Remove the global.window override — it prevents JSDOM's Location API from functioning properly.

Line 17 replaces the entire JSDOM window with a minimal stub. This becomes the "reference" used by tests, preventing proper Location semantics when later tests try to mock window.location.hash. Remove the override and keep the real JSDOM window; tests already reset window.location as needed via Object.defineProperty in their setup.

Fix
- global.window = { location: { pathname: "/sponsor-forms/items" } };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
global.window = { location: { pathname: "/sponsor-forms/items" } };
🤖 Prompt for AI Agents
In `@src/pages/sponsors/__tests__/edit-sponsor-page.test.js` at line 17, Remove
the global.window override that stubs the entire JSDOM window (the line
`global.window = { location: { pathname: "/sponsor-forms/items" } };`) so tests
use the real JSDOM window and its Location API; rely on existing test setup that
uses Object.defineProperty to modify window.location or window.location.hash
when needed, and ensure no other tests expect the stubbed object.

jest.mock(
"../sponsor-forms-tab/components/manage-items/sponsor-forms-manage-items.js"
);
jest.mock("../sponsor-users-list-per-sponsor/index.js");

describe("EditSponsorPage", () => {
describe("getFragmentFromValue", () => {
it("returns correct values", () => {
const result1 = getFragmentFromValue(0);
expect(result1).toBe("general");

const result2 = getFragmentFromValue(2);
expect(result2).toBe("pages");

const result3 = getFragmentFromValue(3);
expect(result3).toBe("media_uploads");

const result4 = getFragmentFromValue(7);
expect(result4).toBe("badge_scans");
});
});

describe("getTabFromUrlFragment", () => {
it("returns correct values for defined fragments", () => {
const newUrl1 = "#general";
window.location.hash = newUrl1;

const result1 = getTabFromUrlFragment();
expect(result1).toBe(0);

const newUrl2 = "#pages";
window.location.hash = newUrl2;

const result2 = getTabFromUrlFragment();
expect(result2).toBe(2);

const newUrl3 = "#media_uploads";
window.location.hash = newUrl3;

const result3 = getTabFromUrlFragment();
expect(result3).toBe(3);

const newUrl4 = "#badge_scans";
window.location.hash = newUrl4;

const result4 = getTabFromUrlFragment();
expect(result4).toBe(7);
});

it("returns correct values for undefined fragments", () => {
const newUrl1 = "#generalx";
window.location.hash = newUrl1;

const result1 = getTabFromUrlFragment();
expect(result1).toBe(0);

const newUrl2 = "#frewawqfwedwdwqq";
window.location.hash = newUrl2;

const result2 = getTabFromUrlFragment();
expect(result2).toBe(0);

const newUrl3 = "#";
window.location.hash = newUrl3;

const result3 = getTabFromUrlFragment();
expect(result3).toBe(0);

const newUrl4 = "";
window.location.hash = newUrl4;

const result4 = getTabFromUrlFragment();
expect(result4).toBe(0);
});
});

describe("Component", () => {
const originalWindowLocation = window.location;
it("should change the url fragment on tab click", async () => {
delete window.location;

Object.defineProperty(window, "location", {
configurable: true,
writable: true,
value: {
...originalWindowLocation,
hash: "#general"
}
});

renderWithRedux(
<EditSponsorPage
history={{}}
location={{
pathname: "/sponsor-forms/items"
}}
match={{}}
/>,
{
initialState: {
currentSummitState: {
currentSummit: defaultSummitEntity,
...currentSummitDefaultState
},
loggedUserState: {
member: {
groups: {}
}
},
currentSummitSponsorshipListState: {
sponsorships: [],
currentPage: 1,
lastPage: 1,
perPage: 100,
order: "order",
orderDir: 1,
totalSponsorships: 0
},
currentSponsorState: {
sponsorships: [],
...currentSponsorDefaultState
}
}
}
);

const usersTabReference = screen.getByText("edit_sponsor.tab.forms");

await act(async () => {
await userEvent.click(usersTabReference);
});

expect(window.location.hash).toBe("forms");
});
Comment on lines +144 to +151
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, find and read the test file
cat -n src/pages/sponsors/__tests__/edit-sponsor-page.test.js | head -200

Repository: fntechgit/summit-admin

Length of output: 6883


🏁 Script executed:

# Find and read the EditSponsorPage component
cat -n src/pages/sponsors/edit-sponsor-page.js | head -300

Repository: fntechgit/summit-admin

Length of output: 11190


Fix hash format to match JSDOM behavior.
window.location.hash always includes the leading # when accessed in real JSDOM. The component assigns "forms" (line 129 of edit-sponsor-page.js calls getFragmentFromValue() which returns fragment values without #), but the test assertion should expect the actual stored value with the # prefix.

🔧 Suggested fix
-      expect(window.location.hash).toBe("forms");
+      expect(window.location.hash).toBe("#forms");
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const usersTabReference = screen.getByText("edit_sponsor.tab.forms");
await act(async () => {
await userEvent.click(usersTabReference);
});
expect(window.location.hash).toBe("forms");
});
const usersTabReference = screen.getByText("edit_sponsor.tab.forms");
await act(async () => {
await userEvent.click(usersTabReference);
});
expect(window.location.hash).toBe("#forms");
});
🤖 Prompt for AI Agents
In `@src/pages/sponsors/__tests__/edit-sponsor-page.test.js` around lines 144 -
151, The test's assertion expects window.location.hash without the leading '#'
but JSDOM stores hashes with the '#' prefix; update the assertion in
src/pages/sponsors/__tests__/edit-sponsor-page.test.js to expect "#forms"
instead of "forms" (the component sets the fragment via getFragmentFromValue()
in edit-sponsor-page.js which returns values without '#', but
window.location.hash will include it). Ensure any other assertions in this test
that check window.location.hash are adjusted the same way.


it("should change the tab rendered on fragment change", async () => {
delete window.location;

Object.defineProperty(window, "location", {
configurable: true,
writable: true,
value: {
...originalWindowLocation,
hash: "#general"
}
});

renderWithRedux(
<EditSponsorPage
history={{}}
location={{
pathname: "/sponsor-forms/items"
}}
match={{}}
/>,
{
initialState: {
currentSummitState: {
currentSummit: defaultSummitEntity,
...currentSummitDefaultState
},
loggedUserState: {
member: {
groups: {}
}
},
currentSummitSponsorshipListState: {
sponsorships: [],
currentPage: 1,
lastPage: 1,
perPage: 100,
order: "order",
orderDir: 1,
totalSponsorships: 0
},
currentSponsorState: {
sponsorships: [],
...currentSponsorDefaultState
}
}
}
);

const generalTabPanel = screen.getByTestId("simple-tabpanel-0");
expect(generalTabPanel).toBeDefined();

delete window.location;

Object.defineProperty(window, "location", {
configurable: true,
writable: true,
value: {
...originalWindowLocation,
hash: "#users"
}
});

const usersTabPanel = screen.getByTestId("simple-tabpanel-1");
expect(usersTabPanel).toBeDefined();
});
Comment on lines +153 to +217
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, confirm the test file exists and check the code around lines 153-217
fd "edit-sponsor-page.test.js" --type f

Repository: fntechgit/summit-admin

Length of output: 120


🏁 Script executed:

# Find and explore the test file
cat -n "src/pages/sponsors/__tests__/edit-sponsor-page.test.js" | sed -n '140,220p'

Repository: fntechgit/summit-admin

Length of output: 2648


🏁 Script executed:

# Check the EditSponsorPage component to see how it handles hash changes
fd "edit-sponsor-page" --type f | grep -v test | grep -v ".test"

Repository: fntechgit/summit-admin

Length of output: 105


🏁 Script executed:

# Examine the EditSponsorPage component to understand how it handles hash changes
cat -n "src/pages/sponsors/edit-sponsor-page.js" | head -150

Repository: fntechgit/summit-admin

Length of output: 5445


🏁 Script executed:

# Search for hashchange or hash-related event listeners in the component
rg "hashchange|window.location.hash|hash" "src/pages/sponsors/edit-sponsor-page.js" -A 3 -B 2

Repository: fntechgit/summit-admin

Length of output: 502


🏁 Script executed:

# Check if the component uses useEffect to listen to hash changes
ast-grep --pattern 'useEffect($$$)' "src/pages/sponsors/edit-sponsor-page.js"

Repository: fntechgit/summit-admin

Length of output: 1168


🏁 Script executed:

# Check the test setup and imports to see what testing utilities are available
cat -n "src/pages/sponsors/__tests__/edit-sponsor-page.test.js" | head -50

Repository: fntechgit/summit-admin

Length of output: 2017


🏁 Script executed:

# Search for how hashchange is handled elsewhere in tests
rg "hashchange|HashChangeEvent" --type js -i

Repository: fntechgit/summit-admin

Length of output: 164


🏁 Script executed:

# Check if there's a custom hook or utility for managing hash-based routing
rg "getTabFromUrlFragment|getFragmentFromValue" --type js -A 2 -B 2

Repository: fntechgit/summit-admin

Length of output: 6929


🏁 Script executed:

# Check if there are other tests that use hashchange or similar patterns
rg "hashchange|HashChangeEvent|window.dispatchEvent" --type js -B 2 -A 2

Repository: fntechgit/summit-admin

Length of output: 488


🏁 Script executed:

# Look at the complete test to see if there's proper act() wrapping or waitFor
cat -n "src/pages/sponsors/__tests__/edit-sponsor-page.test.js" | sed -n '100,220p'

Repository: fntechgit/summit-admin

Length of output: 3955


🏁 Script executed:

# Check package.json to see what testing libraries are available
rg "testing-library|jest" package.json

Repository: fntechgit/summit-admin

Length of output: 525


🏁 Script executed:

# Check if the component has any hashchange event listeners
cat -n "src/pages/sponsors/edit-sponsor-page.js" | grep -A 20 "useEffect"

Repository: fntechgit/summit-admin

Length of output: 1893


🏁 Script executed:

# Verify the CustomTabPanel implementation to understand the hidden/visibility logic
cat -n "src/pages/sponsors/edit-sponsor-page.js" | sed -n '69,84p'

Repository: fntechgit/summit-admin

Length of output: 570


🏁 Script executed:

# Check if other components in the codebase listen to hashchange and how they do it
rg "addEventListener.*hash|window.onhashchange" --type js -B 3 -A 5

Repository: fntechgit/summit-admin

Length of output: 788


🏁 Script executed:

# Check how other tests in this file handle async state changes and waits
cat -n "src/pages/sponsors/__tests__/edit-sponsor-page.test.js" | sed -n '70,105p'

Repository: fntechgit/summit-admin

Length of output: 1237


🏁 Script executed:

# Search for patterns of waiting for effects in similar tests
rg "waitFor|act.*hash|fireEvent" "src/pages/sponsors/__tests__/edit-sponsor-page.test.js" -A 3 -B 1

Repository: fntechgit/summit-admin

Length of output: 48


🏁 Script executed:

# Check if there are other tests that verify visibility of rendered elements
rg "toBeVisible|hidden|role.*tabpanel" --type js -B 2 -A 2 | head -40

Repository: fntechgit/summit-admin

Length of output: 3005


🏁 Script executed:

# Let's look at the complete test and see if there's any waiting mechanism
cat -n "src/pages/sponsors/__tests__/edit-sponsor-page.test.js" | sed -n '150,225p'

Repository: fntechgit/summit-admin

Length of output: 2503


🏁 Script executed:

# Check if renderWithRedux or test setup does anything special with effects
rg "renderWithRedux|beforeEach|afterEach" "src/pages/sponsors/__tests__/edit-sponsor-page.test.js" -A 10 -B 1

Repository: fntechgit/summit-admin

Length of output: 1185


🏁 Script executed:

# Verify how React's useEffect dependency works - check if the component actually responds to hash changes at runtime
cat -n "src/pages/sponsors/edit-sponsor-page.js" | sed -n '119,135p'

Repository: fntechgit/summit-admin

Length of output: 640


🏁 Script executed:

# Check if there are any imports of fireEvent or other event simulation tools in the test
head -30 "src/pages/sponsors/__tests__/edit-sponsor-page.test.js"

Repository: fntechgit/summit-admin

Length of output: 1138


🏁 Script executed:

# Verify if jest-dom provides toBeVisible matcher
rg "jest-dom|toBeVisible|toHaveAttribute" "src/pages/sponsors/__tests__/edit-sponsor-page.test.js"

Repository: fntechgit/summit-admin

Length of output: 48


🏁 Script executed:

# Check if the component implementation actually listens to hashchange events
rg "addEventListener.*hashchange|on.*hashchange|onhashchange" "src/pages/sponsors/edit-sponsor-page.js"

Repository: fntechgit/summit-admin

Length of output: 48


🏁 Script executed:

# Check if jest-dom is set up in a setup file
fd "setup" --type f | grep -i jest

Repository: fntechgit/summit-admin

Length of output: 48


🏁 Script executed:

# Look for jest configuration to see if jest-dom is imported
rg "setupFilesAfterEnv|testEnvironment" package.json -A 3

Repository: fntechgit/summit-admin

Length of output: 170


🏁 Script executed:

# Test a hypothesis: check if the component would even work correctly with the dependency on window.location.hash
# Search for similar useEffect patterns with window.location
rg "useEffect.*window.location|dependency.*window" --type js -B 2 -A 3

Repository: fntechgit/summit-admin

Length of output: 48


🏁 Script executed:

# Let's check the test setup file to understand the environment better
cat "testSetupFile.js" | head -50

Repository: fntechgit/summit-admin

Length of output: 182


🏁 Script executed:

# Verify if the CustomTabPanel's hidden attribute actually hides elements testable with toBeVisible
rg "hidden.*attribute|aria-hidden|display.*none" "src/pages/sponsors/edit-sponsor-page.js" -B 2 -A 2

Repository: fntechgit/summit-admin

Length of output: 48


🏁 Script executed:

# Let's trace through what happens - check if there's any event listener setup elsewhere
rg "addEventListener" "src/pages/sponsors/edit-sponsor-page.js"

Repository: fntechgit/summit-admin

Length of output: 48


🏁 Script executed:

# Check the complete rendering of the component to see all tabs
cat -n "src/pages/sponsors/edit-sponsor-page.js" | sed -n '170,250p'

Repository: fntechgit/summit-admin

Length of output: 3688


🏁 Script executed:

# Verify the exact behavior: does the component update when window.location.hash changes at runtime?
# Let's check if maybe there's a different mechanism (like router props) that drives updates
cat -n "src/pages/sponsors/edit-sponsor-page.js" | sed -n '90,130p'

Repository: fntechgit/summit-admin

Length of output: 1384


Assert tab visibility, not just existence.

The test changes window.location.hash but doesn't wait for the component to respond, and only checks toBeDefined() on tab panels. Since CustomTabPanel renders all panels in the DOM (with hidden={value !== index}), checking existence is a false positive—panels exist but may be hidden. Assert that the active panel is visible and the previous one is not.

🔧 Suggested fix
      Object.defineProperty(window, "location", {
        configurable: true,
        writable: true,
        value: {
          ...originalWindowLocation,
          hash: "#users"
        }
      });
+      window.dispatchEvent(new HashChangeEvent("hashchange"));
 
       const usersTabPanel = screen.getByTestId("simple-tabpanel-1");
-      expect(usersTabPanel).toBeDefined();
+      expect(usersTabPanel).toBeVisible();
+      expect(generalTabPanel).not.toBeVisible();
🤖 Prompt for AI Agents
In `@src/pages/sponsors/__tests__/edit-sponsor-page.test.js` around lines 153 -
217, The test currently only checks existence of tab panels which is a false
positive because CustomTabPanel renders all panels hidden/visible; update the
test to wait for the component to react to the hash change (use waitFor or
findByTestId) and assert visibility instead of mere existence: after setting
location.hash="#general" wait for simple-tabpanel-0 to be visible
(expect(...).toBeVisible()) and that simple-tabpanel-1 is hidden
(expect(...).not.toBeVisible() or expect(...).toHaveAttribute('hidden')); then
after setting hash="#users" wait for simple-tabpanel-1 to be visible and assert
simple-tabpanel-0 is hidden. Use screen.findByTestId or waitFor +
screen.getByTestId and the jest-dom matchers to check visibility; target the
test wrapping EditSponsorPage and the simple-tabpanel-* test ids.


afterEach(() => {
Object.defineProperty(window, "location", {
configurable: true,
value: originalWindowLocation
});
});
});
});
36 changes: 28 additions & 8 deletions src/pages/sponsors/edit-sponsor-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,35 @@ import SponsorCartTab from "./sponsor-cart-tab";
import SponsorFormsManageItems from "./sponsor-forms-tab/components/manage-items/sponsor-forms-manage-items";
import { SPONSOR_TABS } from "../../utils/constants";

const CustomTabPanel = (props) => {
export const tabsToFragmentMap = [
"general",
"users",
"pages",
"media_uploads",
"forms",
"cart",
"purchases",
"badge_scans"
];

export const getFragmentFromValue = (index) => tabsToFragmentMap[index];

export const getTabFromUrlFragment = () => {
const result = tabsToFragmentMap.indexOf(
window.location.hash.replace("#", "")
);
return result > -1 ? result : 0;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the initial load
general tab should be selected hence #general should be show by default

 if (result > -1) return result;

  if (window.location.hash) window.location.hash = "general";
  return 0
```;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup! If the general fragment is provided, then it will use it. If not it will retrieve 0, which means use the general fragment. Note that the general fragment is included on the 0 position of the array above the function. I think this function is performing what you mean.

};

export const CustomTabPanel = (props) => {
const { children, value, index, ...other } = props;

return (
<div
role="tabpanel"
hidden={value !== index}
id={`simple-tabpanel-${index}`}
data-testid={`simple-tabpanel-${index}`}
aria-labelledby={`simple-tab-${index}`}
{...other}
>
Expand Down Expand Up @@ -97,16 +118,15 @@ const EditSponsorPage = (props) => {
getExtraQuestionMeta
} = props;

const [selectedTab, setSelectedTab] = useState(
location.pathname.includes("/sponsor-forms/") &&
location.pathname.includes("/items")
? SPONSOR_TABS.FORMS
: 0
);
const [selectedTab, setSelectedTab] = useState(getTabFromUrlFragment());

useEffect(() => {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niko-exo
rite now the tab selection only updates from the URL hash on initial page load. The effect useEffect(..., [window.location.hash]) won’t reliably fire on hash updates because changing window.location.hash doesn’t trigger a React re-render.

To support SPA-style hash navigation (manual hash edits, back/forward), please replace that effect with a hashchange listener

setSelectedTab(getTabFromUrlFragment());
}, [window.location.hash]);

const handleTabChange = (event, newValue) => {
setSelectedTab(newValue);
history.push(`/app/summits/${currentSummit.id}/sponsors/${entity.id}`);
window.location.hash = getFragmentFromValue(newValue);
};

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/sponsors/sponsor-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const DEFAULT_ENTITY = {
sponsorships_collection: DEFAULT_SPONSORHIPS_STATE
};

const DEFAULT_STATE = {
export const DEFAULT_STATE = {
entity: DEFAULT_ENTITY,
selectedSponsorship: null,
errors: {}
Expand Down
2 changes: 1 addition & 1 deletion src/reducers/summits/current-summit-reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const DEFAULT_PRINT_APP_MARKETING_SETTINGS = {
PRINT_APP_HIDE_FIND_TICKET_BY_FULLNAME: { id: 0, value: false }
};

const DEFAULT_STATE = {
export const DEFAULT_STATE = {
currentSummit: DEFAULT_ENTITY,
errors: {},
loading: true,
Expand Down