@truedat/qx 7.0.7 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -4
- package/src/api.js +29 -20
- package/src/components/QxRoutes.js +18 -16
- package/src/components/__tests__/__fixtures__/helper.js +187 -0
- package/src/components/common/TestFormWrapper.js +38 -0
- package/src/components/common/__tests__/ResourceSelector.spec.js +18 -7
- package/src/components/common/__tests__/__snapshots__/ResourceSelector.spec.js.snap +0 -12
- package/src/components/common/expressions/__tests__/Condition.spec.js +4 -1
- package/src/components/common/expressions/__tests__/FunctionArgs.spec.js +18 -5
- package/src/components/common/expressions/__tests__/ShapeSelector.spec.js +4 -4
- package/src/components/common/expressions/__tests__/__snapshots__/FunctionArgs.spec.js.snap +10 -2
- package/src/components/common/resourceSelectors/__tests__/DataStructureSelector.spec.js +6 -3
- package/src/components/common/resourceSelectors/__tests__/__snapshots__/DataStructureSelector.spec.js.snap +0 -12
- package/src/components/dataViews/__tests__/DataViewEditor.spec.js +83 -53
- package/src/components/dataViews/__tests__/DataViews.spec.js +14 -1
- package/src/components/dataViews/__tests__/__snapshots__/DataViewEditor.spec.js.snap +93 -4
- package/src/components/dataViews/queryableProperties/__tests__/SelectField.spec.js +13 -6
- package/src/components/functions/__tests__/FunctionEditor.spec.js +2 -34
- package/src/components/functions/__tests__/FunctionParams.spec.js +4 -17
- package/src/components/functions/__tests__/Functions.spec.js +2 -34
- package/src/components/functions/__tests__/__snapshots__/FunctionEditor.spec.js.snap +48 -48
- package/src/components/functions/__tests__/__snapshots__/FunctionParams.spec.js.snap +4 -4
- package/src/components/functions/__tests__/__snapshots__/Functions.spec.js.snap +4 -4
- package/src/components/qualityControls/ControlProperties.js +43 -0
- package/src/components/qualityControls/ControlPropertiesView.js +109 -0
- package/src/components/qualityControls/EditQualityControl.js +5 -21
- package/src/components/qualityControls/IconPopup.js +28 -0
- package/src/components/qualityControls/NewDraftQualityControl.js +4 -13
- package/src/components/qualityControls/NewQualityControl.js +10 -25
- package/src/components/qualityControls/QualityBadge.js +33 -0
- package/src/components/qualityControls/QualityControl.js +11 -53
- package/src/components/qualityControls/QualityControlActions.js +133 -46
- package/src/components/qualityControls/QualityControlEditor.js +114 -135
- package/src/components/qualityControls/QualityControlHeader.js +29 -7
- package/src/components/qualityControls/QualityControlHistory.js +6 -12
- package/src/components/qualityControls/QualityControlQueryModal.js +8 -5
- package/src/components/qualityControls/QualityControlRoutes.js +51 -96
- package/src/components/qualityControls/QualityControlRow.js +21 -2
- package/src/components/qualityControls/QualityControlScores.js +140 -0
- package/src/components/qualityControls/QualityControlTabs.js +24 -23
- package/src/components/qualityControls/QualityControls.js +142 -59
- package/src/components/qualityControls/QualityControlsLabelResults.js +51 -0
- package/src/components/qualityControls/QualityControlsTable.js +69 -43
- package/src/components/qualityControls/ScoreCriteria.js +40 -0
- package/src/components/qualityControls/{ResultCriteria.js → ScoreCriteriaView.js} +26 -42
- package/src/components/qualityControls/__tests__/ControlProperties.spec.js +86 -0
- package/src/components/qualityControls/__tests__/ControlPropertiesView.spec.js +86 -0
- package/src/components/qualityControls/__tests__/EditQualityControl.spec.js +219 -0
- package/src/components/qualityControls/__tests__/IconPopup.spec.js +33 -0
- package/src/components/qualityControls/__tests__/NewDraftQualityControl.spec.js +253 -0
- package/src/components/qualityControls/__tests__/NewQualityControl.spec.js +384 -0
- package/src/components/qualityControls/__tests__/QualityBadge.spec.js +30 -0
- package/src/components/qualityControls/__tests__/QualityControl.spec.js +47 -0
- package/src/components/qualityControls/__tests__/QualityControlActions.spec.js +192 -0
- package/src/components/qualityControls/__tests__/QualityControlCrumbs.spec.js +18 -0
- package/src/components/qualityControls/__tests__/QualityControlEditor.spec.js +296 -0
- package/src/components/qualityControls/__tests__/QualityControlHeader.spec.js +68 -0
- package/src/components/qualityControls/__tests__/QualityControlHistory.spec.js +21 -0
- package/src/components/qualityControls/__tests__/QualityControlQueryModal.spec.js +77 -0
- package/src/components/qualityControls/__tests__/QualityControlRow.spec.js +91 -0
- package/src/components/qualityControls/__tests__/QualityControlScores.spec.js +139 -0
- package/src/components/qualityControls/__tests__/QualityControlTabs.spec.js +20 -0
- package/src/components/qualityControls/__tests__/QualityControls.spec.js +202 -0
- package/src/components/qualityControls/__tests__/QualityControlsLabelResults.spec.js +83 -0
- package/src/components/qualityControls/__tests__/QualityControlsTable.spec.js +38 -0
- package/src/components/qualityControls/__tests__/ScoreCriteria.spec.js +77 -0
- package/src/components/qualityControls/__tests__/ScoreCriteriaView.spec.js +62 -0
- package/src/components/qualityControls/__tests__/__fixtures__/qualityControlHelper.js +281 -0
- package/src/components/qualityControls/__tests__/__snapshots__/ControlProperties.spec.js.snap +151 -0
- package/src/components/qualityControls/__tests__/__snapshots__/ControlPropertiesView.spec.js.snap +290 -0
- package/src/components/qualityControls/__tests__/__snapshots__/EditQualityControl.spec.js.snap +672 -0
- package/src/components/qualityControls/__tests__/__snapshots__/IconPopup.spec.js.snap +10 -0
- package/src/components/qualityControls/__tests__/__snapshots__/NewDraftQualityControl.spec.js.snap +648 -0
- package/src/components/qualityControls/__tests__/__snapshots__/NewQualityControl.spec.js.snap +336 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityBadge.spec.js.snap +11 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControl.spec.js.snap +255 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlActions.spec.js.snap +85 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlCrumbs.spec.js.snap +25 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlEditor.spec.js.snap +930 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHeader.spec.js.snap +127 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlHistory.spec.js.snap +75 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlQueryModal.spec.js.snap +27 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlRow.spec.js.snap +113 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlScores.spec.js.snap +161 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlTabs.spec.js.snap +28 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControls.spec.js.snap +219 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlsLabelResults.spec.js.snap +11 -0
- package/src/components/qualityControls/__tests__/__snapshots__/QualityControlsTable.spec.js.snap +121 -0
- package/src/components/qualityControls/__tests__/__snapshots__/ScoreCriteria.spec.js.snap +186 -0
- package/src/components/qualityControls/__tests__/__snapshots__/ScoreCriteriaView.spec.js.snap +76 -0
- package/src/components/qualityControls/__tests__/qualityByControlMode.spec.js +248 -0
- package/src/components/qualityControls/controlProperties/ErrorCount.js +56 -0
- package/src/components/qualityControls/controlProperties/Ratio.js +79 -0
- package/src/components/qualityControls/controlProperties/__tests__/ErrorCount.spec.js +82 -0
- package/src/components/qualityControls/controlProperties/__tests__/Ratio.spec.js +115 -0
- package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/ErrorCount.spec.js.snap +62 -0
- package/src/components/qualityControls/controlProperties/__tests__/__snapshots__/Ratio.spec.js.snap +143 -0
- package/src/components/qualityControls/qualityByControlMode.js +62 -0
- package/src/components/qualityControls/qualityControlScoresColumns.js +52 -0
- package/src/components/qualityControls/{resultCriterias → scoreCriterias}/Deviation.js +6 -6
- package/src/components/qualityControls/{resultCriterias/ErrorsNumber.js → scoreCriterias/ErrorCount.js} +7 -7
- package/src/components/qualityControls/{resultCriterias → scoreCriterias}/Percentage.js +6 -6
- package/src/components/qualityControls/scoreCriterias/__tests__/Deviation.spec.js +75 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/ErrorCount.spec.js +63 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/Percentage.spec.js +61 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/Deviation.spec.js.snap +58 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/ErrorCount.spec.js.snap +58 -0
- package/src/components/qualityControls/scoreCriterias/__tests__/__snapshots__/Percentage.spec.js.snap +58 -0
- package/src/components/{executions/ExecutionGroupsHeader.js → scores/MyScoreGroups.js} +5 -3
- package/src/components/scores/QualityBar.js +73 -0
- package/src/components/scores/Score.js +32 -0
- package/src/components/scores/ScoreContext.js +3 -0
- package/src/components/scores/ScoreCrumbs.js +40 -0
- package/src/components/scores/ScoreDetails.js +67 -0
- package/src/components/scores/ScoreEvents.js +59 -0
- package/src/components/scores/ScoreGroup.js +83 -0
- package/src/components/scores/ScoreGroupBreadcrumbs.js +25 -0
- package/src/components/{qualityControls/ExecutionForm.js → scores/ScoreGroupForm.js} +11 -13
- package/src/components/scores/ScoreGroupLink.js +18 -0
- package/src/components/scores/ScoreGroupMessage.js +25 -0
- package/src/components/{qualityControls/ExecutionPopup.js → scores/ScoreGroupPopup.js} +13 -22
- package/src/components/scores/ScoreGroupsTable.js +113 -0
- package/src/components/scores/ScoreRoutes.js +32 -0
- package/src/components/{executions/ExecutionStatusDecorator.js → scores/ScoreStatusDecorator.js} +10 -8
- package/src/components/scores/ScoreTabs.js +32 -0
- package/src/components/scores/__tests__/MyScoreGroups.spec.js +31 -0
- package/src/components/scores/__tests__/QualityBar.spec.js +55 -0
- package/src/components/scores/__tests__/Score.spec.js +41 -0
- package/src/components/scores/__tests__/ScoreCrumbs.spec.js +39 -0
- package/src/components/scores/__tests__/ScoreDetails.spec.js +38 -0
- package/src/components/scores/__tests__/ScoreEvents.spec.js +24 -0
- package/src/components/scores/__tests__/ScoreGroup.spec.js +43 -0
- package/src/components/scores/__tests__/ScoreGroupBreadcrumbs.spec.js +16 -0
- package/src/components/scores/__tests__/ScoreGroupForm.spec.js +78 -0
- package/src/components/scores/__tests__/ScoreGroupLink.spec.js +16 -0
- package/src/components/scores/__tests__/ScoreGroupMessage.spec.js +20 -0
- package/src/components/scores/__tests__/ScoreGroupPopup.spec.js +59 -0
- package/src/components/scores/__tests__/ScoreGroupsTable.spec.js +40 -0
- package/src/components/scores/__tests__/ScoreStatusDecorator.spec.js +21 -0
- package/src/components/scores/__tests__/ScoreTabs.spec.js +27 -0
- package/src/components/scores/__tests__/__fixtures__/scoreHelper.js +182 -0
- package/src/components/scores/__tests__/__snapshots__/MyScoreGroups.spec.js.snap +154 -0
- package/src/components/scores/__tests__/__snapshots__/QualityBar.spec.js.snap +24 -0
- package/src/components/scores/__tests__/__snapshots__/Score.spec.js.snap +92 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreCrumbs.spec.js.snap +39 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreDetails.spec.js.snap +156 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreEvents.spec.js.snap +167 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroup.spec.js.snap +103 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupBreadcrumbs.spec.js.snap +29 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupForm.spec.js.snap +145 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupLink.spec.js.snap +15 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupMessage.spec.js.snap +43 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupPopup.spec.js.snap +11 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreGroupsTable.spec.js.snap +147 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreStatusDecorator.spec.js.snap +71 -0
- package/src/components/scores/__tests__/__snapshots__/ScoreTabs.spec.js.snap +43 -0
- package/src/components/scores/index.js +15 -0
- package/src/hooks/useQualityControls.js +3 -9
- package/src/hooks/useScoreGroups.js +23 -0
- package/src/hooks/useScores.js +22 -0
- package/src/styles/Expression.less +16 -0
- package/src/styles/scores.less +63 -0
- package/src/components/executions/ExecutionGroupBreadcrumbs.js +0 -25
- package/src/components/executions/ExecutionGroupContent.js +0 -42
- package/src/components/executions/ExecutionGroupLink.js +0 -18
- package/src/components/executions/ExecutionGroupMessage.js +0 -27
- package/src/components/executions/ExecutionGroupsTable.js +0 -101
- package/src/components/executions/executionGroupDetail.js +0 -87
- package/src/components/qualityControls/ResultType.js +0 -57
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import { messages } from "@truedat/qx/components/__tests__/__fixtures__/helper";
|
|
4
|
+
import ScoreGroupMessage from "../ScoreGroupMessage";
|
|
5
|
+
|
|
6
|
+
const renderOpts = { messages };
|
|
7
|
+
|
|
8
|
+
describe("<ScoreGroupMessage />", () => {
|
|
9
|
+
it("matches the latest snapshot for pending", () => {
|
|
10
|
+
const { container } = render(
|
|
11
|
+
<ScoreGroupMessage pending={10} />,
|
|
12
|
+
renderOpts
|
|
13
|
+
);
|
|
14
|
+
expect(container).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it("matches the latest snapshot for count", () => {
|
|
17
|
+
const { container } = render(<ScoreGroupMessage count={8} />, renderOpts);
|
|
18
|
+
expect(container).toMatchSnapshot();
|
|
19
|
+
});
|
|
20
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import { waitFor } from "@testing-library/react";
|
|
4
|
+
import userEvent from "@testing-library/user-event";
|
|
5
|
+
import { singleTemplateMock } from "@truedat/test/mocks";
|
|
6
|
+
import { messages } from "@truedat/qx/components/__tests__/__fixtures__/helper";
|
|
7
|
+
import ScoreGroupPopup from "../ScoreGroupPopup";
|
|
8
|
+
|
|
9
|
+
const renderOpts = {
|
|
10
|
+
mocks: [singleTemplateMock({ scope: "qe" })],
|
|
11
|
+
messages,
|
|
12
|
+
fallback: "lazy",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
describe("<ScoreGroupPopup />", () => {
|
|
16
|
+
const onSubmit = jest.fn();
|
|
17
|
+
const props = { count: 1, onSubmit, loading: false };
|
|
18
|
+
|
|
19
|
+
it("matches the latest snapshot", () => {
|
|
20
|
+
const { container } = render(<ScoreGroupPopup {...props} />, renderOpts);
|
|
21
|
+
expect(container).toMatchSnapshot();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("should render button with correct text when count is not 1", () => {
|
|
25
|
+
const { getByRole } = render(<ScoreGroupPopup count={2} />, renderOpts);
|
|
26
|
+
expect(getByRole("button")).toHaveTextContent("Execute quality controls");
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it("should disable the button when disabled is true", () => {
|
|
30
|
+
const { getByRole } = render(
|
|
31
|
+
<ScoreGroupPopup disabled={true} />,
|
|
32
|
+
renderOpts
|
|
33
|
+
);
|
|
34
|
+
expect(getByRole("button")).toBeDisabled();
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
it("should show loading state when loading is true", () => {
|
|
38
|
+
const { getByRole } = render(
|
|
39
|
+
<ScoreGroupPopup loading={true} />,
|
|
40
|
+
renderOpts
|
|
41
|
+
);
|
|
42
|
+
expect(getByRole("button")).toHaveClass("loading");
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("should display execution form on button click", async () => {
|
|
46
|
+
const onSubmit = jest.fn();
|
|
47
|
+
const props = { count: 1, onSubmit, loading: false };
|
|
48
|
+
const { getByRole } = render(<ScoreGroupPopup {...props} />, renderOpts);
|
|
49
|
+
userEvent.click(getByRole("button"));
|
|
50
|
+
|
|
51
|
+
await waitFor(() => {
|
|
52
|
+
expect(getByRole("button", { name: /Create/i })).toBeEnabled();
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
userEvent.click(getByRole("button", { name: /Create/i }));
|
|
56
|
+
|
|
57
|
+
await waitFor(() => expect(onSubmit).toHaveBeenCalledTimes(1));
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import { messages } from "@truedat/qx/components/__tests__/__fixtures__/helper";
|
|
4
|
+
import ScoreGroupsTable from "../ScoreGroupsTable";
|
|
5
|
+
import { useMyScoreGroupsIndex } from "../../../hooks/useScoreGroups";
|
|
6
|
+
|
|
7
|
+
jest.mock("@truedat/qx/hooks/useScoreGroups", () => {
|
|
8
|
+
const { scoreGroupData } = jest.requireActual(
|
|
9
|
+
"@truedat/qx/components/scores/__tests__/__fixtures__/scoreHelper"
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
useMyScoreGroupsIndex: jest.fn(() => ({
|
|
14
|
+
data: {
|
|
15
|
+
data: [
|
|
16
|
+
scoreGroupData({ status_summary: { PENDING: 1, QUEUED: 2 } }),
|
|
17
|
+
scoreGroupData({ status_summary: { SUCCEEDED: 1, FAILED: 3 } }),
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
loading: false,
|
|
21
|
+
})),
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const renderOpts = { messages };
|
|
26
|
+
|
|
27
|
+
describe("<ScoreGroupsTable />", () => {
|
|
28
|
+
it("matches the latest snapshot", () => {
|
|
29
|
+
const { container } = render(<ScoreGroupsTable />, renderOpts);
|
|
30
|
+
expect(container).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
it("matches the latest snapshot for empty list", () => {
|
|
33
|
+
useMyScoreGroupsIndex.mockImplementation(() => ({
|
|
34
|
+
data: { data: [] },
|
|
35
|
+
loading: false,
|
|
36
|
+
}));
|
|
37
|
+
const { container } = render(<ScoreGroupsTable />, renderOpts);
|
|
38
|
+
expect(container).toMatchSnapshot();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import { messages } from "@truedat/qx/components/__tests__/__fixtures__/helper";
|
|
4
|
+
|
|
5
|
+
import ScoreStatusDecorator from "../ScoreStatusDecorator";
|
|
6
|
+
|
|
7
|
+
const renderOpts = {
|
|
8
|
+
messages,
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
describe("<ScoreStatusDecorator />", () => {
|
|
12
|
+
["PENDING", "QUEUED", "STARTED", "SUCCEEDED", "FAILED"].forEach((status) =>
|
|
13
|
+
it(`matches the latest snapshot for status ${status}`, () => {
|
|
14
|
+
const { container } = render(
|
|
15
|
+
<ScoreStatusDecorator id={8} status={status} />,
|
|
16
|
+
renderOpts
|
|
17
|
+
);
|
|
18
|
+
expect(container).toMatchSnapshot();
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { render } from "@truedat/test/render";
|
|
3
|
+
import { messages } from "@truedat/qx/components/__tests__/__fixtures__/helper";
|
|
4
|
+
import ScoreTabs from "../ScoreTabs";
|
|
5
|
+
|
|
6
|
+
jest.mock("react-router-dom", () => ({
|
|
7
|
+
...jest.requireActual("react-router-dom"),
|
|
8
|
+
useParams: () => ({ id: "15" }),
|
|
9
|
+
useLocation: () => ({ pathname: "/scores/15" }),
|
|
10
|
+
}));
|
|
11
|
+
|
|
12
|
+
const renderOpts = { messages };
|
|
13
|
+
|
|
14
|
+
describe("<ScoreTabs />", () => {
|
|
15
|
+
it("matches the latest snapshot for details", () => {
|
|
16
|
+
const { container } = render(<ScoreTabs />, renderOpts);
|
|
17
|
+
expect(container).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("matches the latest snapshot for events", () => {
|
|
21
|
+
jest.spyOn(require("react-router-dom"), "useLocation").mockReturnValue({
|
|
22
|
+
pathname: "/scores/15/events",
|
|
23
|
+
});
|
|
24
|
+
const { container } = render(<ScoreTabs />, renderOpts);
|
|
25
|
+
expect(container).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
export const score = {
|
|
2
|
+
id: 15,
|
|
3
|
+
status: "SUCCEEDED",
|
|
4
|
+
details: { foo: "bar" },
|
|
5
|
+
quality_control_version_id: 1,
|
|
6
|
+
score_type: "ratio",
|
|
7
|
+
quality_control_status: "published",
|
|
8
|
+
execution_timestamp: "2024-11-19T16:34:21.438113Z",
|
|
9
|
+
score_content: {
|
|
10
|
+
total_count: 100,
|
|
11
|
+
validation_count: 50,
|
|
12
|
+
},
|
|
13
|
+
quality_control: {
|
|
14
|
+
id: 8,
|
|
15
|
+
name: "test",
|
|
16
|
+
status: "published",
|
|
17
|
+
version: 1,
|
|
18
|
+
updated_at: "2024-11-20T16:29:57.571985Z",
|
|
19
|
+
df_type: "template1",
|
|
20
|
+
queries: null,
|
|
21
|
+
control_properties: {
|
|
22
|
+
resource: {
|
|
23
|
+
id: 11463387,
|
|
24
|
+
type: "data_structure",
|
|
25
|
+
},
|
|
26
|
+
validation: [
|
|
27
|
+
{
|
|
28
|
+
expressions: [
|
|
29
|
+
{
|
|
30
|
+
value: {
|
|
31
|
+
args: {
|
|
32
|
+
arg1: {
|
|
33
|
+
value: {
|
|
34
|
+
id: 11463389,
|
|
35
|
+
name: "VARIABLE_VALUE",
|
|
36
|
+
type: "string",
|
|
37
|
+
parent_id: 0,
|
|
38
|
+
},
|
|
39
|
+
shape: "field",
|
|
40
|
+
},
|
|
41
|
+
arg2: {
|
|
42
|
+
value: {
|
|
43
|
+
id: 11463388,
|
|
44
|
+
name: "VARIABLE_NAME",
|
|
45
|
+
type: "string",
|
|
46
|
+
parent_id: 0,
|
|
47
|
+
},
|
|
48
|
+
shape: "field",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
name: "gt",
|
|
52
|
+
type: "boolean",
|
|
53
|
+
},
|
|
54
|
+
shape: "function",
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
control_mode: "deviation",
|
|
61
|
+
dynamic_content: {},
|
|
62
|
+
score_criteria: {
|
|
63
|
+
maximum: 30,
|
|
64
|
+
goal: 10,
|
|
65
|
+
},
|
|
66
|
+
version_id: 1,
|
|
67
|
+
},
|
|
68
|
+
firstInVersion: true,
|
|
69
|
+
events: [
|
|
70
|
+
{
|
|
71
|
+
id: 6,
|
|
72
|
+
message: null,
|
|
73
|
+
type: "PENDING",
|
|
74
|
+
inserted_at: "2024-11-20T10:07:37.089731Z",
|
|
75
|
+
score_id: 6,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: 7,
|
|
79
|
+
message: null,
|
|
80
|
+
type: "QUEUED",
|
|
81
|
+
inserted_at: "2024-11-20T10:09:10.812863Z",
|
|
82
|
+
score_id: 6,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: 16,
|
|
86
|
+
message: null,
|
|
87
|
+
type: "STARTED",
|
|
88
|
+
inserted_at: "2024-11-20T11:00:25.249758Z",
|
|
89
|
+
score_id: 6,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 17,
|
|
93
|
+
message: "Info message",
|
|
94
|
+
type: "INFO",
|
|
95
|
+
inserted_at: "2024-11-20T11:05:10.824495Z",
|
|
96
|
+
score_id: 6,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 18,
|
|
100
|
+
message: "Warning message",
|
|
101
|
+
type: "WARNING",
|
|
102
|
+
inserted_at: "2024-11-20T11:07:07.771213Z",
|
|
103
|
+
score_id: 6,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 19,
|
|
107
|
+
message: null,
|
|
108
|
+
type: "SUCCEEDED",
|
|
109
|
+
inserted_at: "2024-11-20T11:09:46.741442Z",
|
|
110
|
+
score_id: 6,
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const scoreGroup = {
|
|
116
|
+
id: 36,
|
|
117
|
+
updated_at: "2025-01-20T13:50:58.260194Z",
|
|
118
|
+
df_type: "Quality Execution",
|
|
119
|
+
inserted_at: "2025-01-20T13:50:58.260194Z",
|
|
120
|
+
created_by: 1,
|
|
121
|
+
scores: [
|
|
122
|
+
{
|
|
123
|
+
id: 15,
|
|
124
|
+
status: "PENDING",
|
|
125
|
+
details: {},
|
|
126
|
+
quality_control: {
|
|
127
|
+
active: true,
|
|
128
|
+
id: 8,
|
|
129
|
+
name: "test",
|
|
130
|
+
status: "published",
|
|
131
|
+
version: 1,
|
|
132
|
+
versions: null,
|
|
133
|
+
domain_ids: [2],
|
|
134
|
+
domains: null,
|
|
135
|
+
updated_at: "2024-11-28T17:03:22.037798Z",
|
|
136
|
+
df_type: "template1",
|
|
137
|
+
queries: null,
|
|
138
|
+
source_id: 181,
|
|
139
|
+
dynamic_content: {
|
|
140
|
+
control_de_calidad: {
|
|
141
|
+
origin: "user",
|
|
142
|
+
value: "CONGROL",
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
control_mode: "percentage",
|
|
146
|
+
control_properties: {
|
|
147
|
+
errors_resource: {
|
|
148
|
+
id: 11859650,
|
|
149
|
+
type: "data_structure",
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
version_id: 2,
|
|
153
|
+
score_criteria: {
|
|
154
|
+
maximum: 20,
|
|
155
|
+
goal: 10,
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
quality_control_version_id: 13,
|
|
159
|
+
score_type: null,
|
|
160
|
+
quality_control_status: null,
|
|
161
|
+
execution_timestamp: null,
|
|
162
|
+
score_content: null,
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
status_summary: null,
|
|
166
|
+
dynamic_content: {
|
|
167
|
+
scheduled: {
|
|
168
|
+
origin: "user",
|
|
169
|
+
value: "No",
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export const scoreData = (props = {}) => ({
|
|
175
|
+
...score,
|
|
176
|
+
...props,
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
export const scoreGroupData = (props = {}) => ({
|
|
180
|
+
...scoreGroup,
|
|
181
|
+
...props,
|
|
182
|
+
});
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<MyScoreGroups /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui segment"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="ui grid"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="eight wide column"
|
|
13
|
+
>
|
|
14
|
+
<h2
|
|
15
|
+
class="ui header"
|
|
16
|
+
>
|
|
17
|
+
<i
|
|
18
|
+
aria-hidden="true"
|
|
19
|
+
class="tasks circular icon"
|
|
20
|
+
/>
|
|
21
|
+
<div
|
|
22
|
+
class="content"
|
|
23
|
+
>
|
|
24
|
+
My score Groups
|
|
25
|
+
</div>
|
|
26
|
+
</h2>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<table
|
|
30
|
+
class="ui celled collapsing striped table"
|
|
31
|
+
>
|
|
32
|
+
<thead
|
|
33
|
+
class=""
|
|
34
|
+
>
|
|
35
|
+
<tr
|
|
36
|
+
class=""
|
|
37
|
+
>
|
|
38
|
+
<th
|
|
39
|
+
class=""
|
|
40
|
+
>
|
|
41
|
+
Created
|
|
42
|
+
</th>
|
|
43
|
+
<th
|
|
44
|
+
class="center aligned"
|
|
45
|
+
>
|
|
46
|
+
Pending
|
|
47
|
+
</th>
|
|
48
|
+
<th
|
|
49
|
+
class="center aligned"
|
|
50
|
+
>
|
|
51
|
+
Queued
|
|
52
|
+
</th>
|
|
53
|
+
<th
|
|
54
|
+
class="center aligned"
|
|
55
|
+
>
|
|
56
|
+
Succeeded
|
|
57
|
+
</th>
|
|
58
|
+
<th
|
|
59
|
+
class="center aligned"
|
|
60
|
+
>
|
|
61
|
+
Failed
|
|
62
|
+
</th>
|
|
63
|
+
</tr>
|
|
64
|
+
</thead>
|
|
65
|
+
<tbody
|
|
66
|
+
class=""
|
|
67
|
+
>
|
|
68
|
+
<tr
|
|
69
|
+
class=""
|
|
70
|
+
>
|
|
71
|
+
<td
|
|
72
|
+
class=""
|
|
73
|
+
>
|
|
74
|
+
<a
|
|
75
|
+
href="/scoreGroups/36"
|
|
76
|
+
>
|
|
77
|
+
<time
|
|
78
|
+
datetime="1737381058260"
|
|
79
|
+
>
|
|
80
|
+
2025-01-20 13:50
|
|
81
|
+
</time>
|
|
82
|
+
</a>
|
|
83
|
+
</td>
|
|
84
|
+
<td
|
|
85
|
+
class="center aligned"
|
|
86
|
+
>
|
|
87
|
+
<div
|
|
88
|
+
class="ui yellow circular label"
|
|
89
|
+
>
|
|
90
|
+
1
|
|
91
|
+
</div>
|
|
92
|
+
</td>
|
|
93
|
+
<td
|
|
94
|
+
class="center aligned"
|
|
95
|
+
>
|
|
96
|
+
<div
|
|
97
|
+
class="ui yellow circular label"
|
|
98
|
+
>
|
|
99
|
+
2
|
|
100
|
+
</div>
|
|
101
|
+
</td>
|
|
102
|
+
<td
|
|
103
|
+
class="center aligned"
|
|
104
|
+
/>
|
|
105
|
+
<td
|
|
106
|
+
class="center aligned"
|
|
107
|
+
/>
|
|
108
|
+
</tr>
|
|
109
|
+
<tr
|
|
110
|
+
class=""
|
|
111
|
+
>
|
|
112
|
+
<td
|
|
113
|
+
class=""
|
|
114
|
+
>
|
|
115
|
+
<a
|
|
116
|
+
href="/scoreGroups/36"
|
|
117
|
+
>
|
|
118
|
+
<time
|
|
119
|
+
datetime="1737381058260"
|
|
120
|
+
>
|
|
121
|
+
2025-01-20 13:50
|
|
122
|
+
</time>
|
|
123
|
+
</a>
|
|
124
|
+
</td>
|
|
125
|
+
<td
|
|
126
|
+
class="center aligned"
|
|
127
|
+
/>
|
|
128
|
+
<td
|
|
129
|
+
class="center aligned"
|
|
130
|
+
/>
|
|
131
|
+
<td
|
|
132
|
+
class="center aligned"
|
|
133
|
+
>
|
|
134
|
+
<div
|
|
135
|
+
class="ui green circular label"
|
|
136
|
+
>
|
|
137
|
+
1
|
|
138
|
+
</div>
|
|
139
|
+
</td>
|
|
140
|
+
<td
|
|
141
|
+
class="center aligned"
|
|
142
|
+
>
|
|
143
|
+
<div
|
|
144
|
+
class="ui red circular label"
|
|
145
|
+
>
|
|
146
|
+
3
|
|
147
|
+
</div>
|
|
148
|
+
</td>
|
|
149
|
+
</tr>
|
|
150
|
+
</tbody>
|
|
151
|
+
</table>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
`;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<QualityBar /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="quality-bar-wrapper"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="quality-bar"
|
|
10
|
+
>
|
|
11
|
+
<span
|
|
12
|
+
class="under-minimum-color"
|
|
13
|
+
style="width: 100%;"
|
|
14
|
+
>
|
|
15
|
+
<span
|
|
16
|
+
class="value"
|
|
17
|
+
>
|
|
18
|
+
50%
|
|
19
|
+
</span>
|
|
20
|
+
</span>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
`;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<Score /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui breadcrumb"
|
|
7
|
+
>
|
|
8
|
+
<a
|
|
9
|
+
class="section"
|
|
10
|
+
href="/qualityControls"
|
|
11
|
+
>
|
|
12
|
+
Quality Controls
|
|
13
|
+
</a>
|
|
14
|
+
<i
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
class="right angle icon divider"
|
|
17
|
+
/>
|
|
18
|
+
<a
|
|
19
|
+
class="section"
|
|
20
|
+
href="/qualityControls/8/scores"
|
|
21
|
+
>
|
|
22
|
+
test
|
|
23
|
+
</a>
|
|
24
|
+
<i
|
|
25
|
+
aria-hidden="true"
|
|
26
|
+
class="right angle icon divider"
|
|
27
|
+
/>
|
|
28
|
+
<div
|
|
29
|
+
class="active section"
|
|
30
|
+
>
|
|
31
|
+
<time
|
|
32
|
+
datetime="1732034061438"
|
|
33
|
+
>
|
|
34
|
+
2024-11-19 16:34
|
|
35
|
+
</time>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div
|
|
39
|
+
class="ui segment"
|
|
40
|
+
>
|
|
41
|
+
<h2
|
|
42
|
+
class="ui header"
|
|
43
|
+
>
|
|
44
|
+
<i
|
|
45
|
+
aria-hidden="true"
|
|
46
|
+
class="line graph circular icon"
|
|
47
|
+
/>
|
|
48
|
+
<div
|
|
49
|
+
class="content"
|
|
50
|
+
>
|
|
51
|
+
Score view
|
|
52
|
+
<div
|
|
53
|
+
class="quality-bar-wrapper"
|
|
54
|
+
>
|
|
55
|
+
<div
|
|
56
|
+
class="quality-bar"
|
|
57
|
+
>
|
|
58
|
+
<span
|
|
59
|
+
class="under-minimum-color"
|
|
60
|
+
style="width: 100%;"
|
|
61
|
+
>
|
|
62
|
+
<span
|
|
63
|
+
class="value"
|
|
64
|
+
>
|
|
65
|
+
50%
|
|
66
|
+
</span>
|
|
67
|
+
</span>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</h2>
|
|
72
|
+
<div
|
|
73
|
+
class="ui pointing secondary top attached tabular menu"
|
|
74
|
+
>
|
|
75
|
+
<a
|
|
76
|
+
class="item"
|
|
77
|
+
href="/scores/8"
|
|
78
|
+
>
|
|
79
|
+
Details
|
|
80
|
+
</a>
|
|
81
|
+
<a
|
|
82
|
+
class="item"
|
|
83
|
+
href="/scores/8/events"
|
|
84
|
+
>
|
|
85
|
+
Events
|
|
86
|
+
</a>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
`;
|
|
91
|
+
|
|
92
|
+
exports[`<Score /> matches the latest snapshot when has no score 1`] = `<div />`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`<ScoreCrumbs /> matches the latest snapshot 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="ui breadcrumb"
|
|
7
|
+
>
|
|
8
|
+
<a
|
|
9
|
+
class="section"
|
|
10
|
+
href="/qualityControls"
|
|
11
|
+
>
|
|
12
|
+
Quality Controls
|
|
13
|
+
</a>
|
|
14
|
+
<i
|
|
15
|
+
aria-hidden="true"
|
|
16
|
+
class="right angle icon divider"
|
|
17
|
+
/>
|
|
18
|
+
<a
|
|
19
|
+
class="section"
|
|
20
|
+
href="/qualityControls/8/scores"
|
|
21
|
+
>
|
|
22
|
+
test
|
|
23
|
+
</a>
|
|
24
|
+
<i
|
|
25
|
+
aria-hidden="true"
|
|
26
|
+
class="right angle icon divider"
|
|
27
|
+
/>
|
|
28
|
+
<div
|
|
29
|
+
class="active section"
|
|
30
|
+
>
|
|
31
|
+
<time
|
|
32
|
+
datetime="1732034061438"
|
|
33
|
+
>
|
|
34
|
+
2024-11-19 16:34
|
|
35
|
+
</time>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
`;
|