huridocs/uwazi

View on GitHub
app/api/migrations/migrations/160-update-translations/specs/fixtures.ts

Summary

Maintainability
C
1 day
Test Coverage
A
100%
import db from 'api/utils/testing_db';
import { Fixture } from '../types';

const fixtures: Fixture = {
  settings: [{ _id: db.id(), languages: [{ key: 'en' }, { key: 'es' }] }],
  translationsV2: [
    {
      _id: db.id(),
      language: 'en',
      context: { id: 'System', label: 'User Interface', type: 'Uwazi UI' },
      key: 'Current value:',
      value: 'Current value:',
    },
    {
      _id: db.id(),
      language: 'es',
      context: { id: 'System', label: 'User Interface', type: 'Uwazi UI' },
      key: 'Current value:',
      value: 'Current value:',
    },
    {
      _id: db.id(),
      language: 'en',
      context: { id: 'System', label: 'User Interface', type: 'Uwazi UI' },
      key: 'Im cool',
      value: 'Im cool',
    },
    {
      _id: db.id(),
      language: 'es',
      context: { id: 'System', label: 'User Interface', type: 'Uwazi UI' },
      key: 'Im cool',
      value: 'Im cool',
    },
  ],
};

export { fixtures };