huridocs/uwazi

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

Summary

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

exports[`ItemSnippet should first metadata snippet if exists 1`] = `
<div
  className="item-snippet-wrapper"
>
  <div
    className="item-snippet-source"
  >
    Title
  </div>
  <div
    className="item-snippet"
    onClick={[MockFunction]}
  >
    <SafeHTML>
      title 1 &lt;b&gt;snippet&lt;/b&gt; found
    </SafeHTML>
  </div>
  <div>
    <a
      onClick={[MockFunction]}
    >
      Show more
    </a>
  </div>
</div>
`;

exports[`ItemSnippet should first metadata snippet if metadata only has metadata field snippets 1`] = `
<div
  className="item-snippet-wrapper"
>
  <div
    className="item-snippet-source"
  >
    Summary
  </div>
  <div
    className="item-snippet"
    onClick={[MockFunction]}
  >
    <SafeHTML>
      metadata 1 &lt;b&gt;snippet&lt;/b&gt; found
    </SafeHTML>
  </div>
  <div>
    <a
      onClick={[MockFunction]}
    >
      Show more
    </a>
  </div>
</div>
`;

exports[`ItemSnippet should first metadata snippet when there are no document content snippets 1`] = `
<div
  className="item-snippet-wrapper"
>
  <div
    className="item-snippet-source"
  >
    Title
  </div>
  <div
    className="item-snippet"
    onClick={[MockFunction]}
  >
    <SafeHTML>
      title 1 &lt;b&gt;snippet&lt;/b&gt; found
    </SafeHTML>
  </div>
  <div>
    <a
      onClick={[MockFunction]}
    >
      Show more
    </a>
  </div>
</div>
`;

exports[`ItemSnippet should first title snippet if metadata only has title snippets 1`] = `
<div
  className="item-snippet-wrapper"
>
  <div
    className="item-snippet-source"
  >
    Title
  </div>
  <div
    className="item-snippet"
    onClick={[MockFunction]}
  >
    <SafeHTML>
      title 1 &lt;b&gt;snippet&lt;/b&gt; found
    </SafeHTML>
  </div>
  <div>
    <a
      onClick={[MockFunction]}
    >
      Show more
    </a>
  </div>
</div>
`;

exports[`ItemSnippet should show first document snippet if there are not metadata snippets 1`] = `
<div
  className="item-snippet-wrapper"
>
  <div
    className="item-snippet-source"
  >
    Document contents
  </div>
  <div
    className="item-snippet"
    onClick={[MockFunction]}
  >
    <SafeHTML>
      doc &lt;b&gt;snippet&lt;/b&gt; found
    </SafeHTML>
  </div>
  <div>
    <a
      onClick={[MockFunction]}
    >
      Show more
    </a>
  </div>
</div>
`;