From bea677d3de87e1b424c3b080a32ce0f76c801e1a Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Mon, 11 Mar 2019 14:32:08 -0400 Subject: [PATCH 1/3] feat(createScanDialog): issues/1 scan creation options * build, react framework updates * styles, forms clean up, touchspin form adjustments * apiConstants, organize, submit scanName, scanSources added * scanActions, duplicate action addStartScan, associated constant * scansEditReducer, link scanAction, addStartScan, hide show modal type * sources view, move lifecycle concepts to sourcesReducer state * sourcesListItem, restructure and testing updates * redux actions, constants, reducers clean up and testing updates * touchspin, component added * createScanDialog, added scan creation options --- package.json | 4 +- src/components/app.js | 2 + .../createScanDialog.test.js.snap | 265 ++++++++-- .../createScanDialog/createScanDialog.js | 464 +++++++++++------- .../sourceConstants.test.js.snap | 59 +++ .../__snapshots__/sources.test.js.snap | 216 ++++++++ .../sourcesListItem.test.js.snap | 16 +- .../sources/__tests__/sourceConstants.test.js | 11 + .../sources/__tests__/sources.test.js | 65 +++ .../sources/__tests__/sourcesListItem.test.js | 33 +- src/components/sources/sourceListItem.js | 158 +++--- src/components/sources/sources.js | 234 +++------ .../__snapshots__/touchspin.test.js.snap | 76 +++ .../touchspin/__tests__/touchspin.test.js | 34 ++ src/components/touchspin/touchspin.js | 191 +++++++ .../__snapshots__/apiConstants.test.js.snap | 80 +++ src/constants/apiConstants.js | 90 +++- .../credentialsActions.test.js.snap | 3 + .../__snapshots__/scansActions.test.js.snap | 9 + .../__snapshots__/sourcesActions.test.js.snap | 7 + .../__tests__/credentialsActions.test.js | 8 +- .../actions/__tests__/scansActions.test.js | 43 +- .../actions/__tests__/sourcesActions.test.js | 24 +- src/redux/actions/scansActions.js | 7 + .../__snapshots__/index.test.js.snap | 20 +- src/redux/constants/scansConstants.js | 27 +- src/redux/constants/sourcesConstants.js | 2 +- .../scansEditReducer.test.js.snap | 129 +++++ .../__snapshots__/scansReducer.test.js.snap | 272 ---------- .../__snapshots__/sourcesReducer.test.js.snap | 168 +------ .../__tests__/scansEditReducer.test.js | 83 ++++ .../reducers/__tests__/scansReducer.test.js | 5 +- .../reducers/__tests__/sourcesReducer.test.js | 20 +- src/redux/reducers/index.js | 3 + src/redux/reducers/scansEditReducer.js | 133 +++++ src/redux/reducers/scansReducer.js | 56 --- src/redux/reducers/sourcesReducer.js | 58 +-- src/styles/entitlements/_common.scss | 5 + src/styles/entitlements/_forms.scss | 35 ++ src/styles/entitlements/_views.scss | 10 - yarn.lock | 28 +- 41 files changed, 2059 insertions(+), 1094 deletions(-) create mode 100644 src/components/sources/__tests__/__snapshots__/sourceConstants.test.js.snap create mode 100644 src/components/sources/__tests__/__snapshots__/sources.test.js.snap create mode 100644 src/components/sources/__tests__/sourceConstants.test.js create mode 100644 src/components/sources/__tests__/sources.test.js create mode 100644 src/components/touchspin/__tests__/__snapshots__/touchspin.test.js.snap create mode 100644 src/components/touchspin/__tests__/touchspin.test.js create mode 100644 src/components/touchspin/touchspin.js create mode 100644 src/redux/actions/__tests__/__snapshots__/credentialsActions.test.js.snap create mode 100644 src/redux/actions/__tests__/__snapshots__/scansActions.test.js.snap create mode 100644 src/redux/actions/__tests__/__snapshots__/sourcesActions.test.js.snap create mode 100644 src/redux/reducers/__tests__/__snapshots__/scansEditReducer.test.js.snap create mode 100644 src/redux/reducers/__tests__/scansEditReducer.test.js create mode 100644 src/redux/reducers/scansEditReducer.js diff --git a/package.json b/package.json index 770468b3..062295b4 100644 --- a/package.json +++ b/package.json @@ -90,9 +90,9 @@ "patternfly": "3.55.0", "patternfly-react": "^2.24.3", "prop-types": "^15.6.2", - "react": "^16.5.1", + "react": "^16.8.4", "react-bootstrap": "^0.32.4", - "react-dom": "^16.5.1", + "react-dom": "^16.8.4", "react-infinite-scroller": "^1.2.1", "react-redux": "^5.0.7", "react-router": "^4.3.1", diff --git a/src/components/app.js b/src/components/app.js index 9a7e4aeb..9536e964 100644 --- a/src/components/app.js +++ b/src/components/app.js @@ -9,6 +9,7 @@ import helpers from '../common/helpers'; import AboutModal from './aboutModal/aboutModal'; import AddSourceWizard from './addSourceWizard/addSourceWizard'; import CreateCredentialDialog from './createCredentialDialog/createCredentialDialog'; +import CreateScanDialog from './createScanDialog/createScanDialog'; import Content from './content/content'; import ToastNotificationsList from './toastNotificationsList/toastNotificationsList'; import ConfirmationModal from './confirmationModal/confirmationModal'; @@ -127,6 +128,7 @@ class App extends React.Component { + ); diff --git a/src/components/createScanDialog/__tests__/__snapshots__/createScanDialog.test.js.snap b/src/components/createScanDialog/__tests__/__snapshots__/createScanDialog.test.js.snap index 03f31acc..f4fde57f 100644 --- a/src/components/createScanDialog/__tests__/__snapshots__/createScanDialog.test.js.snap +++ b/src/components/createScanDialog/__tests__/__snapshots__/createScanDialog.test.js.snap @@ -20,41 +20,38 @@ exports[`CreateScanDialog Component should render a basic component 1`] = ` class="modal-content" role="document" > - - - + +
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+