@truedat/auth 6.14.0 → 6.14.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/auth",
3
- "version": "6.14.0",
3
+ "version": "6.14.2",
4
4
  "description": "Truedat Web Auth",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -34,7 +34,7 @@
34
34
  "@testing-library/jest-dom": "^5.16.5",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "6.8.6",
37
+ "@truedat/test": "6.14.2",
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",
@@ -86,7 +86,7 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "6.14.0",
89
+ "@truedat/core": "6.14.2",
90
90
  "auth0-js": "9.23.3",
91
91
  "decode-uri-component": "^0.2.2",
92
92
  "jwt-decode": "^2.2.0",
@@ -109,5 +109,5 @@
109
109
  "react-dom": ">= 16.8.6 < 17",
110
110
  "semantic-ui-react": ">= 2.0.3 < 2.2"
111
111
  },
112
- "gitHead": "c93d6ae539fb9ecb3d43b63db5199726246d2024"
112
+ "gitHead": "753c6b170d39f136f655db597c695e4de3526615"
113
113
  }
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { connect } from "react-redux";
4
4
  import { Header, Button, Icon, Grid } from "semantic-ui-react";
5
- import { FormattedMessage } from "react-intl";
5
+ import { FormattedMessage, useIntl } from "react-intl";
6
6
  import { ConfirmModal, GroupActions } from "@truedat/core/components";
7
7
  import { deleteGroup } from "../routines";
8
8
 
@@ -36,6 +36,7 @@ ModalDelete.propTypes = {
36
36
  };
37
37
 
38
38
  export const Group = ({ group, groupLoading, deleteGroup }) => {
39
+ const { formatMessage } = useIntl();
39
40
  if (groupLoading || !group.id) return null;
40
41
  const actions = [
41
42
  {
@@ -54,7 +55,13 @@ export const Group = ({ group, groupLoading, deleteGroup }) => {
54
55
  <Grid>
55
56
  <Grid.Column width={12}>
56
57
  <Header as="h2">
57
- <Icon circular name="group" />
58
+ <Icon
59
+ circular
60
+ name={formatMessage({
61
+ id: "group.header.icon",
62
+ defaultMessage: "users",
63
+ })}
64
+ />
58
65
  <Header.Content>
59
66
  {group.name}{" "}
60
67
  <Header.Subheader>{group.description}</Header.Subheader>
@@ -2,28 +2,36 @@ import React from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { Header, Icon, Container, Segment } from "semantic-ui-react";
4
4
  import { connect } from "react-redux";
5
- import { FormattedMessage } from "react-intl";
5
+ import { FormattedMessage, useIntl } from "react-intl";
6
6
  import { createGroup } from "../routines";
7
7
  import GroupForm from "./GroupForm";
8
8
  import GroupBreadcrumbs from "./GroupBreadcrumbs";
9
9
 
10
- const NewGroup = ({ createGroup }) => (
11
- <>
12
- <GroupBreadcrumbs name="groups.actions.create" />
13
- <Container text as={Segment}>
14
- <Header as="h2">
15
- <Icon name="group" />
16
- <Header.Content>
17
- <FormattedMessage
18
- id="groups.actions.create"
19
- defaultMessage="New group"
10
+ const NewGroup = ({ createGroup }) => {
11
+ const { formatMessage } = useIntl();
12
+ return (
13
+ <>
14
+ <GroupBreadcrumbs name="groups.actions.create" />
15
+ <Container text as={Segment}>
16
+ <Header as="h2">
17
+ <Icon
18
+ name={formatMessage({
19
+ id: "group.header.icon",
20
+ defaultMessage: "users",
21
+ })}
20
22
  />
21
- </Header.Content>
22
- </Header>
23
- <GroupForm onSubmit={createGroup} />
24
- </Container>
25
- </>
26
- );
23
+ <Header.Content>
24
+ <FormattedMessage
25
+ id="groups.actions.create"
26
+ defaultMessage="New group"
27
+ />
28
+ </Header.Content>
29
+ </Header>
30
+ <GroupForm onSubmit={createGroup} />
31
+ </Container>
32
+ </>
33
+ );
34
+ };
27
35
 
28
36
  NewGroup.propTypes = {
29
37
  createGroup: PropTypes.func,
@@ -1,12 +1,16 @@
1
1
  import React from "react";
2
- import { shallow } from "enzyme";
3
- import { Group } from "../Group";
2
+ import { render } from "@truedat/test/render";
3
+ import Group from "../Group";
4
+
5
+ const group = { id: 2, name: "grupo1 ", description: "aaa bbb cc" };
6
+
7
+ const renderOpts = {
8
+ state: { group, deleteGroup: jest.fn() },
9
+ };
4
10
 
5
11
  describe("<Group />", () => {
6
12
  it("matches the latest snapshot", () => {
7
- const group = { id: 2, name: "grupo1 ", description: "aaa bbb cc" };
8
- const props = { group };
9
- const wrapper = shallow(<Group {...props} />);
10
- expect(wrapper).toMatchSnapshot();
13
+ const { container } = render(<Group />, renderOpts);
14
+ expect(container).toMatchSnapshot();
11
15
  });
12
16
  });
@@ -1,52 +1,61 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<Group /> matches the latest snapshot 1`] = `
4
- <Grid>
5
- <GridColumn
6
- width={12}
4
+ <div>
5
+ <div
6
+ class="ui grid"
7
7
  >
8
- <Header
9
- as="h2"
8
+ <div
9
+ class="twelve wide column"
10
10
  >
11
- <Icon
12
- as="i"
13
- circular={true}
14
- name="group"
15
- />
16
- <HeaderContent>
17
- grupo1
18
-
19
- <HeaderSubheader>
20
- aaa bbb cc
21
- </HeaderSubheader>
22
- </HeaderContent>
23
- </Header>
24
- </GridColumn>
25
- <GridColumn
26
- textAlign="right"
27
- width={4}
28
- >
29
- <GroupActions
30
- availableActions={
31
- [
32
- {
33
- "active": false,
34
- "as": [Function],
35
- "deleteGroup": undefined,
36
- "group": {
37
- "description": "aaa bbb cc",
38
- "id": 2,
39
- "name": "grupo1 ",
40
- },
41
- "icon": "trash",
42
- "key": "delete",
43
- "selected": false,
44
- "value": "delete",
45
- },
46
- ]
47
- }
48
- direction="left"
49
- />
50
- </GridColumn>
51
- </Grid>
11
+ <h2
12
+ class="ui header"
13
+ >
14
+ <i
15
+ aria-hidden="true"
16
+ class="users circular icon"
17
+ />
18
+ <div
19
+ class="content"
20
+ >
21
+ grupo1
22
+
23
+ <div
24
+ class="sub header"
25
+ >
26
+ aaa bbb cc
27
+ </div>
28
+ </div>
29
+ </h2>
30
+ </div>
31
+ <div
32
+ class="right aligned four wide column"
33
+ >
34
+ <div
35
+ aria-expanded="false"
36
+ class="ui floating dropdown button icon group-actions"
37
+ role="listbox"
38
+ tabindex="0"
39
+ >
40
+ <i
41
+ aria-hidden="true"
42
+ class="ellipsis vertical icon"
43
+ />
44
+ <div
45
+ class="left menu transition"
46
+ >
47
+ <button
48
+ class="ui button"
49
+ >
50
+ <i
51
+ aria-hidden="true"
52
+ class="trash icon"
53
+ />
54
+ Delete
55
+ </button>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
52
61
  `;
@@ -2,21 +2,29 @@ import React from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { Header, Icon, Container, Segment } from "semantic-ui-react";
4
4
  import { connect } from "react-redux";
5
- import { FormattedMessage } from "react-intl";
5
+ import { FormattedMessage, useIntl } from "react-intl";
6
6
  import { createRole } from "../routines";
7
7
  import RoleForm from "./RoleForm";
8
8
 
9
- const NewRole = ({ createRole }) => (
10
- <Container text as={Segment}>
11
- <Header as="h2">
12
- <Icon name="student" />
13
- <Header.Content>
14
- <FormattedMessage id="role.new.role" />
15
- </Header.Content>
16
- </Header>
17
- <RoleForm onSubmit={createRole} />
18
- </Container>
19
- );
9
+ const NewRole = ({ createRole }) => {
10
+ const { formatMessage } = useIntl();
11
+ return (
12
+ <Container text as={Segment}>
13
+ <Header as="h2">
14
+ <Icon
15
+ name={formatMessage({
16
+ id: "role.header.icon",
17
+ defaultMessage: "student",
18
+ })}
19
+ />
20
+ <Header.Content>
21
+ <FormattedMessage id="role.new.role" />
22
+ </Header.Content>
23
+ </Header>
24
+ <RoleForm onSubmit={createRole} />
25
+ </Container>
26
+ );
27
+ };
20
28
 
21
29
  NewRole.propTypes = {
22
30
  createRole: PropTypes.func,
@@ -1,7 +1,7 @@
1
1
  import _ from "lodash/fp";
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
- import { FormattedMessage } from "react-intl";
4
+ import { FormattedMessage, useIntl } from "react-intl";
5
5
  import { Link } from "react-router-dom";
6
6
  import { connect } from "react-redux";
7
7
  import {
@@ -60,8 +60,15 @@ class RoleName extends React.Component {
60
60
  }
61
61
  }
62
62
 
63
- export const Role = ({ id, name, is_default, permissionGroups, updateRole }) =>
64
- id && permissionGroups ? (
63
+ export const Role = ({
64
+ id,
65
+ name,
66
+ is_default,
67
+ permissionGroups,
68
+ updateRole,
69
+ }) => {
70
+ const { formatMessage } = useIntl();
71
+ return id && permissionGroups ? (
65
72
  <>
66
73
  <Breadcrumb>
67
74
  <Breadcrumb.Section as={Link} to={ROLES} active={false}>
@@ -72,7 +79,12 @@ export const Role = ({ id, name, is_default, permissionGroups, updateRole }) =>
72
79
  </Breadcrumb>
73
80
  <Segment>
74
81
  <Header as="h2">
75
- <Icon name="student" />
82
+ <Icon
83
+ name={formatMessage({
84
+ id: "role.header.icon",
85
+ defaultMessage: "student",
86
+ })}
87
+ />
76
88
  <Header.Content>
77
89
  <RoleName
78
90
  name={name}
@@ -102,6 +114,7 @@ export const Role = ({ id, name, is_default, permissionGroups, updateRole }) =>
102
114
  </Segment>
103
115
  </>
104
116
  ) : null;
117
+ };
105
118
 
106
119
  Role.propTypes = {
107
120
  id: PropTypes.number,
@@ -2,33 +2,42 @@ import React from "react";
2
2
  import PropTypes from "prop-types";
3
3
  import { connect } from "react-redux";
4
4
  import { Button, Header, Segment, Icon } from "semantic-ui-react";
5
- import { FormattedMessage } from "react-intl";
5
+ import { FormattedMessage, useIntl } from "react-intl";
6
6
  import { Link } from "react-router-dom";
7
7
  import { linkTo } from "@truedat/core/routes";
8
8
  import RoleCards from "./RoleCards";
9
9
 
10
- export const Roles = ({ roles, rolesLoading }) => (
11
- <Segment loading={rolesLoading}>
12
- <Header as="h2">
13
- <Button
14
- primary
15
- floated="right"
16
- as={Link}
17
- to={linkTo.ROLES_NEW()}
18
- content={<FormattedMessage id="roles.create" />}
19
- />
20
- <Icon circular name="student" />
21
- <Header.Content>
22
- <FormattedMessage id="roles.header" />
23
- <Header.Subheader>
24
- <FormattedMessage id="roles.subheader" />
25
- </Header.Subheader>
26
- </Header.Content>
27
- </Header>
10
+ export const Roles = ({ roles, rolesLoading }) => {
11
+ const { formatMessage } = useIntl();
12
+ return (
13
+ <Segment loading={rolesLoading}>
14
+ <Header as="h2">
15
+ <Button
16
+ primary
17
+ floated="right"
18
+ as={Link}
19
+ to={linkTo.ROLES_NEW()}
20
+ content={<FormattedMessage id="roles.create" />}
21
+ />
22
+ <Icon
23
+ circular
24
+ name={formatMessage({
25
+ id: "roles.header.icon",
26
+ defaultMessage: "student",
27
+ })}
28
+ />
29
+ <Header.Content>
30
+ <FormattedMessage id="roles.header" />
31
+ <Header.Subheader>
32
+ <FormattedMessage id="roles.subheader" />
33
+ </Header.Subheader>
34
+ </Header.Content>
35
+ </Header>
28
36
 
29
- <RoleCards roles={roles} />
30
- </Segment>
31
- );
37
+ <RoleCards roles={roles} />
38
+ </Segment>
39
+ );
40
+ };
32
41
 
33
42
  Roles.propTypes = {
34
43
  roles: PropTypes.array,
@@ -1,6 +1,10 @@
1
1
  import React from "react";
2
- import { shallow } from "enzyme";
3
- import { Role } from "../Role";
2
+ import { render } from "@truedat/test/render";
3
+ import Role from "../Role";
4
+
5
+ const renderOpts = {
6
+ state: { deleteRole: jest.fn(), updateRole: jest.fn() },
7
+ };
4
8
 
5
9
  describe("<Role />", () => {
6
10
  const id = 1;
@@ -10,7 +14,7 @@ describe("<Role />", () => {
10
14
  const props = { id, name, rolePermissions, permissionGroups };
11
15
 
12
16
  it("matches the latest snapshot", () => {
13
- const wrapper = shallow(<Role {...props} />);
14
- expect(wrapper).toMatchSnapshot();
17
+ const { container } = render(<Role {...props} />, renderOpts);
18
+ expect(container).toMatchSnapshot();
15
19
  });
16
20
  });
@@ -1,83 +1,63 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<Role /> matches the latest snapshot 1`] = `
4
- <Fragment>
5
- <Breadcrumb>
6
- <BreadcrumbSection
7
- active={false}
8
- as={
9
- {
10
- "$$typeof": Symbol(react.forward_ref),
11
- "displayName": "Link",
12
- "propTypes": {
13
- "innerRef": [Function],
14
- "onClick": [Function],
15
- "replace": [Function],
16
- "target": [Function],
17
- "to": [Function],
18
- },
19
- "render": [Function],
20
- }
21
- }
22
- to="/roles"
4
+ <div>
5
+ <div
6
+ class="ui breadcrumb"
7
+ >
8
+ <a
9
+ class="section"
10
+ href="/roles"
23
11
  >
24
- <MemoizedFormattedMessage
25
- id="navigation.members.roles"
26
- />
27
- </BreadcrumbSection>
28
- <BreadcrumbDivider
29
- icon="right angle"
12
+ Roles
13
+ </a>
14
+ <i
15
+ aria-hidden="true"
16
+ class="right angle icon divider"
30
17
  />
31
- <BreadcrumbSection
32
- active={true}
18
+ <div
19
+ class="active section"
33
20
  >
34
21
  Data Steward
35
- </BreadcrumbSection>
36
- </Breadcrumb>
37
- <Segment>
38
- <Header
39
- as="h2"
22
+ </div>
23
+ </div>
24
+ <div
25
+ class="ui segment"
26
+ >
27
+ <h2
28
+ class="ui header"
40
29
  >
41
- <Icon
42
- as="i"
43
- name="student"
30
+ <i
31
+ aria-hidden="true"
32
+ class="student icon"
44
33
  />
45
- <HeaderContent>
46
- <RoleName
47
- name="Data Steward"
48
- updateName={[Function]}
49
- />
50
- <HeaderSubheader>
51
- <MemoizedFormattedMessage
52
- id="role.subheader"
53
- />
54
- </HeaderSubheader>
55
- </HeaderContent>
56
- </Header>
57
- <Checkbox
58
- label={
59
- {
60
- "children": <Memo(MemoizedFormattedMessage)
61
- id="roles.default"
62
- />,
63
- }
64
- }
65
- onChange={[Function]}
66
- type="checkbox"
67
- />
68
- <Connect(PermissionGroup)
69
- key="0"
70
- name="Group1"
71
- permissions={
72
- [
73
- {
74
- "id": 1,
75
- "name": "perm1",
76
- },
77
- ]
78
- }
79
- roleId={1}
80
- />
81
- </Segment>
82
- </Fragment>
34
+ <div
35
+ class="content"
36
+ >
37
+ <span>
38
+ Data Steward
39
+ </span>
40
+ <div
41
+ class="sub header"
42
+ >
43
+ Role
44
+ </div>
45
+ </div>
46
+ </h2>
47
+ <div
48
+ class="ui checkbox"
49
+ >
50
+ <input
51
+ class="hidden"
52
+ readonly=""
53
+ tabindex="0"
54
+ type="checkbox"
55
+ value=""
56
+ />
57
+ <label>
58
+ Default
59
+ </label>
60
+ </div>
61
+ </div>
62
+ </div>
83
63
  `;
@@ -2,10 +2,9 @@ import _ from "lodash/fp";
2
2
  import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { Container, Header, Icon, Segment } from "semantic-ui-react";
5
- import { FormattedMessage } from "react-intl";
5
+ import { FormattedMessage, useIntl } from "react-intl";
6
6
  import { connect } from "react-redux";
7
7
  import { useForm, Controller } from "react-hook-form";
8
- import { useIntl } from "react-intl";
9
8
  import { Button, Form } from "semantic-ui-react";
10
9
  import { HistoryBackButton } from "@truedat/core/components";
11
10
  import { updatePassword } from "../routines";
@@ -50,7 +49,13 @@ export const Password = ({
50
49
  return (
51
50
  <Container text as={Segment}>
52
51
  <Header as="h2">
53
- <Icon name="user" circular />
52
+ <Icon
53
+ circular
54
+ name={formatMessage({
55
+ id: "user.password.header.icon",
56
+ defaultMessage: "user",
57
+ })}
58
+ />
54
59
  <Header.Content>
55
60
  {_.isEmpty(userName) ? (
56
61
  <FormattedMessage id="user.password.header" />
@@ -3,21 +3,28 @@ import React from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { Divider, Header, Grid, Icon, Segment } from "semantic-ui-react";
5
5
  import { connect } from "react-redux";
6
- import { FormattedMessage } from "react-intl";
6
+ import { FormattedMessage, useIntl } from "react-intl";
7
7
  import UserActions from "./UserActions";
8
8
  import UserAcls from "./UserAcls";
9
9
  import UserBreadcrumbs from "./UserBreadcrumbs";
10
10
  import UserGroupAcls from "./UserGroupAcls";
11
11
 
12
- export const User = ({ user }) =>
13
- _.isEmpty(user) ? null : (
12
+ export const User = ({ user }) => {
13
+ const { formatMessage } = useIntl();
14
+ return _.isEmpty(user) ? null : (
14
15
  <>
15
16
  <UserBreadcrumbs name={user.user_name} />
16
17
  <Segment>
17
18
  <Grid>
18
19
  <Grid.Column width={8}>
19
20
  <Header floated="left" as="h2">
20
- <Icon name="user" circular />
21
+ <Icon
22
+ circular
23
+ name={formatMessage({
24
+ id: "users.header.icon",
25
+ defaultMessage: "users",
26
+ })}
27
+ />
21
28
  <Header.Content>
22
29
  {user.user_name}
23
30
  <Header.Subheader>
@@ -43,6 +50,7 @@ export const User = ({ user }) =>
43
50
  </Segment>
44
51
  </>
45
52
  );
53
+ };
46
54
 
47
55
  User.propTypes = {
48
56
  user: PropTypes.object,
@@ -2,32 +2,41 @@ import React from "react";
2
2
  import { connect } from "react-redux";
3
3
  import { Route, Switch } from "react-router-dom";
4
4
  import { Header, Icon, Segment } from "semantic-ui-react";
5
- import { FormattedMessage } from "react-intl";
5
+ import { FormattedMessage, useIntl } from "react-intl";
6
6
  import { GROUPS, USERS } from "@truedat/core/routes";
7
7
  import GroupCards from "../../groups/components/GroupCards";
8
8
  import UserCards from "./UserCards";
9
9
  import UserTabs from "./UserTabs";
10
10
 
11
- export const UsersAndGroups = () => (
12
- <Segment>
13
- <Header as="h2">
14
- <Icon name="users" circular />
15
- <Header.Content>
16
- <FormattedMessage id="users.header" />
17
- <Header.Subheader>
18
- <FormattedMessage id="users.subheader" />
19
- </Header.Subheader>
20
- </Header.Content>
21
- </Header>
22
- <UserTabs />
23
- <Segment attached="bottom">
24
- <Switch>
25
- <Route path={USERS} render={() => <UserCards />} exact />
26
- <Route path={GROUPS} render={() => <GroupCards />} exact />
27
- </Switch>
11
+ export const UsersAndGroups = () => {
12
+ const { formatMessage } = useIntl();
13
+ return (
14
+ <Segment>
15
+ <Header as="h2">
16
+ <Icon
17
+ circular
18
+ name={formatMessage({
19
+ id: "users.header.icon",
20
+ defaultMessage: "users",
21
+ })}
22
+ />
23
+ <Header.Content>
24
+ <FormattedMessage id="users.header" />
25
+ <Header.Subheader>
26
+ <FormattedMessage id="users.subheader" />
27
+ </Header.Subheader>
28
+ </Header.Content>
29
+ </Header>
30
+ <UserTabs />
31
+ <Segment attached="bottom">
32
+ <Switch>
33
+ <Route path={USERS} render={() => <UserCards />} exact />
34
+ <Route path={GROUPS} render={() => <GroupCards />} exact />
35
+ </Switch>
36
+ </Segment>
28
37
  </Segment>
29
- </Segment>
30
- );
38
+ );
39
+ };
31
40
 
32
41
  const mapStateToProps = ({ usersLoading }) => ({ usersLoading });
33
42
 
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { shallow } from "enzyme";
3
- import { User } from "../User";
2
+ import { render } from "@truedat/test/render";
3
+ import User from "../User";
4
4
 
5
5
  describe("<User />", () => {
6
6
  const user = {
@@ -8,12 +8,15 @@ describe("<User />", () => {
8
8
  user_name: "joe",
9
9
  role: "admin",
10
10
  full_name: "Joe Bloggs",
11
- email: "joe@bloggs.net"
11
+ email: "joe@bloggs.net",
12
+ };
13
+ const renderOpts = {
14
+ state: { user },
12
15
  };
13
- const props = { user };
14
16
 
15
17
  it("matches the latest snapshot", () => {
16
- const wrapper = shallow(<User {...props} />);
17
- expect(wrapper).toMatchSnapshot();
18
+ const { container, debug } = render(<User />, renderOpts);
19
+ debug();
20
+ expect(container).toMatchSnapshot();
18
21
  });
19
22
  });
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
- import { shallow } from "enzyme";
2
+ import { render } from "@truedat/test/render";
3
3
  import { UsersAndGroups } from "../UsersAndGroups";
4
4
 
5
5
  describe("<UsersAndGroups />", () => {
6
6
  it("matches the latest snapshot", () => {
7
- const wrapper = shallow(<UsersAndGroups />);
8
- expect(wrapper).toMatchSnapshot();
7
+ const { container } = render(<UsersAndGroups />);
8
+ expect(container).toMatchSnapshot();
9
9
  });
10
10
  });
@@ -1,54 +1,123 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<User /> matches the latest snapshot 1`] = `
4
- <Fragment>
5
- <UserBreadcrumbs
6
- name="joe"
7
- />
8
- <Segment>
9
- <Grid>
10
- <GridColumn
11
- width={8}
4
+ <div>
5
+ <div
6
+ class="ui breadcrumb"
7
+ >
8
+ <a
9
+ class="section"
10
+ href="/users"
11
+ >
12
+ Users
13
+ </a>
14
+ <i
15
+ aria-hidden="true"
16
+ class="right angle icon divider"
17
+ />
18
+ <div
19
+ class="active section"
20
+ >
21
+ joe
22
+ </div>
23
+ </div>
24
+ <div
25
+ class="ui segment"
26
+ >
27
+ <div
28
+ class="ui grid"
29
+ >
30
+ <div
31
+ class="eight wide column"
12
32
  >
13
- <Header
14
- as="h2"
15
- floated="left"
33
+ <h2
34
+ class="ui left floated header"
16
35
  >
17
- <Icon
18
- as="i"
19
- circular={true}
20
- name="user"
36
+ <i
37
+ aria-hidden="true"
38
+ class="users circular icon"
21
39
  />
22
- <HeaderContent>
40
+ <div
41
+ class="content"
42
+ >
23
43
  joe
24
- <HeaderSubheader>
25
- <MemoizedFormattedMessage
26
- id="user.type.admin"
27
- />
28
- </HeaderSubheader>
29
- </HeaderContent>
30
- </Header>
31
- </GridColumn>
32
- <GridColumn
33
- textAlign="right"
34
- width={8}
44
+ <div
45
+ class="sub header"
46
+ >
47
+ Administrator
48
+ </div>
49
+ </div>
50
+ </h2>
51
+ </div>
52
+ <div
53
+ class="right aligned eight wide column"
35
54
  >
36
- <Connect(UserActions) />
37
- </GridColumn>
38
- <GridColumn
39
- width={8}
55
+ <div
56
+ aria-expanded="false"
57
+ class="ui floating dropdown button icon group-actions"
58
+ role="listbox"
59
+ tabindex="0"
60
+ >
61
+ <i
62
+ aria-hidden="true"
63
+ class="ellipsis vertical icon"
64
+ />
65
+ <div
66
+ class="left menu transition"
67
+ >
68
+ <a
69
+ aria-checked="false"
70
+ aria-selected="false"
71
+ class="item"
72
+ href="/users/1/edit"
73
+ role="option"
74
+ style="pointer-events: all;"
75
+ >
76
+ <i
77
+ aria-hidden="true"
78
+ class="edit icon"
79
+ />
80
+ Edit
81
+ </a>
82
+ <a
83
+ aria-checked="false"
84
+ aria-selected="false"
85
+ class="item"
86
+ href="/users/1/password"
87
+ role="option"
88
+ style="pointer-events: all;"
89
+ >
90
+ <i
91
+ aria-hidden="true"
92
+ class="unlock alternate icon"
93
+ />
94
+ Change password
95
+ </a>
96
+ <button
97
+ class="ui button"
98
+ >
99
+ <i
100
+ aria-hidden="true"
101
+ class="trash icon"
102
+ />
103
+ Delete
104
+ </button>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ <div
109
+ class="eight wide column"
40
110
  >
41
111
  Joe Bloggs
42
112
  <br />
43
113
  joe@bloggs.net
44
114
  <br />
45
- <Divider
46
- hidden={true}
115
+
116
+ <div
117
+ class="ui hidden divider"
47
118
  />
48
- <Connect(UserAcls) />
49
- <Connect(UserGroupAcls) />
50
- </GridColumn>
51
- </Grid>
52
- </Segment>
53
- </Fragment>
119
+ </div>
120
+ </div>
121
+ </div>
122
+ </div>
54
123
  `;
@@ -1,42 +1,47 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
3
  exports[`<UsersAndGroups /> matches the latest snapshot 1`] = `
4
- <Segment>
5
- <Header
6
- as="h2"
4
+ <div>
5
+ <div
6
+ class="ui segment"
7
7
  >
8
- <Icon
9
- as="i"
10
- circular={true}
11
- name="users"
12
- />
13
- <HeaderContent>
14
- <MemoizedFormattedMessage
15
- id="users.header"
16
- />
17
- <HeaderSubheader>
18
- <MemoizedFormattedMessage
19
- id="users.subheader"
20
- />
21
- </HeaderSubheader>
22
- </HeaderContent>
23
- </Header>
24
- <UserTabs />
25
- <Segment
26
- attached="bottom"
27
- >
28
- <Switch>
29
- <Route
30
- exact={true}
31
- path="/users"
32
- render={[Function]}
8
+ <h2
9
+ class="ui header"
10
+ >
11
+ <i
12
+ aria-hidden="true"
13
+ class="users circular icon"
33
14
  />
34
- <Route
35
- exact={true}
36
- path="/groups"
37
- render={[Function]}
38
- />
39
- </Switch>
40
- </Segment>
41
- </Segment>
15
+ <div
16
+ class="content"
17
+ >
18
+ Users
19
+ <div
20
+ class="sub header"
21
+ >
22
+ Manage users and groups
23
+ </div>
24
+ </div>
25
+ </h2>
26
+ <div
27
+ class="ui pointing secondary top attached tabular menu"
28
+ >
29
+ <a
30
+ class="item"
31
+ href="/users"
32
+ >
33
+ Users
34
+ </a>
35
+ <a
36
+ class="item"
37
+ href="/groups"
38
+ >
39
+ Groups
40
+ </a>
41
+ </div>
42
+ <div
43
+ class="ui bottom attached segment"
44
+ />
45
+ </div>
46
+ </div>
42
47
  `;