aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui
diff options
context:
space:
mode:
authorYarin Dekel <yarind@amdocs.com>2019-02-11 16:36:19 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2019-02-11 15:30:58 +0000
commit042f4cd9491e69177607a9e2993986a827ca956c (patch)
treee055654796a3842e7129747616900a2ddf5ba62c /openecomp-ui
parent5b3dfb3e55de50686b0a871d0fdc10ac724b9665 (diff)
Support modal dataTestId from SDCUI
Issue-ID: SDC-2120 Change-Id: I5104d029896a33552d0a9ce64146a47ecf468235 Signed-off-by: Yarin Dekel <yarind@amdocs.com>
Diffstat (limited to 'openecomp-ui')
-rw-r--r--openecomp-ui/package.json2
-rw-r--r--openecomp-ui/src/nfvo-components/modal/GlobalModal.js24
-rw-r--r--openecomp-ui/yarn.lock6
3 files changed, 23 insertions, 9 deletions
diff --git a/openecomp-ui/package.json b/openecomp-ui/package.json
index a70337b2a4..57a3d2b4a9 100644
--- a/openecomp-ui/package.json
+++ b/openecomp-ui/package.json
@@ -45,7 +45,7 @@
"react-sortable": "^1.2.1",
"react-transition-group": "^2.4.0",
"redux": "^3.7.2",
- "sdc-ui": "1.6.61",
+ "sdc-ui": "1.6.62",
"uuid-js": "^0.7.5",
"validator": "^4.3.0"
},
diff --git a/openecomp-ui/src/nfvo-components/modal/GlobalModal.js b/openecomp-ui/src/nfvo-components/modal/GlobalModal.js
index 0c924304cc..118740498d 100644
--- a/openecomp-ui/src/nfvo-components/modal/GlobalModal.js
+++ b/openecomp-ui/src/nfvo-components/modal/GlobalModal.js
@@ -34,7 +34,9 @@ const GlobalModalFooter = ({
onDeclined,
onClose,
confirmationButtonText,
- cancelButtonText
+ cancelButtonText,
+ confirmDataTestId,
+ cancelDataTestId
}) => {
let actionButtonClick;
if (onConfirmed) {
@@ -57,18 +59,24 @@ const GlobalModalFooter = ({
: () => onClose()
}
withButtons
+ confirmDataTestId={confirmDataTestId}
+ cancelDataTestId={cancelDataTestId}
/>
);
};
GlobalModalFooter.defaultProps = {
confirmationButtonText: i18n('OK'),
- cancelButtonText: i18n('Cancel')
+ cancelButtonText: i18n('Cancel'),
+ cancelDataTestId: 'sdc-modal-cancel-button',
+ confirmDataTestId: 'sdc-modal-confirm-button'
};
GlobalModalFooter.propTypes = {
confirmationButtonText: PropTypes.string,
- cancelButtonText: PropTypes.string
+ cancelButtonText: PropTypes.string,
+ confirmDataTestId: PropTypes.string,
+ cancelDataTestId: PropTypes.string
};
export const mapStateToProps = ({ modal }) => {
@@ -96,7 +104,9 @@ export class GlobalModalView extends React.Component {
onDeclined: PropTypes.func,
confirmationButtonText: PropTypes.string,
cancelButtonText: PropTypes.string,
- bodyClassName: PropTypes.string
+ bodyClassName: PropTypes.string,
+ cancelDataTestId: PropTypes.string,
+ confirmDataTestId: PropTypes.string
};
static defaultProps = {
@@ -118,7 +128,9 @@ export class GlobalModalView extends React.Component {
confirmationButtonText,
cancelButtonText,
onClose,
- bodyClassName
+ bodyClassName,
+ confirmDataTestId,
+ cancelDataTestId
} = this.props;
const ComponentToRender = modalContentComponents[modalComponentName];
return (
@@ -153,6 +165,8 @@ export class GlobalModalView extends React.Component {
onClose={onClose}
confirmationButtonText={confirmationButtonText}
cancelButtonText={cancelButtonText}
+ confirmDataTestId={confirmDataTestId}
+ cancelDataTestId={cancelDataTestId}
/>
)}
</Modal>
diff --git a/openecomp-ui/yarn.lock b/openecomp-ui/yarn.lock
index 56a9880ebd..40ae8b6fa2 100644
--- a/openecomp-ui/yarn.lock
+++ b/openecomp-ui/yarn.lock
@@ -9503,9 +9503,9 @@ scss-tokenizer@^0.2.3:
js-base64 "^2.1.8"
source-map "^0.4.2"
-sdc-ui@1.6.61:
- version "1.6.61"
- resolved "https://registry.yarnpkg.com/sdc-ui/-/sdc-ui-1.6.61.tgz#2ad3b9ef1f848889f978dac4082cd56420b28dd5"
+sdc-ui@1.6.62:
+ version "1.6.62"
+ resolved "https://registry.yarnpkg.com/sdc-ui/-/sdc-ui-1.6.62.tgz#738b14d3e2d2280f9be69b1fdb91b7c815e60dca"
dependencies:
"@angular/common" "~2.4.8"
"@angular/core" "~2.4.8"