webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js in katello-3.8.1 vs webpack/scenes/Subscriptions/__tests__/subscriptions.fixtures.js in katello-3.9.0.rc1
- old
+ new
@@ -10,10 +10,12 @@
},
itemCount: 0,
quantitiesLoading: false,
availableQuantities: null,
tasks: [],
+ tableColumns: [],
+ selectedTableColumns: [],
});
export const loadingState = Immutable({
...initialState,
});
@@ -243,11 +245,29 @@
},
itemCount: 81,
quantitiesLoading: false,
availableQuantities: null,
tasks: [],
+ tableColumns: [],
+ selectedTableColumns: [],
});
+export const settingsSuccessState = Immutable({
+ tables: {
+ loading: false,
+ id: 22,
+ name: 'Katello::Subscriptions',
+ columns: [
+ 'id',
+ 'product_id',
+ 'contract_number',
+ 'start_date',
+ 'end_date',
+ ],
+ created_at: '2018-06-12 17:05:03 -0600',
+ updated_at: '2018-06-20 13:55:42 -0600',
+ },
+});
export const errorState = Immutable({
loading: false,
pagination: {
page: 0,
@@ -256,10 +276,12 @@
itemCount: 0,
results: [],
quantitiesLoading: false,
availableQuantities: null,
tasks: [],
+ tableColumns: [],
+ selectedTableColumns: [],
});
export const quantitiesSuccessState = Immutable({
...successState,
quantitiesLoading: false,
@@ -357,5 +379,70 @@
{
type: 'SUBSCRIPTIONS_QUANTITIES_SUCCESS',
response: quantitiesRequestSuccessResponse,
},
];
+export const tableColumns = [
+ {
+ key: 'id',
+ label: 'Name',
+ value: true,
+ },
+ {
+ key: 'product_id',
+ label: 'SKU',
+ value: true,
+ },
+ {
+ key: 'contract_number',
+ label: 'Contract',
+ value: true,
+ },
+ {
+ key: 'start_date',
+ label: 'Start Date',
+ value: true,
+ },
+ {
+ key: 'end_date',
+ label: 'End Date',
+ value: true,
+ },
+ {
+ key: 'virt_who',
+ label: 'Requires Virt-Who',
+ value: false,
+ },
+ {
+ key: 'consumed',
+ label: 'Consumed',
+ value: false,
+ },
+ {
+ key: 'quantity',
+ label: 'Entitlements',
+ value: false,
+ },
+];
+export const loadTableColumnsSuccessAction = [
+ {
+ type: 'UPDATE_SUBSCRIPTION_COLUMNS',
+ payload: {
+ enabledColumns: [
+ 'id',
+ 'product_id',
+ 'contract_number',
+ 'start_date',
+ 'end_date',
+ ],
+ },
+ },
+ {
+ payload: {
+ tableColumns,
+ },
+ type: 'SUBSCRIPTIONS_COLUMNS_REQUEST',
+ },
+];
+export const loadingColumnsState = Immutable({
+ ...successState,
+});