huridocs/uwazi

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

Summary

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

exports[`EditTemplate static requestState() should request templates and thesauris, and return templates, thesauris and find the editing template 1`] = `
Array [
  Object {
    "external": true,
    "load": true,
    "model": "template.data",
    "multi": false,
    "silent": true,
    "type": "rrf/change",
    "value": Object {
      "_id": "abc2",
      "commonProperties": Array [
        Object {
          "generatedId": false,
          "isCommonProperty": true,
          "label": "Title",
          "localID": "unique_id",
          "name": "title",
          "prioritySorting": false,
          "type": "text",
        },
        Object {
          "isCommonProperty": true,
          "label": "Date added",
          "localID": "unique_id",
          "name": "creationDate",
          "prioritySorting": false,
          "type": "date",
        },
        Object {
          "isCommonProperty": true,
          "label": "Date modified",
          "localID": "unique_id",
          "name": "editDate",
          "prioritySorting": false,
          "type": "date",
        },
      ],
      "properties": Array [
        Object {
          "label": "label3",
          "localID": "unique_id",
        },
        Object {
          "label": "label4",
          "localID": "unique_id",
        },
      ],
    },
  },
  Object {
    "type": "thesauris/SET",
    "value": Array [
      Object {
        "label": "1",
      },
      Object {
        "label": "2",
      },
    ],
  },
  Object {
    "type": "templates/SET",
    "value": Array [
      Object {
        "_id": "abc1",
        "commonProperties": Array [
          Object {
            "label": "existingProperty",
          },
        ],
        "properties": Array [
          Object {
            "label": "label1",
          },
          Object {
            "label": "label2",
          },
        ],
      },
      Object {
        "_id": "abc2",
        "properties": Array [
          Object {
            "label": "label3",
          },
          Object {
            "label": "label4",
          },
        ],
      },
      Object {
        "_id": "abc3",
        "commonProperties": Array [],
        "properties": Array [
          Object {
            "label": "label3",
          },
          Object {
            "label": "label4",
          },
        ],
      },
    ],
  },
  Object {
    "type": "relationTypes/SET",
    "value": Array [
      Object {
        "name": "Friend",
      },
      Object {
        "name": "Family",
      },
    ],
  },
]
`;