@truedat/dd 4.46.4 → 4.46.7

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.46.6] 2022-06-20
4
+
5
+ ### Added
6
+
7
+ - [TD-4858] System Cards are splited by `system_group` field of df
8
+
9
+ ## [4.46.5] 2022-06-17
10
+
11
+ ### Added
12
+
13
+ - [TD-4894] Multiple column operator in implementation creation
14
+
3
15
  ## [4.46.1] 2022-06-15
4
16
 
5
17
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "4.46.4",
3
+ "version": "4.46.7",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.4",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "4.46.4",
37
+ "@truedat/test": "4.46.7",
38
38
  "babel-jest": "^28.1.0",
39
39
  "babel-plugin-dynamic-import-node": "^2.3.3",
40
40
  "babel-plugin-lodash": "^3.3.4",
@@ -88,9 +88,9 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@apollo/client": "^3.6.4",
91
- "@truedat/auth": "4.46.4",
92
- "@truedat/core": "4.46.4",
93
- "@truedat/df": "4.46.4",
91
+ "@truedat/auth": "4.46.7",
92
+ "@truedat/core": "4.46.7",
93
+ "@truedat/df": "4.46.7",
94
94
  "lodash": "^4.17.21",
95
95
  "path-to-regexp": "^1.7.0",
96
96
  "prop-types": "^15.8.1",
@@ -103,7 +103,8 @@
103
103
  "redux-saga": "^1.1.3",
104
104
  "redux-saga-routines": "^3.2.3",
105
105
  "reselect": "^4.0.0",
106
- "svg-pan-zoom": "^3.6.1"
106
+ "svg-pan-zoom": "^3.6.1",
107
+ "uuid": "^8.3.2"
107
108
  },
108
109
  "peerDependencies": {
109
110
  "@truedat/profile": ">= 4.45.0",
@@ -111,5 +112,5 @@
111
112
  "react-dom": ">= 16.8.6 < 17",
112
113
  "semantic-ui-react": ">= 0.88.2 < 2.1"
113
114
  },
114
- "gitHead": "dcd0aa42ffe1fb816945154ec2a2d06889dca7e7"
115
+ "gitHead": "2b1c3f0fcf94a7b510f171c06cfb2e1550a14166"
115
116
  }
@@ -11,23 +11,37 @@ export const StructureFieldsDropdown = ({
11
11
  fluid,
12
12
  inline,
13
13
  onSelectField,
14
+ onSelectFields,
14
15
  structureFields,
15
16
  filters,
16
17
  value,
17
18
  typeCastModifiers,
19
+ multiple,
18
20
  }) => {
19
21
  const { formatMessage } = useIntl();
20
22
  const onClick = ({ value, modifier }) => {
23
+ onSelectField(dropdownItemToField(value), modifier);
24
+ };
25
+
26
+ const onChangeStructureFieldsDropdown = (valueOrValues) => {
27
+ return _.flow(
28
+ _.map((value) => {
29
+ return dropdownItemToField(value);
30
+ }),
31
+ multiple ? onSelectFields : onSelectField
32
+ )(Array.isArray(valueOrValues) ? valueOrValues : [valueOrValues]);
33
+ };
34
+
35
+ const dropdownItemToField = (value) => {
21
36
  const [data_structure_id, parent_index] = _.isString(value)
22
37
  ? value.split("/").map(Number)
23
38
  : [value, undefined];
24
- const field = _.isNil(parent_index)
39
+ return _.isNil(parent_index)
25
40
  ? _.find({ data_structure_id: data_structure_id })(structureFields)
26
41
  : _.find({
27
42
  data_structure_id: data_structure_id,
28
43
  parent_index: parent_index,
29
44
  })(structureFields);
30
- onSelectField(field, modifier);
31
45
  };
32
46
 
33
47
  const formatOption = (field) => {
@@ -62,14 +76,15 @@ export const StructureFieldsDropdown = ({
62
76
  }),
63
77
  };
64
78
  };
65
- const toFieldOption = (field) =>
66
- _.has("options")(field)
79
+ const toFieldOption = (field) => {
80
+ return _.has("options")(field)
67
81
  ? {
68
82
  icon: "table",
69
83
  label: field.label,
70
84
  options: _.map(formatOption)(field.options),
71
85
  }
72
86
  : formatOption(field);
87
+ };
73
88
 
74
89
  const getOptions = _.flow(
75
90
  _.sortBy(_.flow(_.prop("name"), _.toLower)),
@@ -100,11 +115,13 @@ export const StructureFieldsDropdown = ({
100
115
 
101
116
  return (
102
117
  <OptionGroup
118
+ multiple={multiple}
103
119
  fluid={fluid}
104
120
  inline={inline}
105
121
  label={label}
106
122
  value={value}
107
123
  onClick={onClick}
124
+ onChange={onChangeStructureFieldsDropdown}
108
125
  placeholder={formatMessage({
109
126
  id: "structureFields.dropdown.placeholder",
110
127
  })}
@@ -120,8 +137,10 @@ StructureFieldsDropdown.propTypes = {
120
137
  value: PropTypes.number,
121
138
  structureFields: PropTypes.array,
122
139
  onSelectField: PropTypes.func,
140
+ onSelectFields: PropTypes.func,
123
141
  filters: PropTypes.object,
124
142
  typeCastModifiers: PropTypes.array,
143
+ multiple: PropTypes.bool,
125
144
  };
126
145
 
127
146
  const mapStateToProps = (state, props) => ({
@@ -7,35 +7,76 @@ import { Card, Icon, Image, Label, Table, Popup } from "semantic-ui-react";
7
7
  import { useIntl } from "react-intl";
8
8
  import { FormattedMessage, FormattedNumber } from "react-intl";
9
9
  import { accentInsensitivePathOrder } from "@truedat/core/services/sort";
10
+ import { CardGroupsAccordion } from "@truedat/core/components";
10
11
  import { linkTo } from "@truedat/core/routes";
11
12
 
12
- export const SystemCards = ({ systems, structureTypes }) => (
13
- <Card.Group className="structures">
14
- {_.map(({ id, name, structures_count: structures_count, df_content }) => (
15
- <Card key={id} link as={Link} to={linkTo.SYSTEM_STRUCTURES({ id: id })}>
16
- <Card.Content className="extra-bottom-padding">
17
- <Card.Header>{name}</Card.Header>
18
- {!_.isEmpty(_.prop("types")(structures_count)) && (
19
- <SystemsPopup
20
- structures_count={structures_count}
21
- structureTypes={structureTypes}
22
- />
23
- )}
24
- {!_.isEmpty(_.get("logo")(df_content)) &&
25
- _.startsWith("data:image")(_.get("logo")(df_content)) && (
26
- <Image src={_.get("logo")(df_content)} className="system-image" />
27
- )}
28
- </Card.Content>
29
- </Card>
30
- ))(systems)}
31
- </Card.Group>
32
- );
13
+ export const SystemCards = ({ systems, structureTypes }) => {
14
+ const groups = _.flow(
15
+ _.map((system) =>
16
+ system.df_content?.system_group === ""
17
+ ? _.set("df_content.system_group", "default", system)
18
+ : system
19
+ ),
20
+ _.groupBy("df_content.system_group")
21
+ )(systems);
22
+
23
+ return Object.keys(groups).length > 1 ? (
24
+ <CardGroupsAccordion groups={groups} cardComponent={SystemCard} />
25
+ ) : (
26
+ <Card.Group className="structures">
27
+ {_.map(({ id, name, structures_count: structures_count, df_content }) => (
28
+ <SystemCard
29
+ key={id}
30
+ id={id}
31
+ name={name}
32
+ structures_count={structures_count}
33
+ df_content={df_content}
34
+ structureTypes={structureTypes}
35
+ />
36
+ ))(systems)}
37
+ </Card.Group>
38
+ );
39
+ };
33
40
 
34
41
  SystemCards.propTypes = {
35
42
  systems: PropTypes.array,
36
43
  structureTypes: PropTypes.array,
37
44
  };
38
45
 
46
+ export const SystemCard = ({
47
+ id,
48
+ name,
49
+ structures_count,
50
+ df_content,
51
+ structureTypes,
52
+ }) => {
53
+ return (
54
+ <Card link as={Link} to={linkTo.SYSTEM_STRUCTURES({ id: id })}>
55
+ <Card.Content className="extra-bottom-padding">
56
+ <Card.Header>{name}</Card.Header>
57
+ {!_.isEmpty(_.prop("types")(structures_count)) && (
58
+ <SystemsPopup
59
+ structures_count={structures_count}
60
+ structureTypes={structureTypes}
61
+ />
62
+ )}
63
+ {!_.isEmpty(_.get("logo")(df_content)) &&
64
+ _.startsWith("data:image")(_.get("logo")(df_content)) && (
65
+ <Image src={_.get("logo")(df_content)} className="system-image" />
66
+ )}
67
+ </Card.Content>
68
+ </Card>
69
+ );
70
+ };
71
+
72
+ SystemCard.propTypes = {
73
+ id: PropTypes.number,
74
+ name: PropTypes.string,
75
+ structures_count: PropTypes.object,
76
+ df_content: PropTypes.object,
77
+ structureTypes: PropTypes.array,
78
+ };
79
+
39
80
  export const SystemsPopup = ({ structures_count, structureTypes }) => {
40
81
  const { formatMessage } = useIntl();
41
82
  return (
@@ -1,157 +1,205 @@
1
+ /* eslint-disable react/display-name */
1
2
  import React from "react";
2
- import { shallow } from "enzyme";
3
- import { intl } from "@truedat/test/intl-stub";
3
+ import { render } from "@truedat/test/render";
4
+ import { waitFor, fireEvent } from "@testing-library/react";
5
+
4
6
  import { SystemCards, SystemsPopup } from "../SystemCards";
5
7
 
6
- // workaround for enzyme issue with React.useContext
7
- // see https://github.com/airbnb/enzyme/issues/2176#issuecomment-532361526
8
- jest.spyOn(React, "useContext").mockImplementation(() => intl);
8
+ const system_with_structures = {
9
+ external_id: "Microstrategy",
10
+ id: 1,
11
+ name: "Microstrategy",
12
+ structures_count: {
13
+ count: 1239,
14
+ types: [
15
+ { name: "carpeta", count: 1200 },
16
+ { name: "tabla", count: 2 },
17
+ { name: "columna", count: 37 },
18
+ ],
19
+ },
20
+ };
9
21
 
10
- const mockHistory = {
11
- goBack: jest.fn()
22
+ const system_without_structures = {
23
+ external_id: "vacio",
24
+ id: 27,
25
+ name: "vacio",
26
+ structures_count: { count: 0 },
12
27
  };
13
28
 
14
- jest.mock("react-router-dom", () => ({
15
- ...jest.requireActual("react-router-dom"),
16
- useHistory: () => mockHistory
17
- }));
29
+ const systems = [
30
+ { ...system_with_structures },
31
+ { ...system_without_structures },
32
+ ];
18
33
 
19
34
  describe("<SystemCards />", () => {
20
- it("matches the latest snapshot", () => {
21
- const wrapper = shallow(<SystemCards />);
22
- expect(wrapper).toMatchSnapshot();
35
+ it("It matches the latest snapshot without system_groups", () => {
36
+ const props = { systems };
37
+ const { container } = render(<SystemCards {...props} />);
38
+ expect(container).toMatchSnapshot();
23
39
  });
24
40
 
25
- it("mounts structures popup", () => {
41
+ it("It matches the latest snapshot with system_groups", () => {
26
42
  const systems = [
27
43
  {
28
- external_id: "Microstrategy",
29
- id: 1,
30
- name: "Microstrategy",
31
- structures_count: {
32
- count: 1239,
33
- types: [
34
- { name: "carpeta", count: 1200 },
35
- { name: "tabla", count: 2 },
36
- { name: "columna", count: 37 }
37
- ]
38
- }
44
+ ...system_with_structures,
45
+ df_content: {
46
+ system_group: "foo-group",
47
+ },
39
48
  },
40
- {
41
- external_id: "vacio",
42
- id: 27,
43
- name: "vacio",
44
- structures_count: { count: 0 }
45
- }
49
+ { ...system_without_structures },
46
50
  ];
47
51
  const props = { systems };
48
- const systemsWrapper = shallow(<SystemCards {...props} />);
49
- expect(systemsWrapper).toMatchSnapshot();
50
-
51
- expect(systemsWrapper.find("Card")).toHaveLength(2);
52
- expect(
53
- systemsWrapper
54
- .find("Card")
55
- .at(0)
56
- .find("SystemsPopup")
57
- ).toHaveLength(1);
58
-
59
- expect(
60
- systemsWrapper
61
- .find("Card")
62
- .at(1)
63
- .find("SystemsPopup")
64
- ).toHaveLength(0);
52
+ const { container } = render(<SystemCards {...props} />);
53
+ expect(container).toMatchSnapshot();
54
+ });
55
+
56
+ it("mounts structures popup", async () => {
57
+ const props = { systems };
58
+ const { container, getByText } = render(<SystemCards {...props} />);
59
+
60
+ expect(container.getElementsByClassName("card")).toHaveLength(2);
61
+
62
+ const popup = getByText("1,239");
63
+ fireEvent.mouseEnter(popup);
64
+
65
+ await waitFor(() => {
66
+ expect(document.getElementsByClassName("popup")).toHaveLength(1);
67
+ });
68
+ fireEvent.mouseLeave(popup);
69
+ await waitFor(() => {
70
+ expect(document.getElementsByClassName("popup")).toHaveLength(0);
71
+ });
65
72
  });
66
73
 
67
74
  it("system logo", () => {
75
+ const imageSrc =
76
+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
68
77
  const systems = [
69
78
  {
70
- external_id: "Microstrategy",
71
- id: 1,
72
- name: "Microstrategy",
73
- structures_count: {
74
- count: 1239,
75
- types: [
76
- { name: "carpeta", count: 1200 },
77
- { name: "tabla", count: 2 },
78
- { name: "columna", count: 37 }
79
- ]
79
+ ...system_with_structures,
80
+ df_content: {
81
+ logo: imageSrc,
80
82
  },
83
+ },
84
+ { ...system_without_structures },
85
+ ];
86
+ const props = { systems };
87
+ const { container } = render(<SystemCards {...props} />);
88
+
89
+ expect(container.getElementsByTagName("img")).toHaveLength(1);
90
+ expect(container.querySelector("img").getAttribute("src")).toMatch(
91
+ imageSrc
92
+ );
93
+ });
94
+
95
+ it("systems withouth system_group is not grouped", async () => {
96
+ const props = { systems };
97
+
98
+ const { container } = render(<SystemCards {...props} />);
99
+
100
+ await waitFor(() => {
101
+ // Check that the agrupations not appears
102
+ expect(container.innerHTML).not.toMatch("Without Groups");
103
+ });
104
+ });
105
+
106
+ it("all systems with the same system_group is not grouped", async () => {
107
+ const systems = [
108
+ {
109
+ ...system_with_structures,
81
110
  df_content: {
82
- logo:
83
- "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="
84
- }
111
+ system_group: "foo-group",
112
+ },
85
113
  },
86
114
  {
87
- external_id: "vacio",
88
- id: 27,
89
- name: "vacio",
90
- structures_count: { count: 0 }
91
- }
115
+ ...system_without_structures,
116
+ df_content: {
117
+ system_group: "foo-group",
118
+ },
119
+ },
92
120
  ];
93
121
  const props = { systems };
94
- const systemsWrapper = shallow(<SystemCards {...props} />);
95
- expect(
96
- systemsWrapper
97
- .find("Card")
98
- .at(0)
99
- .find("CardContent")
100
- .find("Image")
101
- .props().src
102
- ).toBe(systems[0].df_content.logo);
103
-
104
- expect(
105
- systemsWrapper
106
- .find("Card")
107
- .at(1)
108
- .find("CardContent")
109
- .find("Image").length
110
- ).toBe(0);
122
+
123
+ const { container } = render(<SystemCards {...props} />);
124
+
125
+ await waitFor(() => {
126
+ // Check that the agrupations not appears
127
+ expect(container.innerHTML).not.toMatch("Without Groups");
128
+ expect(container.innerHTML).not.toMatch("foo-group");
129
+ });
111
130
  });
112
131
 
113
- it("structures types count popup", () => {
114
- const structures_count = {
115
- count: 1239,
116
- types: [
117
- { name: "carpeta", count: 1200 },
118
- { name: "tabla", count: 2 },
119
- { name: "columna", count: 37 }
120
- ]
121
- };
132
+ it("systems with system_group is grouped", async () => {
133
+ const systems = [
134
+ {
135
+ ...system_with_structures,
136
+ df_content: {
137
+ system_group: "foo-group",
138
+ },
139
+ },
140
+ {
141
+ ...system_without_structures,
142
+ df_content: {
143
+ system_group: "",
144
+ },
145
+ },
146
+ ];
147
+ const props = { systems };
148
+
149
+ const { getByText } = render(<SystemCards {...props} />);
150
+
151
+ await waitFor(() => {
152
+ // Check that the agrupations appears
153
+ expect(getByText("foo-group")).toBeTruthy();
154
+ expect(getByText("Without Groups")).toBeTruthy();
155
+
156
+ // Check under foo-group only have one system card
157
+ expect(
158
+ getByText("foo-group")
159
+ .closest(".CardGroupTitle")
160
+ .parentNode.getElementsByClassName("card")
161
+ ).toHaveLength(1);
162
+ });
163
+ });
164
+
165
+ it("structures types count popup", async () => {
166
+ const structures_count = { ...system_with_structures.structures_count };
122
167
  const props = { structures_count };
123
- const systemsPopup = shallow(<SystemsPopup {...props} />);
124
-
125
- expect(
126
- systemsPopup
127
- .find("Table")
128
- .find("TableRow")
129
- .at(0)
130
- .find("TableCell")
131
- .at(2)
132
- .props().children
133
- ).toBe(1200);
134
-
135
- expect(
136
- systemsPopup
137
- .find("Table")
138
- .find("TableRow")
139
- .at(1)
140
- .find("TableCell")
141
- .at(2)
142
- .props().children
143
- ).toBe(2);
144
-
145
- expect(
146
- systemsPopup
147
- .find("Table")
148
- .find("TableRow")
149
- .at(2)
150
- .find("TableCell")
151
- .at(2)
152
- .props().children
153
- ).toBe(37);
154
-
155
- expect(systemsPopup).toMatchSnapshot();
168
+ const { getByText } = render(<SystemsPopup {...props} />);
169
+
170
+ const popup = getByText("1,239");
171
+ fireEvent.mouseEnter(popup);
172
+
173
+ await waitFor(() => {
174
+ // Check that popup is showed
175
+ expect(document.getElementsByClassName("popup")).toHaveLength(1);
176
+
177
+ // Check that are a row for each type of structures count
178
+ expect(document.querySelectorAll("tr")).toHaveLength(3);
179
+
180
+ // Check each row to have correct data according type of structure count
181
+ expect(
182
+ document.querySelectorAll("tr")[0].querySelectorAll("td")[1].innerHTML
183
+ ).toMatch("carpeta");
184
+ expect(
185
+ document.querySelectorAll("tr")[0].querySelectorAll("td")[2].innerHTML
186
+ ).toMatch("1200");
187
+
188
+ expect(
189
+ document.querySelectorAll("tr")[1].querySelectorAll("td")[1].innerHTML
190
+ ).toMatch("tabla");
191
+ expect(
192
+ document.querySelectorAll("tr")[1].querySelectorAll("td")[2].innerHTML
193
+ ).toMatch("2");
194
+
195
+ expect(
196
+ document.querySelectorAll("tr")[2].querySelectorAll("td")[1].innerHTML
197
+ ).toMatch("columna");
198
+ expect(
199
+ document.querySelectorAll("tr")[2].querySelectorAll("td")[2].innerHTML
200
+ ).toMatch("37");
201
+ });
202
+
203
+ expect(document).toMatchSnapshot();
156
204
  });
157
205
  });
@@ -1,211 +1,151 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`<SystemCards /> matches the latest snapshot 1`] = `
4
- <CardGroup
5
- className="structures"
6
- />
7
- `;
8
-
9
- exports[`<SystemCards /> mounts structures popup 1`] = `
10
- <CardGroup
11
- className="structures"
12
- >
13
- <Card
14
- as={
15
- Object {
16
- "$$typeof": Symbol(react.forward_ref),
17
- "displayName": "Link",
18
- "propTypes": Object {
19
- "innerRef": [Function],
20
- "onClick": [Function],
21
- "replace": [Function],
22
- "target": [Function],
23
- "to": [Function],
24
- },
25
- "render": [Function],
26
- }
27
- }
28
- key="1"
29
- link={true}
30
- to="/systems/1/structures"
31
- >
32
- <CardContent
33
- className="extra-bottom-padding"
34
- >
35
- <CardHeader>
36
- Microstrategy
37
- </CardHeader>
38
- <SystemsPopup
39
- structures_count={
40
- Object {
41
- "count": 1239,
42
- "types": Array [
43
- Object {
44
- "count": 1200,
45
- "name": "carpeta",
46
- },
47
- Object {
48
- "count": 2,
49
- "name": "tabla",
50
- },
51
- Object {
52
- "count": 37,
53
- "name": "columna",
54
- },
55
- ],
56
- }
57
- }
58
- />
59
- </CardContent>
60
- </Card>
61
- <Card
62
- as={
63
- Object {
64
- "$$typeof": Symbol(react.forward_ref),
65
- "displayName": "Link",
66
- "propTypes": Object {
67
- "innerRef": [Function],
68
- "onClick": [Function],
69
- "replace": [Function],
70
- "target": [Function],
71
- "to": [Function],
72
- },
73
- "render": [Function],
74
- }
75
- }
76
- key="27"
77
- link={true}
78
- to="/systems/27/structures"
79
- >
80
- <CardContent
81
- className="extra-bottom-padding"
82
- >
83
- <CardHeader>
84
- vacio
85
- </CardHeader>
86
- </CardContent>
87
- </Card>
88
- </CardGroup>
89
- `;
90
-
91
- exports[`<SystemCards /> structures types count popup 1`] = `
92
- <Popup
93
- basic={true}
94
- disabled={false}
95
- eventsEnabled={true}
96
- on={
97
- Array [
98
- "click",
99
- "hover",
100
- ]
101
- }
102
- pinned={false}
103
- popperModifiers={Array []}
104
- position="top left"
105
- trigger={
106
- <Label
107
- attached="bottom right"
108
- className="overlapping"
109
- >
110
- <FormattedNumber
111
- value={1239}
112
- />
113
- </Label>
114
- }
115
- >
116
- <Table
117
- as="table"
118
- basic="very"
119
- className="no-rows-border super-compact"
3
+ exports[`<SystemCards /> It matches the latest snapshot with system_groups 1`] = `
4
+ <div>
5
+ <div
6
+ class="accordion ui"
120
7
  >
121
- <TableBody
122
- as="tbody"
123
- >
124
- <TableRow
125
- as="tr"
126
- cellAs="td"
127
- key="0"
8
+ <div>
9
+ <div
10
+ class="active title CardGroupTitle"
128
11
  >
129
- <TableCell
130
- as="td"
12
+ <h3
13
+ class="ui dividing header"
131
14
  >
132
- <Icon
133
- as="i"
134
- name="question circle outline"
15
+ <i
16
+ aria-hidden="true"
17
+ class="dropdown icon"
135
18
  />
136
- </TableCell>
137
- <TableCell
138
- as="td"
139
- >
140
- <MemoizedFormattedMessage
141
- defaultMessage="carpeta"
142
- id="structure.type.carpeta.text"
143
- />
144
- </TableCell>
145
- <TableCell
146
- as="td"
147
- textAlign="right"
148
- >
149
- 1200
150
- </TableCell>
151
- </TableRow>
152
- <TableRow
153
- as="tr"
154
- cellAs="td"
155
- key="1"
19
+ foo-group
20
+ </h3>
21
+ </div>
22
+ <div
23
+ class="content active"
156
24
  >
157
- <TableCell
158
- as="td"
25
+ <div
26
+ class="ui cards"
159
27
  >
160
- <Icon
161
- as="i"
162
- name="question circle outline"
163
- />
164
- </TableCell>
165
- <TableCell
166
- as="td"
28
+ <a
29
+ class="ui link card"
30
+ href="/systems/1/structures"
31
+ >
32
+ <div
33
+ class="content extra-bottom-padding"
34
+ >
35
+ <div
36
+ class="header"
37
+ >
38
+ Microstrategy
39
+ </div>
40
+ <div
41
+ class="ui bottom right attached label overlapping"
42
+ >
43
+ 1,239
44
+ </div>
45
+ </div>
46
+ </a>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ <div>
51
+ <div
52
+ class="active title CardGroupTitle"
53
+ >
54
+ <h3
55
+ class="ui dividing header"
167
56
  >
168
- <MemoizedFormattedMessage
169
- defaultMessage="tabla"
170
- id="structure.type.tabla.text"
57
+ <i
58
+ aria-hidden="true"
59
+ class="dropdown icon"
171
60
  />
172
- </TableCell>
173
- <TableCell
174
- as="td"
175
- textAlign="right"
61
+ undefined
62
+ </h3>
63
+ </div>
64
+ <div
65
+ class="content active"
66
+ >
67
+ <div
68
+ class="ui cards"
176
69
  >
177
- 2
178
- </TableCell>
179
- </TableRow>
180
- <TableRow
181
- as="tr"
182
- cellAs="td"
183
- key="2"
70
+ <a
71
+ class="ui link card"
72
+ href="/systems/27/structures"
73
+ >
74
+ <div
75
+ class="content extra-bottom-padding"
76
+ >
77
+ <div
78
+ class="header"
79
+ >
80
+ vacio
81
+ </div>
82
+ </div>
83
+ </a>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ `;
90
+
91
+ exports[`<SystemCards /> It matches the latest snapshot without system_groups 1`] = `
92
+ <div>
93
+ <div
94
+ class="ui cards structures"
95
+ >
96
+ <a
97
+ class="ui link card"
98
+ href="/systems/1/structures"
99
+ >
100
+ <div
101
+ class="content extra-bottom-padding"
184
102
  >
185
- <TableCell
186
- as="td"
103
+ <div
104
+ class="header"
187
105
  >
188
- <Icon
189
- as="i"
190
- name="question circle outline"
191
- />
192
- </TableCell>
193
- <TableCell
194
- as="td"
106
+ Microstrategy
107
+ </div>
108
+ <div
109
+ class="ui bottom right attached label overlapping"
195
110
  >
196
- <MemoizedFormattedMessage
197
- defaultMessage="columna"
198
- id="structure.type.columna.text"
199
- />
200
- </TableCell>
201
- <TableCell
202
- as="td"
203
- textAlign="right"
111
+ 1,239
112
+ </div>
113
+ </div>
114
+ </a>
115
+ <a
116
+ class="ui link card"
117
+ href="/systems/27/structures"
118
+ >
119
+ <div
120
+ class="content extra-bottom-padding"
121
+ >
122
+ <div
123
+ class="header"
204
124
  >
205
- 37
206
- </TableCell>
207
- </TableRow>
208
- </TableBody>
209
- </Table>
210
- </Popup>
125
+ vacio
126
+ </div>
127
+ </div>
128
+ </a>
129
+ </div>
130
+ </div>
131
+ `;
132
+
133
+ exports[`<SystemCards /> structures types count popup 1`] = `
134
+ Document {
135
+ "location": Location {
136
+ "assign": [Function],
137
+ "hash": "",
138
+ "host": "localhost",
139
+ "hostname": "localhost",
140
+ "href": "http://localhost/",
141
+ "origin": "http://localhost",
142
+ "pathname": "/",
143
+ "port": "",
144
+ "protocol": "http:",
145
+ "reload": [Function],
146
+ "replace": [Function],
147
+ "search": "",
148
+ "toString": [Function],
149
+ },
150
+ }
211
151
  `;
@@ -36,21 +36,31 @@ exports[`<ValueConditionStructure /> matches the latest snapshot 1`] = `
36
36
  role="listbox"
37
37
  >
38
38
  <div
39
- class="divider"
40
- />
41
- <div
42
- class="header"
39
+ aria-checked="false"
40
+ aria-selected="true"
41
+ class="selected item"
42
+ role="option"
43
+ style="pointer-events: all;"
43
44
  >
44
- <i
45
- aria-hidden="true"
46
- class="table icon"
45
+ <div
46
+ class="divider"
47
47
  />
48
- bar
48
+ <div
49
+ class="header"
50
+ >
51
+ <i
52
+ aria-hidden="true"
53
+ class="table icon"
54
+ />
55
+ bar
56
+ </div>
49
57
  </div>
50
58
  <div
59
+ aria-checked="false"
51
60
  aria-selected="false"
52
61
  class="item group"
53
62
  role="option"
63
+ style="pointer-events: all;"
54
64
  >
55
65
  <i
56
66
  aria-hidden="true"