// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Reducer is able to modify individual variant price 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": "attr-2",
    "mode": "attribute",
    "value": "",
    "values": Array [
      Object {
        "slug": "val-2-2",
        "value": "24.99",
      },
      Object {
        "slug": "val-2-4",
        "value": "26.99",
      },
    ],
  },
  "stock": Object {
    "attribute": "attr-4",
    "mode": "attribute",
    "value": Array [],
    "values": Array [
      Object {
        "slug": "val-4-1",
        "value": Array [
          50,
          20,
          45,
          75,
        ],
      },
      Object {
        "slug": "val-4-5",
        "value": Array [
          80,
          50,
          85,
          105,
        ],
      },
    ],
  },
  "variants": Array [
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 80,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "26.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "49.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 80,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 80,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "26.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "26.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 80,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
  ],
  "warehouses": Array [
    "wh-1",
    "wh-2",
    "wh-3",
    "wh-4",
  ],
}
`;

exports[`Reducer is able to modify individual variant stock 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": "attr-2",
    "mode": "attribute",
    "value": "",
    "values": Array [
      Object {
        "slug": "val-2-2",
        "value": "24.99",
      },
      Object {
        "slug": "val-2-4",
        "value": "26.99",
      },
    ],
  },
  "stock": Object {
    "attribute": "attr-4",
    "mode": "attribute",
    "value": Array [],
    "values": Array [
      Object {
        "slug": "val-4-1",
        "value": Array [
          50,
          20,
          45,
          75,
        ],
      },
      Object {
        "slug": "val-4-5",
        "value": Array [
          80,
          50,
          85,
          105,
        ],
      },
    ],
  },
  "variants": Array [
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 80,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "26.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "26.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 5,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "24.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 80,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "26.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 50,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 20,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 75,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "26.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 80,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 50,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 85,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 105,
          "warehouse": "wh-4",
        },
      ],
    },
  ],
  "warehouses": Array [
    "wh-1",
    "wh-2",
    "wh-3",
    "wh-4",
  ],
}
`;

exports[`Reducer is able to select attribute values 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": undefined,
    "mode": "all",
    "value": "10.99",
    "values": Array [],
  },
  "stock": Object {
    "attribute": undefined,
    "mode": "all",
    "value": Array [],
    "values": Array [],
  },
  "variants": Array [],
  "warehouses": Array [],
}
`;

exports[`Reducer is able to select price for all variants 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": undefined,
    "mode": "all",
    "value": "45.99",
    "values": Array [],
  },
  "stock": Object {
    "attribute": undefined,
    "mode": "all",
    "value": Array [
      0,
      0,
      0,
      0,
    ],
    "values": Array [],
  },
  "variants": Array [
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
  ],
  "warehouses": Array [
    "wh-1",
    "wh-2",
    "wh-3",
    "wh-4",
  ],
}
`;

exports[`Reducer is able to select price to each attribute value 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": "attr-1",
    "mode": "attribute",
    "value": "10.99",
    "values": Array [
      Object {
        "slug": "val-1-1",
        "value": "45.99",
      },
      Object {
        "slug": "val-1-7",
        "value": "51.99",
      },
    ],
  },
  "stock": Object {
    "attribute": undefined,
    "mode": "all",
    "value": Array [
      0,
      0,
      0,
      0,
    ],
    "values": Array [],
  },
  "variants": Array [
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "45.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "51.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "51.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "51.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "51.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
  ],
  "warehouses": Array [
    "wh-1",
    "wh-2",
    "wh-3",
    "wh-4",
  ],
}
`;

exports[`Reducer is able to select stock for all variants 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": undefined,
    "mode": "all",
    "value": "10.99",
    "values": Array [],
  },
  "stock": Object {
    "attribute": undefined,
    "mode": "all",
    "value": Array [
      0,
      45,
      0,
      0,
    ],
    "values": Array [],
  },
  "variants": Array [
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 0,
          "warehouse": "wh-1",
        },
        Object {
          "quantity": 45,
          "warehouse": "wh-2",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-3",
        },
        Object {
          "quantity": 0,
          "warehouse": "wh-4",
        },
      ],
    },
  ],
  "warehouses": Array [
    "wh-1",
    "wh-2",
    "wh-3",
    "wh-4",
  ],
}
`;

exports[`Reducer is able to select stock to each attribute value 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": undefined,
    "mode": "all",
    "value": "10.99",
    "values": Array [],
  },
  "stock": Object {
    "attribute": "attr-1",
    "mode": "attribute",
    "value": Array [
      0,
      0,
      0,
      0,
    ],
    "values": Array [
      Object {
        "slug": "val-1-1",
        "value": Array [
          13,
        ],
      },
      Object {
        "slug": "val-1-7",
        "value": Array [
          19,
        ],
      },
    ],
  },
  "variants": Array [
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 13,
          "warehouse": "wh-1",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 13,
          "warehouse": "wh-1",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 13,
          "warehouse": "wh-1",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-1",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 13,
          "warehouse": "wh-1",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 19,
          "warehouse": "wh-1",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-2",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 19,
          "warehouse": "wh-1",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-1",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 19,
          "warehouse": "wh-1",
        },
      ],
    },
    Object {
      "attributes": Array [
        Object {
          "id": "attr-1",
          "values": Array [
            "val-1-7",
          ],
        },
        Object {
          "id": "attr-2",
          "values": Array [
            "val-2-4",
          ],
        },
        Object {
          "id": "attr-4",
          "values": Array [
            "val-4-5",
          ],
        },
      ],
      "priceOverride": "10.99",
      "sku": "",
      "stocks": Array [
        Object {
          "quantity": 19,
          "warehouse": "wh-1",
        },
      ],
    },
  ],
  "warehouses": Array [
    "wh-1",
    "wh-2",
    "wh-3",
    "wh-4",
  ],
}
`;

exports[`Reducer is able to select warehouses in which stock will be created 1`] = `
Object {
  "attributes": Array [
    Object {
      "id": "attr-1",
      "values": Array [
        "val-1-1",
        "val-1-7",
      ],
    },
    Object {
      "id": "attr-2",
      "values": Array [
        "val-2-2",
        "val-2-4",
      ],
    },
    Object {
      "id": "attr-4",
      "values": Array [
        "val-4-1",
        "val-4-5",
      ],
    },
  ],
  "price": Object {
    "attribute": undefined,
    "mode": "all",
    "value": "10.99",
    "values": Array [],
  },
  "stock": Object {
    "attribute": undefined,
    "mode": "all",
    "value": Array [
      0,
      0,
    ],
    "values": Array [],
  },
  "variants": Array [],
  "warehouses": Array [
    "wh-2",
    "wh-4",
  ],
}
`;
