@truedat/cx 7.5.7 → 7.5.10

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.
Files changed (110) hide show
  1. package/package.json +40 -70
  2. package/src/configurations/components/Configuration.js +3 -3
  3. package/src/configurations/components/ConfigurationActions.js +1 -2
  4. package/src/configurations/components/ConfigurationBreadcrumbs.js +2 -3
  5. package/src/configurations/components/ConfigurationCards.js +1 -2
  6. package/src/configurations/components/ConfigurationForm.js +6 -11
  7. package/src/configurations/components/ConfigurationLoader.js +1 -2
  8. package/src/configurations/components/ConfigurationRoutes.js +61 -72
  9. package/src/configurations/components/ConfigurationTokenLoader.js +0 -1
  10. package/src/configurations/components/Configurations.js +2 -2
  11. package/src/configurations/components/ConfigurationsLoader.js +0 -1
  12. package/src/configurations/components/DynamicConfigurationForm.js +5 -7
  13. package/src/configurations/components/EditConfiguration.js +0 -1
  14. package/src/configurations/components/NewConfiguration.js +0 -1
  15. package/src/configurations/components/__tests__/Configuration.spec.js +17 -10
  16. package/src/configurations/components/__tests__/ConfigurationCards.spec.js +22 -13
  17. package/src/configurations/components/__tests__/ConfigurationForm.spec.js +5 -5
  18. package/src/configurations/components/__tests__/ConfigurationLoader.spec.js +44 -36
  19. package/src/configurations/components/__tests__/ConfigurationTokenLoader.spec.js +46 -45
  20. package/src/configurations/components/__tests__/Configurations.spec.js +20 -22
  21. package/src/configurations/components/__tests__/ConfigurationsLoader.spec.js +32 -33
  22. package/src/configurations/components/__tests__/EditConfiguration.spec.js +5 -5
  23. package/src/configurations/components/__tests__/NewConfiguration.spec.js +0 -1
  24. package/src/configurations/components/__tests__/__snapshots__/Configuration.spec.js.snap +122 -57
  25. package/src/configurations/components/__tests__/__snapshots__/ConfigurationCards.spec.js.snap +160 -361
  26. package/src/configurations/components/__tests__/__snapshots__/ConfigurationForm.spec.js.snap +7 -6
  27. package/src/configurations/components/__tests__/__snapshots__/ConfigurationLoader.spec.js.snap +5 -31
  28. package/src/configurations/components/__tests__/__snapshots__/ConfigurationTokenLoader.spec.js.snap +5 -9
  29. package/src/configurations/components/__tests__/__snapshots__/Configurations.spec.js.snap +91 -72
  30. package/src/configurations/components/__tests__/__snapshots__/ConfigurationsLoader.spec.js.snap +5 -27
  31. package/src/configurations/components/__tests__/__snapshots__/EditConfiguration.spec.js.snap +12 -10
  32. package/src/configurations/components/__tests__/__snapshots__/NewConfiguration.spec.js.snap +11 -9
  33. package/src/configurations/components/index.js +1 -1
  34. package/src/configurations/reducers/configurationRedirect.js +1 -1
  35. package/src/configurations/reducers/configurations.js +1 -1
  36. package/src/configurations/reducers/index.js +1 -1
  37. package/src/configurations/reducers/systemConfigurations.js +1 -1
  38. package/src/configurations/sagas/signConfiguration.js +3 -1
  39. package/src/jobs/components/Job.js +0 -1
  40. package/src/jobs/components/JobBreadcrumbs.js +2 -3
  41. package/src/jobs/components/JobLoader.js +2 -2
  42. package/src/jobs/components/JobRoutes.js +28 -40
  43. package/src/jobs/components/JobRow.js +4 -4
  44. package/src/jobs/components/Jobs.js +5 -4
  45. package/src/jobs/components/JobsLabelResults.js +2 -3
  46. package/src/jobs/components/JobsSearch.js +0 -1
  47. package/src/jobs/components/JobsTable.js +3 -3
  48. package/src/jobs/components/JobsView.js +0 -1
  49. package/src/jobs/components/SourceJobs.js +0 -1
  50. package/src/jobs/components/__tests__/Job.spec.js +9 -11
  51. package/src/jobs/components/__tests__/JobBreadcrumbs.spec.js +5 -5
  52. package/src/jobs/components/__tests__/JobLoader.spec.js +12 -12
  53. package/src/jobs/components/__tests__/JobRow.spec.js +21 -20
  54. package/src/jobs/components/__tests__/Jobs.spec.js +1 -7
  55. package/src/jobs/components/__tests__/JobsLoader.spec.js +9 -9
  56. package/src/jobs/components/__tests__/JobsTable.spec.js +33 -28
  57. package/src/jobs/components/__tests__/JobsView.spec.js +1 -7
  58. package/src/jobs/components/__tests__/SourceJobs.spec.js +1 -7
  59. package/src/jobs/components/__tests__/__snapshots__/Job.spec.js.snap +143 -36
  60. package/src/jobs/components/__tests__/__snapshots__/JobBreadcrumbs.spec.js.snap +20 -30
  61. package/src/jobs/components/__tests__/__snapshots__/Jobs.spec.js.snap +10 -23
  62. package/src/jobs/components/__tests__/__snapshots__/JobsTable.spec.js.snap +7 -7
  63. package/src/jobs/components/__tests__/__snapshots__/JobsView.spec.js.snap +12 -24
  64. package/src/jobs/components/__tests__/__snapshots__/SourceJobs.spec.js.snap +8 -21
  65. package/src/jobs/reducers/jobActiveFilters.js +1 -1
  66. package/src/jobs/sagas/fetchJob.js +1 -1
  67. package/src/jobs/selectors/jobColumnsSelector.js +0 -1
  68. package/src/jobs/selectors/sourceJobColumnsSelector.js +0 -1
  69. package/src/sources/components/EditSource.js +0 -1
  70. package/src/sources/components/JobForm.js +1 -1
  71. package/src/sources/components/NewJob.js +0 -1
  72. package/src/sources/components/NewSource.js +0 -1
  73. package/src/sources/components/Source.js +0 -1
  74. package/src/sources/components/SourceActions.js +1 -2
  75. package/src/sources/components/SourceBreadcrumbs.js +1 -2
  76. package/src/sources/components/SourceConfiguration.js +3 -3
  77. package/src/sources/components/SourceDetail.js +46 -50
  78. package/src/sources/components/SourceForm.js +4 -7
  79. package/src/sources/components/SourceHeader.js +0 -1
  80. package/src/sources/components/SourceRoutes.js +30 -23
  81. package/src/sources/components/SourceSelector.js +0 -1
  82. package/src/sources/components/SourceTabs.js +14 -7
  83. package/src/sources/components/Sources.js +2 -2
  84. package/src/sources/components/SourcesTable.js +1 -2
  85. package/src/sources/components/__tests__/EditSource.spec.js +10 -12
  86. package/src/sources/components/__tests__/NewSource.spec.js +5 -10
  87. package/src/sources/components/__tests__/Source.spec.js +19 -27
  88. package/src/sources/components/__tests__/SourceActions.spec.js +1 -2
  89. package/src/sources/components/__tests__/SourceBreadcrumbs.spec.js +0 -1
  90. package/src/sources/components/__tests__/SourceDetail.spec.js +62 -38
  91. package/src/sources/components/__tests__/SourceForm.spec.js +109 -86
  92. package/src/sources/components/__tests__/SourceHeader.spec.js +1 -2
  93. package/src/sources/components/__tests__/SourceRoutes.spec.js +79 -7
  94. package/src/sources/components/__tests__/SourceSelector.spec.js +0 -1
  95. package/src/sources/components/__tests__/SourceTabs.spec.js +3 -4
  96. package/src/sources/components/__tests__/Sources.spec.js +24 -39
  97. package/src/sources/components/__tests__/SourcesTable.spec.js +48 -65
  98. package/src/sources/components/__tests__/__snapshots__/EditSource.spec.js.snap +134 -15
  99. package/src/sources/components/__tests__/__snapshots__/NewSource.spec.js.snap +36 -23
  100. package/src/sources/components/__tests__/__snapshots__/Source.spec.js.snap +28 -31
  101. package/src/sources/components/__tests__/__snapshots__/SourceActions.spec.js.snap +1 -1
  102. package/src/sources/components/__tests__/__snapshots__/SourceBreadcrumbs.spec.js.snap +2 -1
  103. package/src/sources/components/__tests__/__snapshots__/SourceDetail.spec.js.snap +13 -172
  104. package/src/sources/components/__tests__/__snapshots__/SourceForm.spec.js.snap +132 -106
  105. package/src/sources/components/__tests__/__snapshots__/SourceHeader.spec.js.snap +4 -4
  106. package/src/sources/components/__tests__/__snapshots__/SourceRoutes.spec.js.snap +47 -5
  107. package/src/sources/components/__tests__/__snapshots__/SourceTabs.spec.js.snap +5 -3
  108. package/src/sources/components/__tests__/__snapshots__/Sources.spec.js.snap +14 -11
  109. package/src/sources/components/__tests__/__snapshots__/SourcesTable.spec.js.snap +17 -12
  110. package/src/jobs/components/ConfigurationRoutes.js +0 -31
@@ -1,10 +1,6 @@
1
- import React from "react";
2
- import { shallow } from "enzyme";
3
- import { intl } from "@truedat/test/intl-stub";
1
+ import { render, waitForLoad } from "@truedat/test/render";
4
2
  import { Job, EventFeed } from "../Job";
5
3
 
6
- jest.spyOn(React, "useContext").mockImplementation(() => intl);
7
-
8
4
  const events = [
9
5
  { inserted_at: "2020-01-01T00:01:02.000Z", type: "STARTED" },
10
6
  {
@@ -15,10 +11,11 @@ const events = [
15
11
  ];
16
12
 
17
13
  describe("<EventFeed />", () => {
18
- it("matches the latest snapshot", () => {
14
+ it("matches the latest snapshot", async () => {
19
15
  const props = { events };
20
- const wrapper = shallow(<EventFeed {...props} />);
21
- expect(wrapper).toMatchSnapshot();
16
+ const rendered = render(<EventFeed {...props} />);
17
+ await waitForLoad(rendered);
18
+ expect(rendered.container).toMatchSnapshot();
22
19
  });
23
20
  });
24
21
 
@@ -26,9 +23,10 @@ describe("<Job />", () => {
26
23
  const source = { external_id: "Some source" };
27
24
  const job = { _embedded: { events, source }, type: "catalog" };
28
25
 
29
- it("matches the latest snapshot", () => {
26
+ it("matches the latest snapshot", async () => {
30
27
  const props = { job };
31
- const wrapper = shallow(<Job {...props} />);
32
- expect(wrapper).toMatchSnapshot();
28
+ const rendered = render(<Job {...props} />);
29
+ await waitForLoad(rendered);
30
+ expect(rendered.container).toMatchSnapshot();
33
31
  });
34
32
  });
@@ -1,13 +1,13 @@
1
- import React from "react";
2
- import { shallow } from "enzyme";
1
+ import { render, waitForLoad } from "@truedat/test/render";
3
2
  import { JobBreadcrumbs } from "../JobBreadcrumbs";
4
3
 
5
4
  describe("<JobBreadcrumbs />", () => {
6
5
  const job = { external_id: "foo" };
7
6
 
8
- it("matches the latest snapshot", () => {
7
+ it("matches the latest snapshot", async () => {
9
8
  const props = { job };
10
- const wrapper = shallow(<JobBreadcrumbs {...props} />);
11
- expect(wrapper).toMatchSnapshot();
9
+ const rendered = render(<JobBreadcrumbs {...props} />);
10
+ await waitForLoad(rendered);
11
+ expect(rendered.container).toMatchSnapshot();
12
12
  });
13
13
  });
@@ -1,22 +1,22 @@
1
- import React from "react";
2
- import { mount } from "enzyme";
1
+ import { render, waitForLoad } from "@truedat/test/render";
3
2
  import { JobLoader } from "../JobLoader";
4
3
 
5
- jest.mock("react-router-dom", () => ({
6
- ...jest.requireActual("react-router-dom"),
7
- useParams: () => ({ id: 1 })
4
+ jest.mock("react-router", () => ({
5
+ ...jest.requireActual("react-router"),
6
+ useParams: () => ({ id: 1 }),
8
7
  }));
9
8
 
10
9
  describe("<JobLoader />", () => {
11
- it("calls fetchJob when component mounts, clearJob when component unmounts", () => {
10
+ it("calls fetchJob when component mounts, clearJob when component unmounts", async () => {
12
11
  const clearJob = jest.fn();
13
12
  const fetchJob = jest.fn();
14
13
  const props = { fetchJob, clearJob };
15
- const wrapper = mount(<JobLoader {...props} />);
16
- expect(clearJob.mock.calls.length).toBe(0);
17
- expect(fetchJob.mock.calls.length).toBe(1);
18
- wrapper.unmount();
19
- expect(clearJob.mock.calls.length).toBe(1);
20
- expect(fetchJob.mock.calls.length).toBe(1);
14
+ const rendered = render(<JobLoader {...props} />);
15
+ await waitForLoad(rendered);
16
+ expect(clearJob).not.toHaveBeenCalled();
17
+ expect(fetchJob).toHaveBeenCalledTimes(1);
18
+ rendered.unmount();
19
+ expect(clearJob).toHaveBeenCalledTimes(1);
20
+ expect(fetchJob).toHaveBeenCalledTimes(1);
21
21
  });
22
22
  });
@@ -1,16 +1,21 @@
1
- import React from "react";
2
1
  import userEvent from "@testing-library/user-event";
3
- import { render } from "@truedat/test/render";
2
+ import { render, waitForLoad } from "@truedat/test/render";
4
3
  import { jobColumnsSelector } from "../../selectors";
5
4
  import JobRow from "../JobRow";
6
5
 
6
+ const mockNavigate = jest.fn();
7
+ jest.mock("react-router", () => ({
8
+ ...jest.requireActual("react-router"),
9
+ useNavigate: () => mockNavigate,
10
+ }));
11
+
7
12
  const columns = jobColumnsSelector({});
8
13
  const job = {
9
14
  source: {
10
15
  externalId: "source external_id_2",
11
16
  type: "source_type_2",
12
17
  },
13
- source_id: 123,
18
+ source_id: "123",
14
19
  status: "init",
15
20
  message: "Job started",
16
21
  end_date: "2020-01-21 16:31",
@@ -18,19 +23,10 @@ const job = {
18
23
  };
19
24
  const renderOpts = {};
20
25
 
21
- const mockHistory = {
22
- push: jest.fn(),
23
- };
24
-
25
- jest.mock("react-router-dom", () => ({
26
- ...jest.requireActual("react-router-dom"),
27
- useHistory: () => mockHistory,
28
- }));
29
-
30
26
  describe("<JobRow />", () => {
31
- it("matches the latest snapshot", () => {
27
+ it("matches the latest snapshot", async () => {
32
28
  const props = { columns, job };
33
- const { container } = render(
29
+ const rendered = render(
34
30
  <table>
35
31
  <tbody>
36
32
  <JobRow {...props} />
@@ -38,12 +34,13 @@ describe("<JobRow />", () => {
38
34
  </table>,
39
35
  renderOpts
40
36
  );
41
- expect(container).toMatchSnapshot();
37
+ await waitForLoad(rendered);
38
+ expect(rendered.container).toMatchSnapshot();
42
39
  });
43
40
 
44
- it("navigates to the job route when row is clicked", () => {
41
+ it("navigates to the job route when row is clicked", async () => {
45
42
  const props = { columns, job };
46
- const { getByText } = render(
43
+ const rendered = render(
47
44
  <table>
48
45
  <tbody>
49
46
  <JobRow {...props} />
@@ -51,8 +48,12 @@ describe("<JobRow />", () => {
51
48
  </table>,
52
49
  renderOpts
53
50
  );
54
- userEvent.click(getByText(/source_type_2/));
55
- expect(mockHistory.push.mock.calls.length).toBe(1);
56
- expect(mockHistory.push.mock.calls[0][0]).toBe("/sources/123/jobs/foo");
51
+ await waitForLoad(rendered);
52
+
53
+ const user = userEvent.setup({ delay: null });
54
+ await user.click(rendered.getByText(/source_type_2/i));
55
+
56
+ expect(mockNavigate).toHaveBeenCalledTimes(1);
57
+ expect(mockNavigate).toHaveBeenCalledWith("/sources/123/jobs/foo");
57
58
  });
58
59
  });
@@ -1,4 +1,3 @@
1
- import React, { Suspense } from "react";
2
1
  import { render } from "@truedat/test/render";
3
2
  import Jobs from "../Jobs";
4
3
 
@@ -23,12 +22,7 @@ const renderOpts = { state };
23
22
 
24
23
  describe("<Jobs />", () => {
25
24
  it("matches the latest snapshot", () => {
26
- const { container } = render(
27
- <Suspense fallback={null}>
28
- <Jobs />
29
- </Suspense>,
30
- renderOpts
31
- );
25
+ const { container } = render(<Jobs />, renderOpts);
32
26
  expect(container).toMatchSnapshot();
33
27
  });
34
28
  });
@@ -1,19 +1,19 @@
1
- import React from "react";
2
- import { mount } from "enzyme";
1
+ import { render, waitForLoad } from "@truedat/test/render";
3
2
  import { JobsLoader } from "../JobsLoader";
4
3
 
5
4
  describe("<JobsLoader />", () => {
6
5
  const payload = {};
7
6
 
8
- it("calls fetchJobs when component mounts, clearJobs when component unmounts", () => {
7
+ it("calls fetchJobs when component mounts, clearJobs when component unmounts", async () => {
9
8
  const clearJobs = jest.fn();
10
9
  const fetchJobs = jest.fn();
11
10
  const props = { fetchJobs, payload, clearJobs };
12
- const wrapper = mount(<JobsLoader {...props} />);
13
- expect(clearJobs.mock.calls.length).toBe(0);
14
- expect(fetchJobs.mock.calls.length).toBe(1);
15
- wrapper.unmount();
16
- expect(clearJobs.mock.calls.length).toBe(1);
17
- expect(fetchJobs.mock.calls.length).toBe(1);
11
+ const rendered = render(<JobsLoader {...props} />);
12
+ await waitForLoad(rendered);
13
+ expect(clearJobs).not.toHaveBeenCalled();
14
+ expect(fetchJobs).toHaveBeenCalledTimes(1);
15
+ rendered.unmount();
16
+ expect(clearJobs).toHaveBeenCalledTimes(1);
17
+ expect(fetchJobs).toHaveBeenCalledTimes(1);
18
18
  });
19
19
  });
@@ -1,7 +1,5 @@
1
- import _ from "lodash/fp";
2
- import React from "react";
3
1
  import userEvent from "@testing-library/user-event";
4
- import { render } from "@truedat/test/render";
2
+ import { render, waitForLoad } from "@truedat/test/render";
5
3
  import { initialState as jobQuery } from "../../reducers/jobQuery";
6
4
  import JobsTable from "../JobsTable";
7
5
 
@@ -25,36 +23,43 @@ const state = { jobs, jobQuery };
25
23
  const renderOpts = { state };
26
24
 
27
25
  describe("<JobsTable />", () => {
28
- it("matches the latest snapshot", () => {
29
- const { container } = render(<JobsTable />, renderOpts);
30
- expect(container).toMatchSnapshot();
26
+ it("matches the latest snapshot", async () => {
27
+ const rendered = render(<JobsTable />, renderOpts);
28
+ await waitForLoad(rendered);
29
+ expect(rendered.container).toMatchSnapshot();
31
30
  });
32
31
 
33
- it("matches the latest snapshot (no jobs)", () => {
34
- const opts = _.set("state.jobs", [])(renderOpts);
35
- const { container } = render(<JobsTable />, opts);
36
- expect(container).toMatchSnapshot();
32
+ it("matches the latest snapshot (no jobs)", async () => {
33
+ const rendered = render(<JobsTable />, { state: { ...state, jobs: [] } });
34
+ await waitForLoad(rendered);
35
+ expect(rendered.container).toMatchSnapshot();
37
36
  });
38
37
 
39
- it("sorts by most recent initially", () => {
40
- const { getByRole } = render(<JobsTable />, renderOpts);
41
- expect(getByRole("columnheader", { name: /Updated At/ })).toHaveClass(
42
- "sorted descending"
43
- );
38
+ it("sorts by most recent initially", async () => {
39
+ const rendered = render(<JobsTable />, renderOpts);
40
+ await waitForLoad(rendered);
41
+ expect(
42
+ rendered.getByRole("columnheader", { name: /end_date/i })
43
+ ).toHaveClass("sorted descending");
44
44
  });
45
45
 
46
- it("toggles sort direction when a column header is clicked", () => {
47
- const { getByText, getByRole } = render(<JobsTable />, renderOpts);
48
- expect(getByRole("columnheader", { name: /Source Type/ })).not.toHaveClass(
49
- "sorted"
50
- );
51
- userEvent.click(getByText(/Source Type/));
52
- expect(getByRole("columnheader", { name: /Source Type/ })).toHaveClass(
53
- "sorted ascending"
54
- );
55
- userEvent.click(getByText(/Source Type/));
56
- expect(getByRole("columnheader", { name: /Source Type/ })).toHaveClass(
57
- "sorted descending"
58
- );
46
+ it("toggles sort direction when a column header is clicked", async () => {
47
+ const rendered = render(<JobsTable />, renderOpts);
48
+ await waitForLoad(rendered);
49
+
50
+ const user = userEvent.setup({ delay: null });
51
+ expect(
52
+ rendered.getByRole("columnheader", { name: /source\.type/i })
53
+ ).not.toHaveClass("sorted");
54
+
55
+ await user.click(rendered.getByText(/source\.type/i));
56
+ expect(
57
+ rendered.getByRole("columnheader", { name: /source\.type/i })
58
+ ).toHaveClass("sorted ascending");
59
+
60
+ await user.click(rendered.getByText(/source\.type/i));
61
+ expect(
62
+ rendered.getByRole("columnheader", { name: /source\.type/i })
63
+ ).toHaveClass("sorted descending");
59
64
  });
60
65
  });
@@ -1,4 +1,3 @@
1
- import React, { Suspense } from "react";
2
1
  import { render } from "@truedat/test/render";
3
2
  import { initialState as jobQuery } from "../../reducers/jobQuery";
4
3
  import JobsView from "../JobsView";
@@ -24,12 +23,7 @@ const renderOpts = { state };
24
23
 
25
24
  describe("<JobsView />", () => {
26
25
  it("matches the latest snapshot", () => {
27
- const { container } = render(
28
- <Suspense fallback={null}>
29
- <JobsView />
30
- </Suspense>,
31
- renderOpts
32
- );
26
+ const { container } = render(<JobsView />, renderOpts);
33
27
  expect(container).toMatchSnapshot();
34
28
  });
35
29
  });
@@ -1,4 +1,3 @@
1
- import React, { Suspense } from "react";
2
1
  import { render } from "@truedat/test/render";
3
2
  import SourceJobs from "../SourceJobs";
4
3
 
@@ -23,12 +22,7 @@ const renderOpts = { state };
23
22
 
24
23
  describe("<SourceJobs />", () => {
25
24
  it("matches the latest snapshot", () => {
26
- const { container } = render(
27
- <Suspense fallback={null}>
28
- <SourceJobs />
29
- </Suspense>,
30
- renderOpts
31
- );
25
+ const { container } = render(<SourceJobs />, renderOpts);
32
26
  expect(container).toMatchSnapshot();
33
27
  });
34
28
  });
@@ -1,43 +1,150 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<EventFeed /> matches the latest snapshot 1`] = `
4
- <Feed
5
- size="large"
6
- >
7
- <Event
8
- inserted_at="2020-01-01T00:01:02.000Z"
9
- key="0"
10
- type="STARTED"
11
- />
12
- <Event
13
- inserted_at="2020-01-01T00:01:03.000Z"
14
- key="1"
15
- message="something went wrong"
16
- type="FAILED"
17
- />
18
- </Feed>
4
+ <div>
5
+ <div
6
+ class="ui large feed"
7
+ >
8
+ <div
9
+ class="event"
10
+ >
11
+ <div
12
+ class="label"
13
+ >
14
+ <i
15
+ aria-hidden="true"
16
+ class="green play circle outline icon"
17
+ />
18
+ </div>
19
+ <div
20
+ class="content"
21
+ >
22
+ <time
23
+ datetime="1577836862000"
24
+ >
25
+ 2020-01-01 00:01:02.000
26
+ </time>
27
+ <div
28
+ class="summary"
29
+ >
30
+
31
+ STARTED
32
+
33
+ </div>
34
+ </div>
35
+ </div>
36
+ <div
37
+ class="event"
38
+ >
39
+ <div
40
+ class="label"
41
+ >
42
+ <i
43
+ aria-hidden="true"
44
+ class="red warning circle icon"
45
+ />
46
+ </div>
47
+ <div
48
+ class="content"
49
+ >
50
+ <time
51
+ datetime="1577836863000"
52
+ >
53
+ 2020-01-01 00:01:03.000
54
+ </time>
55
+ <div
56
+ class="summary"
57
+ >
58
+
59
+ FAILED
60
+
61
+ </div>
62
+ <div
63
+ class="text extra"
64
+ >
65
+ something went wrong
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ </div>
19
71
  `;
20
72
 
21
73
  exports[`<Job /> matches the latest snapshot 1`] = `
22
- <Fragment>
23
- <Header
24
- as="h4"
25
- subheader="jobType.catalog.label"
26
- />
27
- <EventFeed
28
- events={
29
- [
30
- {
31
- "inserted_at": "2020-01-01T00:01:02.000Z",
32
- "type": "STARTED",
33
- },
34
- {
35
- "inserted_at": "2020-01-01T00:01:03.000Z",
36
- "message": "something went wrong",
37
- "type": "FAILED",
38
- },
39
- ]
40
- }
41
- />
42
- </Fragment>
74
+ <div>
75
+ <h4
76
+ class="ui header"
77
+ >
78
+ <div
79
+ class="sub header"
80
+ >
81
+ catalog
82
+ </div>
83
+ </h4>
84
+ <div
85
+ class="ui large feed"
86
+ >
87
+ <div
88
+ class="event"
89
+ >
90
+ <div
91
+ class="label"
92
+ >
93
+ <i
94
+ aria-hidden="true"
95
+ class="green play circle outline icon"
96
+ />
97
+ </div>
98
+ <div
99
+ class="content"
100
+ >
101
+ <time
102
+ datetime="1577836862000"
103
+ >
104
+ 2020-01-01 00:01:02.000
105
+ </time>
106
+ <div
107
+ class="summary"
108
+ >
109
+
110
+ STARTED
111
+
112
+ </div>
113
+ </div>
114
+ </div>
115
+ <div
116
+ class="event"
117
+ >
118
+ <div
119
+ class="label"
120
+ >
121
+ <i
122
+ aria-hidden="true"
123
+ class="red warning circle icon"
124
+ />
125
+ </div>
126
+ <div
127
+ class="content"
128
+ >
129
+ <time
130
+ datetime="1577836863000"
131
+ >
132
+ 2020-01-01 00:01:03.000
133
+ </time>
134
+ <div
135
+ class="summary"
136
+ >
137
+
138
+ FAILED
139
+
140
+ </div>
141
+ <div
142
+ class="text extra"
143
+ >
144
+ something went wrong
145
+ </div>
146
+ </div>
147
+ </div>
148
+ </div>
149
+ </div>
43
150
  `;
@@ -1,36 +1,26 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<JobBreadcrumbs /> matches the latest snapshot 1`] = `
4
- <Breadcrumb>
5
- <BreadcrumbSection
6
- active={false}
7
- as={
8
- {
9
- "$$typeof": Symbol(react.forward_ref),
10
- "displayName": "Link",
11
- "propTypes": {
12
- "innerRef": [Function],
13
- "onClick": [Function],
14
- "replace": [Function],
15
- "target": [Function],
16
- "to": [Function],
17
- },
18
- "render": [Function],
19
- }
20
- }
21
- to="/jobs"
4
+ <div>
5
+ <div
6
+ class="ui breadcrumb"
22
7
  >
23
- <MemoizedFormattedMessage
24
- id="navigation.admin.jobs"
8
+ <a
9
+ class="section"
10
+ data-discover="true"
11
+ href="/jobs"
12
+ >
13
+ navigation.admin.jobs
14
+ </a>
15
+ <i
16
+ aria-hidden="true"
17
+ class="right angle icon divider"
25
18
  />
26
- </BreadcrumbSection>
27
- <BreadcrumbDivider
28
- icon="right angle"
29
- />
30
- <BreadcrumbSection
31
- active={true}
32
- >
33
- foo
34
- </BreadcrumbSection>
35
- </Breadcrumb>
19
+ <div
20
+ class="active section"
21
+ >
22
+ foo
23
+ </div>
24
+ </div>
25
+ </div>
36
26
  `;
@@ -6,9 +6,8 @@ exports[`<Jobs /> matches the latest snapshot 1`] = `
6
6
  class="ui action left icon input"
7
7
  >
8
8
  <input
9
- placeholder="Search jobs..."
9
+ placeholder="jobs.search.placeholder"
10
10
  type="text"
11
- value=""
12
11
  />
13
12
  <i
14
13
  aria-hidden="true"
@@ -40,7 +39,7 @@ exports[`<Jobs /> matches the latest snapshot 1`] = `
40
39
  role="option"
41
40
  >
42
41
  <em>
43
- (reset all filters)
42
+ (reset filters)
44
43
  </em>
45
44
  </div>
46
45
  </div>
@@ -51,23 +50,11 @@ exports[`<Jobs /> matches the latest snapshot 1`] = `
51
50
  />
52
51
  <div
53
52
  class="dimmable"
54
- >
55
- <div
56
- class="ui inverted dimmer"
57
- >
58
- <div
59
- class="content"
60
- >
61
- <div
62
- class="ui loader"
63
- />
64
- </div>
65
- </div>
66
- </div>
53
+ />
67
54
  <div
68
55
  class="ui label jobs-label-results"
69
56
  >
70
- 42 jobs found
57
+ jobs.retrieved.results
71
58
  </div>
72
59
  <table
73
60
  class="ui selectable sortable table"
@@ -81,32 +68,32 @@ exports[`<Jobs /> matches the latest snapshot 1`] = `
81
68
  <th
82
69
  class="two wide"
83
70
  >
84
- Source
71
+ source.external_id
85
72
  </th>
86
73
  <th
87
74
  class="two wide"
88
75
  >
89
- Source Type
76
+ source.type
90
77
  </th>
91
78
  <th
92
79
  class="two wide"
93
80
  >
94
- Type
81
+ type
95
82
  </th>
96
83
  <th
97
84
  class="two wide"
98
85
  >
99
- Status
86
+ status
100
87
  </th>
101
88
  <th
102
89
  class="two wide ascending sorted disabled"
103
90
  >
104
- Message
91
+ message
105
92
  </th>
106
93
  <th
107
94
  class="two wide"
108
95
  >
109
- Updated At
96
+ end_date
110
97
  </th>
111
98
  </tr>
112
99
  </thead>