How to use the ember-cli-mirage.faker.company function in ember-cli-mirage

To help you get started, we’ve selected a few ember-cli-mirage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dustinfarris / ember-cashay / tests / dummy / mirage / factories / todo.js View on Github external
import { Factory, faker } from 'ember-cli-mirage';

export default Factory.extend({
  createdAt: faker.date.past(1),  // some time in the past 1 year
  description: faker.company.bs
});
github ember-admin / ember-cli-admin / tests / dummy / app / mirage / factories / user_category.js View on Github external
import Mirage, { faker } from 'ember-cli-mirage';

export default Mirage.Factory.extend({
  name: faker.company.bsNoun(),
  zip_code: '123456',
  email: faker.internet.email(),
  is_created: true,
  expired_at: faker.date.past(),
  color: faker.internet.color(),
  description: faker.lorem.sentences(10),
  avatar_ids: function() {
    return [1, 2];
  },
});
github offirgolan / ember-light-table / tests / dummy / mirage / factories / user.js View on Github external
/*
  This is an example factory definition.

  Create more files in this directory to define additional factories.
*/
import Mirage, { faker } from 'ember-cli-mirage';

faker.locale = 'en_US';

const MATERIAL_UI_COLORS = ['#F44336', '#E91E63', '#9C27B0', '#009688', '#2196F3', '#4CAF50', '#FFC107', '#FF5722', '#607D8B'];

export default Mirage.Factory.extend({
  firstName: faker.name.firstName,
  lastName: faker.name.firstName,
  company: faker.company.companyName,
  address: faker.address.streetAddress,
  country: faker.address.country,
  state: faker.address.state,
  email: faker.internet.email,
  username: faker.internet.userName,
  avatar: faker.internet.avatar,
  bio: faker.lorem.paragraph,
  color: () => faker.random.arrayElement(MATERIAL_UI_COLORS)
});
github api-hogs / ember-data-offline / tests / dummy / app / mirage / factories / company.js View on Github external
import Mirage, {faker} from 'ember-cli-mirage';

export default Mirage.Factory.extend({
  name: faker.company.companyName,
  office: function(i) {
    let id = i + 1;
    return id;
  },
});
github hashicorp / levant / vendor / github.com / hashicorp / nomad / ui / mirage / factories / node.js View on Github external
import { Factory, faker, trait } from 'ember-cli-mirage';
import { provide } from '../utils';
import { DATACENTERS, HOSTS, generateResources } from '../common';
import moment from 'moment';

const UUIDS = provide(100, faker.random.uuid.bind(faker.random));
const NODE_STATUSES = ['initializing', 'ready', 'down'];
const NODE_CLASSES = provide(7, faker.company.bsBuzz.bind(faker.company));
const REF_DATE = new Date();

export default Factory.extend({
  id: i => (i / 100 >= 1 ? `${UUIDS[i]}-${i}` : UUIDS[i]),
  name: i => `nomad@${HOSTS[i % HOSTS.length]}`,

  datacenter: faker.list.random(...DATACENTERS),
  nodeClass: faker.list.random(...NODE_CLASSES),
  drain: faker.random.boolean,
  status: faker.list.random(...NODE_STATUSES),
  tls_enabled: faker.random.boolean,
  schedulingEligibility: () => (faker.random.boolean() ? 'eligible' : 'ineligible'),

  createIndex: i => i,
  modifyIndex: () => faker.random.number({ min: 10, max: 2000 }),
github CenterForOpenScience / ember-osf-web / mirage / factories / node.ts View on Github external
title() {
        return capitalize(faker.random.arrayElement([
            faker.company.bs,
            faker.company.catchPhrase,
            faker.hacker.noun,
            faker.lorem.word,
        ])());
    },
    collection: false,
github hummingbird-me / hummingbird-client / mirage / factories / streamer.js View on Github external
  siteName() { return faker.company.companyName(); },
  logo() { return faker.image.business(); }
github jonblack / bookworm / frontend / app / mirage / factories / book.js View on Github external
title: function() {
        return faker.company.catchPhraseAdjective() + " " + faker.company.catchPhraseNoun();
    },
});