Skip to content

Commit

Permalink
Updated query skips and updated mock order on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro-Vega committed Jan 16, 2025
1 parent 8efdb23 commit 8581bdb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/DataSubmissions/QualityControlFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const QualityControlFilters = ({ issueType, isAggregated, onChange }: Props) =>
sortDirection: "asc",
},
context: { clientName: "backend" },
skip: !submissionID,
skip: !submissionID || isAggregated,
fetchPolicy: "cache-and-network",
});

Expand All @@ -107,7 +107,7 @@ const QualityControlFilters = ({ issueType, isAggregated, onChange }: Props) =>
sortDirection: "asc",
},
context: { clientName: "backend" },
skip: !submissionID,
skip: !submissionID || isAggregated,
fetchPolicy: "cache-and-network",
});

Expand All @@ -116,7 +116,7 @@ const QualityControlFilters = ({ issueType, isAggregated, onChange }: Props) =>
{
variables: { id: submissionID },
context: { clientName: "backend" },
skip: !submissionID,
skip: !submissionID || isAggregated,
fetchPolicy: "cache-and-network",
}
);
Expand Down
4 changes: 2 additions & 2 deletions src/content/dataSubmissions/QualityControl.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ describe("General", () => {
const { getByTestId } = render(<QualityControl />, {
wrapper: ({ children }) => (
<TestParent
mocks={[mocks, nodesMock, batchesMock, issueTypesMock, aggMocks]}
mocks={[aggMocks, mocks, nodesMock, batchesMock, issueTypesMock]}
submission={{ _id: "test-network-error" }}
>
{children}
Expand Down Expand Up @@ -311,7 +311,7 @@ describe("General", () => {
const { getByTestId } = render(<QualityControl />, {
wrapper: ({ children }) => (
<TestParent
mocks={[mocks, nodesMock, batchesMock, issueTypesMock, aggMocks]}
mocks={[aggMocks, mocks, nodesMock, batchesMock, issueTypesMock]}
submission={{ _id: "test-graphql-error" }}
>
{children}
Expand Down

0 comments on commit 8581bdb

Please sign in to comment.