summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/__snapshots__
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2019-09-19 14:23:14 +0200
committerxuegao <xg353y@intl.att.com>2019-09-24 11:07:36 +0200
commit841ddaaa26c0faf16353d8e22093daa2553aad57 (patch)
tree61aaa6d28490a6b5f2037b4a6edb10ed5fdad2e5 /ui-react/src/components/dialogs/__snapshots__
parent27cbec79e30f7e25a7419be38dd9bb7c324c782c (diff)
Add unit tests for UI
Adding unit tests for React UI Issue-ID: CLAMP-509 Change-Id: If31bbea7972736aa190fd0fed19336a1aa382af8 Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/components/dialogs/__snapshots__')
-rw-r--r--ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap66
-rw-r--r--ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap59
-rw-r--r--ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap137
3 files changed, 262 insertions, 0 deletions
diff --git a/ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap b/ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap
new file mode 100644
index 000000000..1fd4b1047
--- /dev/null
+++ b/ui-react/src/components/dialogs/__snapshots__/DeployLoop.test.js.snap
@@ -0,0 +1,66 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Verify DeployLoop Test the render method 1`] = `
+<Styled(Bootstrap(Modal))
+ onHide={[Function]}
+ show={true}
+ size="lg"
+>
+ <ModalHeader
+ closeButton={true}
+ closeLabel="Close"
+ >
+ <ModalTitle>
+ Deployment parameters
+ </ModalTitle>
+ </ModalHeader>
+ <Styled(FormGroup)>
+ <FormLabel
+ column={false}
+ srOnly={false}
+ >
+ location_id
+ </FormLabel>
+ <FormControl
+ defaultValue=""
+ name="location_id"
+ onChange={[Function]}
+ type="text"
+ />
+ </Styled(FormGroup)>
+ <Styled(FormGroup)>
+ <FormLabel
+ column={false}
+ srOnly={false}
+ >
+ policy_id
+ </FormLabel>
+ <FormControl
+ defaultValue="TCA_h2NMX_v1_0_ResourceInstanceName1_tca"
+ name="policy_id"
+ onChange={[Function]}
+ type="text"
+ />
+ </Styled(FormGroup)>
+ <ModalFooter>
+ <Button
+ active={false}
+ disabled={false}
+ onClick={[Function]}
+ type="null"
+ variant="secondary"
+ >
+ Cancel
+ </Button>
+ <Button
+ active={false}
+ disabled={false}
+ onClick={[Function]}
+ type="submit"
+ variant="primary"
+ >
+ Deploy
+ </Button>
+ </ModalFooter>
+</Styled(Bootstrap(Modal))>
+`;
diff --git a/ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap b/ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap
new file mode 100644
index 000000000..c7e81c392
--- /dev/null
+++ b/ui-react/src/components/dialogs/__snapshots__/LoopProperties.test.js.snap
@@ -0,0 +1,59 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Verify LoopProperties Test the render method 1`] = `
+<Styled(Bootstrap(Modal))
+ onHide={[Function]}
+ show={true}
+ size="lg"
+>
+ <ModalHeader
+ closeButton={true}
+ closeLabel="Close"
+ >
+ <ModalTitle>
+ Model Properties
+ </ModalTitle>
+ </ModalHeader>
+ <ModalBody>
+ <Form
+ inline={false}
+ >
+ <FormGroup>
+ <FormLabel
+ column={false}
+ srOnly={false}
+ >
+ Deploy Parameters
+ </FormLabel>
+ <FormControl
+ as="textarea"
+ defaultValue="{\\"location_id\\":\\"\\",\\"policy_id\\":\\"TCA_h2NMX_v1_0_ResourceInstanceName1_tca\\"}"
+ name="dcaeDeployParameters"
+ onChange={[Function]}
+ rows="3"
+ />
+ </FormGroup>
+ </Form>
+ </ModalBody>
+ <ModalFooter>
+ <Button
+ active={false}
+ disabled={false}
+ onClick={[Function]}
+ type="null"
+ variant="secondary"
+ >
+ Cancel
+ </Button>
+ <Button
+ active={false}
+ disabled={false}
+ onClick={[Function]}
+ type="submit"
+ variant="primary"
+ >
+ Save Changes
+ </Button>
+ </ModalFooter>
+</Styled(Bootstrap(Modal))>
+`;
diff --git a/ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap b/ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap
new file mode 100644
index 000000000..1ae567a2d
--- /dev/null
+++ b/ui-react/src/components/dialogs/__snapshots__/UserInfo.test.js.snap
@@ -0,0 +1,137 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Verify UserInfo Test the render method full permission 1`] = `
+<Styled(Bootstrap(Modal))
+ onHide={[Function]}
+ show={true}
+ size="lg"
+>
+ <ModalHeader
+ closeButton={true}
+ closeLabel="Close"
+ >
+ <ModalTitle>
+ User Info
+ </ModalTitle>
+ </ModalHeader>
+ <ModalBody>
+ <FormGroup
+ as={
+ Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "defaultProps": Object {
+ "noGutters": false,
+ },
+ "render": [Function],
+ }
+ }
+ controlId="userName"
+ >
+ <FormLabel
+ column={true}
+ sm="3"
+ srOnly={false}
+ >
+ Current User:
+ </FormLabel>
+ <Col>
+ <FormControl
+ defaultValue="test"
+ plaintext={true}
+ readOnly={true}
+ />
+ </Col>
+ </FormGroup>
+ <FormGroup
+ as={
+ Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "defaultProps": Object {
+ "noGutters": false,
+ },
+ "render": [Function],
+ }
+ }
+ controlId="cldsVersion"
+ >
+ <FormLabel
+ column={true}
+ sm="3"
+ srOnly={false}
+ >
+ CLDS Version:
+ </FormLabel>
+ <Col>
+ <FormControl
+ defaultValue="1.0.0"
+ plaintext={true}
+ readOnly={true}
+ />
+ </Col>
+ </FormGroup>
+ <FormGroup
+ as={
+ Object {
+ "$$typeof": Symbol(react.forward_ref),
+ "defaultProps": Object {
+ "noGutters": false,
+ },
+ "render": [Function],
+ }
+ }
+ controlId="userPermissions"
+ >
+ <FormLabel
+ column={true}
+ sm="3"
+ srOnly={false}
+ >
+ User Permissions:
+ </FormLabel>
+ <Col>
+ <FormControl
+ defaultValue="Read Template"
+ plaintext={true}
+ readOnly={true}
+ />
+ <FormControl
+ defaultValue="Read Model"
+ plaintext={true}
+ readOnly={true}
+ />
+ <FormControl
+ defaultValue="Read Tosca"
+ plaintext={true}
+ readOnly={true}
+ />
+ <FormControl
+ defaultValue="Edit Template"
+ plaintext={true}
+ readOnly={true}
+ />
+ <FormControl
+ defaultValue="Edit Model"
+ plaintext={true}
+ readOnly={true}
+ />
+ <FormControl
+ defaultValue="Edit Tosca"
+ plaintext={true}
+ readOnly={true}
+ />
+ </Col>
+ </FormGroup>
+ </ModalBody>
+ <ModalFooter>
+ <Button
+ active={false}
+ disabled={false}
+ onClick={[Function]}
+ type="null"
+ variant="secondary"
+ >
+ Cancel
+ </Button>
+ </ModalFooter>
+</Styled(Bootstrap(Modal))>
+`;