Skip to content
Permalink
Browse files

fix(deps): update ember-cli-mirage to v1.0.0

BREAKING CHANGE: This change requires the users of ember-caluma to
manually add faker and ember-auto-import to their devDependencies:

`yarn add -D faker ember-auto-import`

This is necessary because ember-cli-mirage stopped including faker in
their build. Since we expose factories using faker to the host app, they
need to install this.
  • Loading branch information...
anehx authored and czosel committed May 24, 2019
1 parent d4291cd commit 0ff0e236c90094831a9a2d8f85d6daffad70b66a
Showing with 63 additions and 67 deletions.
  1. +2 −1 addon-mirage-support/factories/answer.js
  2. +3 −2 addon-mirage-support/factories/case.js
  3. +2 −1 addon-mirage-support/factories/file.js
  4. +2 −1 addon-mirage-support/factories/form.js
  5. +3 −2 addon-mirage-support/factories/question.js
  6. +3 −2 addon-mirage-support/factories/task.js
  7. +4 −4 addon-mirage-support/factories/work-item.js
  8. +2 −1 package.json
  9. +1 −1 tests/acceptance/form-edit-test.js
  10. +1 −1 tests/acceptance/form-list-test.js
  11. +1 −1 tests/acceptance/form-new-test.js
  12. +1 −1 tests/acceptance/navigation-test.js
  13. +1 −1 tests/acceptance/question-add-test.js
  14. +1 −1 tests/acceptance/question-edit-test.js
  15. +1 −1 tests/acceptance/question-new-test.js
  16. +1 −1 tests/acceptance/question-remove-test.js
  17. +1 −1 tests/acceptance/question-reorder-test.js
  18. +1 −1 tests/integration/components/cf-field/input/file-test.js
  19. +1 −1 tests/integration/components/cf-form-test.js
  20. +1 −1 tests/integration/components/cfb-form-editor-test.js
  21. +1 −1 tests/integration/components/cfb-form-editor/general-test.js
  22. +1 −1 tests/integration/components/cfb-form-editor/question-list-test.js
  23. +1 −1 tests/integration/components/cfb-form-editor/question-test.js
  24. +1 −1 tests/unit/mirage/mocks/answer-test.js
  25. +1 −1 tests/unit/mirage/mocks/base-test.js
  26. +1 −1 tests/unit/mirage/mocks/case-test.js
  27. +1 −1 tests/unit/mirage/mocks/document-test.js
  28. +1 −1 tests/unit/mirage/mocks/form-test.js
  29. +1 −1 tests/unit/mirage/mocks/question-test.js
  30. +1 −1 tests/unit/mirage/mocks/task-test.js
  31. +1 −1 tests/unit/mirage/mocks/work-item-test.js
  32. +19 −30 yarn.lock
@@ -1,4 +1,5 @@
import { Factory, faker } from "ember-cli-mirage";
import { Factory } from "ember-cli-mirage";
import faker from "faker";

export default Factory.extend({
afterCreate(answer) {
@@ -1,10 +1,11 @@
import { Factory, faker } from "ember-cli-mirage";
import { Factory } from "ember-cli-mirage";
import faker from "faker";

const STATUS = ["RUNNING", "COMPLETED", "CANCELED"];

export default Factory.extend({
createdByUser: faker.random.uuid(),
createdAt: faker.date.past(),
modifiedAt: faker.date.past(),
status: faker.list.random(...STATUS)
status: faker.random.arrayElement(STATUS)
});
@@ -1,4 +1,5 @@
import { Factory, faker } from "ember-cli-mirage";
import { Factory } from "ember-cli-mirage";
import faker from "faker";

export default Factory.extend({
createdAt: faker.date.past(),
@@ -1,4 +1,5 @@
import { Factory, faker } from "ember-cli-mirage";
import { Factory } from "ember-cli-mirage";
import faker from "faker";

export default Factory.extend({
name: i => `Form #${i + 1}`,
@@ -1,4 +1,5 @@
import { Factory, faker } from "ember-cli-mirage";
import { Factory } from "ember-cli-mirage";
import faker from "faker";

const TYPES = [
"TEXT",
@@ -16,7 +17,7 @@ const TYPES = [
export default Factory.extend({
slug: i => `question-${i + 1}`,
label: () => `${faker.lorem.sentence().replace(/\.$/, "")}?`,
type: faker.list.random(...TYPES),
type: faker.random.arrayElement(TYPES),
isRequired: () => faker.random.boolean().toString(),
isHidden: "false",
isArchived: false,
@@ -1,11 +1,12 @@
import { Factory, faker } from "ember-cli-mirage";
import { Factory } from "ember-cli-mirage";
import faker from "faker";

const TYPES = ["SIMPLE", "COMPLETE_WORKFLOW_FORM", "COMPLETE_TASK_FORM"];

export default Factory.extend({
name: i => `Task #${i + 1}`,
slug: i => `task-${i + 1}`,
type: faker.list.random(...TYPES),
type: faker.random.arrayElement(TYPES),
createdByUser: faker.random.uuid(),
createdAt: faker.date.past()
});
@@ -1,12 +1,12 @@
import { Factory, faker } from "ember-cli-mirage";
import { Factory } from "ember-cli-mirage";
import faker from "faker";

const STATUS = ["READY", "CANCELED", "COMPLETED"];

export default Factory.extend({
createdByUser: faker.random.uuid(),
createdAt: faker.date.past(),
deadline: faker.date.future(),
status: faker.list.random(...STATUS),
// eslint-disable-next-line ember/avoid-leaking-state-in-ember-objects
addressedGroups: ["group1", "group2"]
status: faker.random.arrayElement(STATUS),
addressedGroups: () => ["group1", "group2"]
});
@@ -84,7 +84,7 @@
"ember-cli-eslint": "5.1.0",
"ember-cli-htmlbars-inline-precompile": "2.1.0",
"ember-cli-inject-live-reload": "2.0.1",
"ember-cli-mirage": "0.4.15",
"ember-cli-mirage": "1.0.0",
"ember-cli-moment-shim": "3.7.1",
"ember-cli-shims": "1.2.0",
"ember-cli-sri": "2.1.1",
@@ -106,6 +106,7 @@
"eslint-plugin-ember": "6.5.0",
"eslint-plugin-node": "9.1.0",
"eslint-plugin-prettier": "2.6.0",
"faker": "^4.1.0",
"graphql-cli": "3.0.11",
"husky": "2.3.0",
"loader.js": "4.7.0",
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | form edit", function(hooks) {
setupApplicationTest(hooks);
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | form list", function(hooks) {
setupApplicationTest(hooks);
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | form new", function(hooks) {
setupApplicationTest(hooks);
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, currentURL, click, settled } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import { setupIntl } from "ember-intl/test-support";

module("Acceptance | navigation", function(hooks) {
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | question add", function(hooks) {
setupApplicationTest(hooks);
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | question edit", function(hooks) {
setupApplicationTest(hooks);
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, currentURL, click, fillIn } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | question new", function(hooks) {
setupApplicationTest(hooks);
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, currentURL, click } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | question remove", function(hooks) {
setupApplicationTest(hooks);
@@ -1,7 +1,7 @@
import { module, test } from "qunit";
import { visit, triggerEvent, find } from "@ember/test-helpers";
import { setupApplicationTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Acceptance | question reorder", function(hooks) {
setupApplicationTest(hooks);
@@ -2,7 +2,7 @@ import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render, triggerEvent } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Integration | Component | cf-field/input/file", function(hooks) {
setupRenderingTest(hooks);
@@ -2,7 +2,7 @@ import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render, fillIn, click } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Integration | Component | cf-form", function(hooks) {
setupRenderingTest(hooks);
@@ -2,7 +2,7 @@ import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";

module("Integration | Component | cfb-form-editor", function(hooks) {
setupRenderingTest(hooks);
@@ -2,7 +2,7 @@ import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render, click, fillIn, blur, settled } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import graphqlError from "dummy/tests/helpers/graphql-error";

module("Integration | Component | cfb-form-editor/general", function(hooks) {
@@ -2,7 +2,7 @@ import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render, click, find, fillIn, triggerEvent } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import graphqlError from "dummy/tests/helpers/graphql-error";

module("Integration | Component | cfb-form-editor/question-list", function(
@@ -2,7 +2,7 @@ import { module, test } from "qunit";
import { setupRenderingTest } from "ember-qunit";
import { render, fillIn, blur, click, settled } from "@ember/test-helpers";
import hbs from "htmlbars-inline-precompile";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import graphqlError from "dummy/tests/helpers/graphql-error";

module("Integration | Component | cfb-form-editor/question", function(hooks) {
@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";

module("Unit | Mirage GraphQL Mock | answer", function(hooks) {
@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";
import BaseMock from "ember-caluma/mirage-graphql/mocks/base";

@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";

module("Unit | Mirage GraphQL Mock | case", function(hooks) {
@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";

module("Unit | Mirage GraphQL Mock | document", function(hooks) {
@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";

module("Unit | Mirage GraphQL Mock | form", function(hooks) {
@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";

module("Unit | Mirage GraphQL Mock | question", function(hooks) {
@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";
import { classify } from "@ember/string";

@@ -1,6 +1,6 @@
import { module, test } from "qunit";
import { setupTest } from "ember-qunit";
import setupMirage from "ember-cli-mirage/test-support/setup-mirage";
import { setupMirage } from "ember-cli-mirage/test-support";
import gql from "graphql-tag";
import { classify } from "@ember/string";

0 comments on commit 0ff0e23

Please sign in to comment.
You can’t perform that action at this time.