webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js in katello-3.7.1.1 vs webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js in katello-3.8.0.rc1
- old
+ new
@@ -1,18 +1,17 @@
import Immutable from 'seamless-immutable';
-import { toastErrorAction, failureAction } from '../../../services/api/testHelpers';
export const initialState = Immutable({
loading: true,
results: [],
pagination: {
page: 0,
perPage: 20,
},
itemCount: 0,
quantitiesLoading: false,
- availableQuantities: null,
+ availableQuantities: {},
tasks: [],
});
export const loadingState = Immutable({
...initialState,
@@ -241,24 +240,25 @@
page: 1,
perPage: 2,
},
itemCount: 81,
quantitiesLoading: false,
- availableQuantities: null,
+ availableQuantities: {},
tasks: [],
});
export const errorState = Immutable({
loading: false,
+ error: 'Unable to process request.',
pagination: {
page: 0,
perPage: 20,
},
itemCount: 0,
results: [],
quantitiesLoading: false,
- availableQuantities: null,
+ availableQuantities: {},
tasks: [],
});
export const quantitiesSuccessState = Immutable({
...successState,
@@ -276,11 +276,11 @@
});
export const quantitiesErrorState = Immutable({
...successState,
quantitiesLoading: false,
- availableQuantities: {},
+ quantitiesError: 'Unable to process request.',
});
export const successActions = [
{
type: 'SUBSCRIPTIONS_REQUEST',
@@ -308,12 +308,14 @@
export const failureActions = [
{
type: 'SUBSCRIPTIONS_REQUEST',
},
- failureAction('SUBSCRIPTIONS_FAILURE'),
- toastErrorAction(),
+ {
+ error: 'Request failed with status code 422',
+ type: 'SUBSCRIPTIONS_FAILURE',
+ },
];
export const poolsUpdate = [{
id: 1,
quantity: 32,
@@ -336,19 +338,23 @@
export const updateQuantityFailureActions = [
{
type: 'UPDATE_QUANTITY_REQUEST',
quantities: poolsUpdate,
},
- failureAction('UPDATE_QUANTITY_FAILURE'),
- toastErrorAction(),
+ {
+ error: 'Request failed with status code 422',
+ type: 'UPDATE_QUANTITY_FAILURE',
+ },
];
export const loadQuantitiesFailureActions = [
{
type: 'SUBSCRIPTIONS_QUANTITIES_REQUEST',
},
- failureAction('SUBSCRIPTIONS_QUANTITIES_FAILURE', 'Request failed with status code 500'),
- toastErrorAction('Request failed with status code 500'),
+ {
+ error: 'Request failed with status code 500',
+ type: 'SUBSCRIPTIONS_QUANTITIES_FAILURE',
+ },
];
export const loadQuantitiesSuccessActions = [
{
type: 'SUBSCRIPTIONS_QUANTITIES_REQUEST',