Skip to content

Commit

Permalink
DSEGOF-16 Fix tests broken by making time channel default in the store
Browse files Browse the repository at this point in the history
  • Loading branch information
louise-davies committed Sep 7, 2023
1 parent 7cd7f9b commit e8aaec0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/api/records.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ describe('records api functions', () => {

params.append('skip', '0');
params.append('limit', '25');
params.append('projection', `metadata.${timeChannelName}`);

expect(request.url.searchParams.toString()).toEqual(params.toString());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,25 +195,25 @@ exports[`Channels Dialogue renders channels dialogue when dialogue is open 1`] =
>
<span
aria-disabled="true"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-colorPrimary Mui-disabled MuiCheckbox-root MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
class="MuiButtonBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary Mui-disabled PrivateSwitchBase-root MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary Mui-disabled MuiCheckbox-root MuiCheckbox-indeterminate MuiCheckbox-colorPrimary css-12wnr2w-MuiButtonBase-root-MuiCheckbox-root"
tabindex="-1"
>
<input
aria-labelledby="checkbox-list-label-system"
class="PrivateSwitchBase-input css-1m9pwf3"
data-indeterminate="false"
data-indeterminate="true"
disabled=""
type="checkbox"
/>
<svg
aria-hidden="true"
class="MuiSvgIcon-root MuiSvgIcon-fontSizeSmall css-ptiqhd-MuiSvgIcon-root"
data-testid="CheckBoxOutlineBlankIcon"
data-testid="IndeterminateCheckBoxIcon"
focusable="false"
viewBox="0 0 24 24"
>
<path
d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
/>
</svg>
</span>
Expand Down
7 changes: 4 additions & 3 deletions src/session/sessionSaveButtons.component.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import SessionSaveButtons, {
} from './sessionSaveButtons.component';
import { renderComponentWithProviders } from '../setupTests';
import { useEditSession, useSaveSession } from '../api/sessions';
import { timeChannelName } from '../app.types';

// Mock the useEditSession hook
jest.mock('../api/sessions', () => ({
Expand Down Expand Up @@ -89,7 +90,7 @@ describe('session buttons', () => {
session: {
table: {
columnStates: {},
selectedColumnIds: [],
selectedColumnIds: [timeChannelName],
page: 0,
resultsPerPage: 25,
sort: {},
Expand Down Expand Up @@ -130,7 +131,7 @@ describe('session buttons', () => {
session: {
table: {
columnStates: {},
selectedColumnIds: [],
selectedColumnIds: [timeChannelName],
page: 0,
resultsPerPage: 25,
sort: {},
Expand Down Expand Up @@ -178,7 +179,7 @@ describe('session buttons', () => {
session: {
table: {
columnStates: {},
selectedColumnIds: [],
selectedColumnIds: [timeChannelName],
page: 0,
resultsPerPage: 25,
sort: {},
Expand Down

0 comments on commit e8aaec0

Please sign in to comment.