huridocs/uwazi

View on GitHub
app/react/Settings/specs/__snapshots__/Settings.spec.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Settings render should add the only-desktop class when recieving children only 1`] = `
<div
  className="row settings"
>
  <HelmetWrapper
    defer={true}
    encodeSpecialCharacters={true}
  >
    <title>
      Settings
    </title>
  </HelmetWrapper>
  <div
    className="settings-navigation "
  >
    <Connect(SettingsNavigationComponent) />
  </div>
  <Outlet />
</div>
`;

exports[`Settings render should add the only-desktop class when recieving children only 2`] = `
<div
  className="row settings"
>
  <HelmetWrapper
    defer={true}
    encodeSpecialCharacters={true}
  >
    <title>
      Settings
    </title>
  </HelmetWrapper>
  <div
    className="settings-navigation "
  >
    <Connect(SettingsNavigationComponent) />
  </div>
  <Outlet />
</div>
`;

exports[`Settings requestState should get the current user, and metadata 1`] = `
Array [
  Object {
    "type": "auth/user/SET",
    "value": Object {
      "name": "doe",
      "role": "admin",
    },
  },
  Object {
    "type": "dictionaries/SET",
    "value": Array [
      Object {
        "_id": 1,
        "name": "Countries",
      },
    ],
  },
  Object {
    "type": "translations/SET",
    "value": Array [
      Object {
        "_id": 1,
        "locale": "es",
        "values": Object {},
      },
    ],
  },
  Object {
    "type": "settings/collection/SET",
    "value": Object {
      "siteName": "BatCave",
    },
  },
  Object {
    "type": "settings/stats/SET",
    "value": Object {
      "files": 3,
      "users": 2,
    },
  },
]
`;

exports[`Settings requestState should not request the stats if the user does not have admin role 1`] = `
Array [
  Object {
    "type": "auth/user/SET",
    "value": Object {
      "name": "jane",
      "role": "editor",
    },
  },
  Object {
    "type": "dictionaries/SET",
    "value": Array [
      Object {
        "_id": 1,
        "name": "Countries",
      },
    ],
  },
  Object {
    "type": "translations/SET",
    "value": Array [
      Object {
        "_id": 1,
        "locale": "es",
        "values": Object {},
      },
    ],
  },
  Object {
    "type": "settings/collection/SET",
    "value": Object {
      "siteName": "BatCave",
    },
  },
  Object {
    "type": "settings/stats/SET",
    "value": Object {},
  },
]
`;