Sha256: 03aca47320787441b71c685698f13e0a24c9758d6d172e708c4df8eadf3f4c1e
Contents?: true
Size: 1.58 KB
Versions: 61
Compression:
Stored size: 1.58 KB
Contents
import { testSelectorsSnapshotWithFixtures } from '@theforeman/test'; import { selectActionText, selectActionState, selectActionType, selectSelectedTasks, selectSelectedRowsLen, } from '../ConfirmModalSelectors'; import { CANCEL_MODAL } from '../../../TasksTableConstants'; const state = { foremanTasks: { confirmModal: { actionText: 'some-text', actionState: 'some-state', actionType: 'some-type', }, tasksTable: { tasksTableContent: { results: [ { id: 1, action: 'action1', available_actions: { cancellable: true }, can_edit: true, }, { id: 2, action: 'action2', available_actions: { resumable: true } }, ], itemCount: 10, }, tasksTableQuery: { selectedRows: [1, 2, 3] }, }, }, }; const fixtures = { 'should select actionText': () => selectActionText(state), 'should select actionState': () => selectActionState(state), 'should select actionType': () => selectActionType(state), 'should select selectedTasks': () => selectSelectedTasks(state), 'should select selectedRowsLen 1': () => selectSelectedRowsLen({ ...state, foremanTasks: { confirmModal: { actionType: CANCEL_MODAL } }, }), 'should select selectedRowsLen all': () => selectSelectedRowsLen(state), 'should select selectedRowsLen some': () => selectSelectedRowsLen({ ...state, tasksTable: { tasksTableQuery: { allRowsSelected: true } }, }), }; describe('TasksDashboard - Selectors', () => testSelectorsSnapshotWithFixtures(fixtures));
Version data entries
61 entries across 61 versions & 1 rubygems