@aj-shadow/z-abs-complayer-markup-client 0.0.0-aj-beta.221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/.gitattributes +26 -0
  2. package/LICENSE.txt +96 -0
  3. package/README.md +5 -0
  4. package/npm-shrinkwrap.json +13 -0
  5. package/package.json +10 -0
  6. package/project/client/_build/Bundle-CompLayer-Markup-client.bld +40 -0
  7. package/project/client/_build/Client-CompLayer-Markup-client-jsx.bld +10 -0
  8. package/project/client/_build/Client-CompLayer-Markup-client.bld +10 -0
  9. package/project/client/_build/Client-css-CompLayer-Markup-bundle.bld +9 -0
  10. package/project/client/_build/z-abs-complayer-markup-client.prj +36 -0
  11. package/project/client/actions/action-style.js +17 -0
  12. package/project/client/actions/data-action-style.js +13 -0
  13. package/project/client/css/markup_addressing.css +30 -0
  14. package/project/client/css/markup_flowchart.css +53 -0
  15. package/project/client/css/markup_general.css +4 -0
  16. package/project/client/css/markup_image.css +10 -0
  17. package/project/client/css/markup_license.css +107 -0
  18. package/project/client/css/markup_login.css +201 -0
  19. package/project/client/css/markup_node_diagram.css +51 -0
  20. package/project/client/css/markup_sequence_diagram.css +6 -0
  21. package/project/client/css/markup_state.css +5 -0
  22. package/project/client/css/markup_table.css +57 -0
  23. package/project/client/css/markup_tc.css +32 -0
  24. package/project/client/css/markup_ts.css +36 -0
  25. package/project/client/data/addresses/data-addresses-client-address-global.js +20 -0
  26. package/project/client/data/addresses/data-addresses-client-address-local.js +20 -0
  27. package/project/client/data/addresses/data-addresses-client-interface-global.js +17 -0
  28. package/project/client/data/addresses/data-addresses-client-interface-local.js +17 -0
  29. package/project/client/data/addresses/data-addresses-dns-global.js +18 -0
  30. package/project/client/data/addresses/data-addresses-dns-local.js +19 -0
  31. package/project/client/data/addresses/data-addresses-dst-global.js +20 -0
  32. package/project/client/data/addresses/data-addresses-dst-local.js +20 -0
  33. package/project/client/data/addresses/data-addresses-network-interface-global.js +17 -0
  34. package/project/client/data/addresses/data-addresses-network-interface-local.js +17 -0
  35. package/project/client/data/addresses/data-addresses-ports-global.js +18 -0
  36. package/project/client/data/addresses/data-addresses-ports-local.js +18 -0
  37. package/project/client/data/addresses/data-addresses-server-address-global.js +20 -0
  38. package/project/client/data/addresses/data-addresses-server-address-local.js +20 -0
  39. package/project/client/data/addresses/data-addresses-server-interface-global.js +17 -0
  40. package/project/client/data/addresses/data-addresses-server-interface-local.js +17 -0
  41. package/project/client/data/addresses/data-addresses-src-global.js +21 -0
  42. package/project/client/data/addresses/data-addresses-src-local.js +21 -0
  43. package/project/client/data/addresses/data-addresses-srv-global.js +20 -0
  44. package/project/client/data/addresses/data-addresses-srv-local.js +20 -0
  45. package/project/client/data/addresses/data-addresses-sut-address-global.js +20 -0
  46. package/project/client/data/addresses/data-addresses-sut-address-local.js +20 -0
  47. package/project/client/data/addresses/data-addresses-sut-interface-global.js +19 -0
  48. package/project/client/data/addresses/data-addresses-sut-interface-local.js +19 -0
  49. package/project/client/data/data-chart/data-chart-axis.js +13 -0
  50. package/project/client/data/data-chart/data-chart-grid.js +14 -0
  51. package/project/client/data/data-chart/data-chart-line/data-chart-line-config.js +17 -0
  52. package/project/client/data/data-chart/data-chart-line/data-chart-line.js +41 -0
  53. package/project/client/data/data-config.js +14 -0
  54. package/project/client/data/data-constructor.js +18 -0
  55. package/project/client/data/data-content/data-content-audio-global.js +18 -0
  56. package/project/client/data/data-content/data-content-audio-local.js +18 -0
  57. package/project/client/data/data-content/data-content-documents-global.js +18 -0
  58. package/project/client/data/data-content/data-content-documents-local.js +18 -0
  59. package/project/client/data/data-content/data-content-image-global.js +21 -0
  60. package/project/client/data/data-content/data-content-image-local.js +21 -0
  61. package/project/client/data/data-content/data-content-other-global.js +20 -0
  62. package/project/client/data/data-content/data-content-other-local.js +20 -0
  63. package/project/client/data/data-content/data-content-text-global.js +20 -0
  64. package/project/client/data/data-content/data-content-text-local.js +20 -0
  65. package/project/client/data/data-content/data-content-video-global.js +20 -0
  66. package/project/client/data/data-content/data-content-video-local.js +20 -0
  67. package/project/client/data/data-data.js +28 -0
  68. package/project/client/data/data-dependencies/data-dependencies.js +17 -0
  69. package/project/client/data/data-documentation/data-documentation-navigation.js +15 -0
  70. package/project/client/data/data-documentation/data-documentation.js +20 -0
  71. package/project/client/data/data-flowchart/data-flowchart-block.js +33 -0
  72. package/project/client/data/data-flowchart/data-flowchart-connection.js +17 -0
  73. package/project/client/data/data-flowchart/data-flowchart.js +30 -0
  74. package/project/client/data/data-html/data-html-anchor.js +12 -0
  75. package/project/client/data/data-html/data-html-br.js +11 -0
  76. package/project/client/data/data-html/data-html-button.js +15 -0
  77. package/project/client/data/data-html/data-html-log-start.js +12 -0
  78. package/project/client/data/data-html/data-html-log-stop.js +13 -0
  79. package/project/client/data/data-html/data-html-log.js +16 -0
  80. package/project/client/data/data-html/data-html-toolbar.js +19 -0
  81. package/project/client/data/data-image/data-image.js +20 -0
  82. package/project/client/data/data-lab/data-lab-interface-client.js +19 -0
  83. package/project/client/data/data-lab/data-lab-interface-server.js +19 -0
  84. package/project/client/data/data-lab/data-lab-interface-sut.js +20 -0
  85. package/project/client/data/data-lab/data-lab-network.js +31 -0
  86. package/project/client/data/data-lab/data-lab.js +21 -0
  87. package/project/client/data/data-licenses/data-licenses.js +16 -0
  88. package/project/client/data/data-node-diagram/data-node-diagram-config.js +21 -0
  89. package/project/client/data/data-node-diagram/data-node-diagram-connection.js +18 -0
  90. package/project/client/data/data-node-diagram/data-node-diagram-group.js +16 -0
  91. package/project/client/data/data-node-diagram/data-node-diagram-node.js +22 -0
  92. package/project/client/data/data-node-diagram/data-node-diagram.js +47 -0
  93. package/project/client/data/data-repos/data-repos-content-local.js +15 -0
  94. package/project/client/data/data-repos/data-repos-data-local.js +15 -0
  95. package/project/client/data/data-sequence-diagram/data-sequence-diagram-config.js +22 -0
  96. package/project/client/data/data-sequence-diagram/data-sequence-diagram-message.js +17 -0
  97. package/project/client/data/data-sequence-diagram/data-sequence-diagram-node.js +11 -0
  98. package/project/client/data/data-sequence-diagram/data-sequence-diagram.js +32 -0
  99. package/project/client/data/data-state-machine/data-state-machine-config.js +17 -0
  100. package/project/client/data/data-state-machine/data-state-machine-state.js +29 -0
  101. package/project/client/data/data-state-machine/data-state-machine-transition.js +18 -0
  102. package/project/client/data/data-state-machine/data-state-machine.js +37 -0
  103. package/project/client/data/data-system-under-test/data-system-under-test-instances.js +15 -0
  104. package/project/client/data/data-system-under-test/data-system-under-test-nodes.js +18 -0
  105. package/project/client/data/data-table/data-table-config.js +21 -0
  106. package/project/client/data/data-table-key-value.js +56 -0
  107. package/project/client/data/data-test-case/data-actor.js +282 -0
  108. package/project/client/data/data-test-case/data-test-case-settings.js +49 -0
  109. package/project/client/data/data-test-case/data-test-case.js +19 -0
  110. package/project/client/data/data-test-case/data-test-data-iteration.js +54 -0
  111. package/project/client/data/data-test-case/data-test-data-test-case.js +16 -0
  112. package/project/client/data/data-test-case/data-verification-test-case.js +24 -0
  113. package/project/client/data/data-test-data/data-test-data-environment-global.js +18 -0
  114. package/project/client/data/data-test-data/data-test-data-environment-local.js +18 -0
  115. package/project/client/data/data-test-data/data-test-data-environment-static.js +16 -0
  116. package/project/client/data/data-test-data/data-test-data-general-global.js +18 -0
  117. package/project/client/data/data-test-data/data-test-data-general-local.js +18 -0
  118. package/project/client/data/data-test-data/data-test-data-output-global.js +18 -0
  119. package/project/client/data/data-test-data/data-test-data-output-local.js +18 -0
  120. package/project/client/data/data-test-data/data-test-data-system-global.js +18 -0
  121. package/project/client/data/data-test-data/data-test-data-system-local.js +18 -0
  122. package/project/client/data/data-test-suite/data-test-suite-abstraction.js +72 -0
  123. package/project/client/data/data-test-suite/data-test-suite.js +15 -0
  124. package/project/client/data/data-tree/data-tree-node.js +17 -0
  125. package/project/client/data/data-tree/data-tree.js +13 -0
  126. package/project/client/markup/markup-addresses/markup-addresses-client-address.js +31 -0
  127. package/project/client/markup/markup-addresses/markup-addresses-client-interface.js +31 -0
  128. package/project/client/markup/markup-addresses/markup-addresses-dns.js +32 -0
  129. package/project/client/markup/markup-addresses/markup-addresses-dst.js +31 -0
  130. package/project/client/markup/markup-addresses/markup-addresses-network-interface.js +31 -0
  131. package/project/client/markup/markup-addresses/markup-addresses-ports.js +31 -0
  132. package/project/client/markup/markup-addresses/markup-addresses-server-address.js +31 -0
  133. package/project/client/markup/markup-addresses/markup-addresses-server-interface.js +31 -0
  134. package/project/client/markup/markup-addresses/markup-addresses-src.js +31 -0
  135. package/project/client/markup/markup-addresses/markup-addresses-srv.js +31 -0
  136. package/project/client/markup/markup-addresses/markup-addresses-sut-address.js +31 -0
  137. package/project/client/markup/markup-addresses/markup-addresses-sut-interface.js +31 -0
  138. package/project/client/markup/markup-chart/markup-chart-line.js +92 -0
  139. package/project/client/markup/markup-content/markup-content-audio.js +31 -0
  140. package/project/client/markup/markup-content/markup-content-documents.js +31 -0
  141. package/project/client/markup/markup-content/markup-content-image.js +31 -0
  142. package/project/client/markup/markup-content/markup-content-other.js +31 -0
  143. package/project/client/markup/markup-content/markup-content-text.js +31 -0
  144. package/project/client/markup/markup-content/markup-content-video.js +31 -0
  145. package/project/client/markup/markup-dependencies/markup-dependencies.js +30 -0
  146. package/project/client/markup/markup-documentation/markup-documentation-anchor.js +37 -0
  147. package/project/client/markup/markup-documentation/markup-documentation-api-status.js +67 -0
  148. package/project/client/markup/markup-documentation/markup-documentation-code.js +20 -0
  149. package/project/client/markup/markup-documentation/markup-documentation-div.js +34 -0
  150. package/project/client/markup/markup-documentation/markup-documentation-documentation-status.js +67 -0
  151. package/project/client/markup/markup-documentation/markup-documentation-embed.js +23 -0
  152. package/project/client/markup/markup-documentation/markup-documentation-html.js +139 -0
  153. package/project/client/markup/markup-documentation/markup-documentation-ie.js +21 -0
  154. package/project/client/markup/markup-documentation/markup-documentation-image.js +46 -0
  155. package/project/client/markup/markup-documentation/markup-documentation-lab.js +19 -0
  156. package/project/client/markup/markup-documentation/markup-documentation-local-note.js +33 -0
  157. package/project/client/markup/markup-documentation/markup-documentation-navigation.js +109 -0
  158. package/project/client/markup/markup-documentation/markup-documentation-page.js +262 -0
  159. package/project/client/markup/markup-documentation/markup-documentation-ref.js +28 -0
  160. package/project/client/markup/markup-documentation/markup-documentation-result.js +21 -0
  161. package/project/client/markup/markup-documentation/markup-documentation-state-machine.js +194 -0
  162. package/project/client/markup/markup-documentation/markup-documentation.js +74 -0
  163. package/project/client/markup/markup-flowchart.js +264 -0
  164. package/project/client/markup/markup-lab.js +116 -0
  165. package/project/client/markup/markup-licenses/markup-licenses.js +29 -0
  166. package/project/client/markup/markup-node-diagram.js +435 -0
  167. package/project/client/markup/markup-parse-helper.js +26 -0
  168. package/project/client/markup/markup-pattern-config.js +53 -0
  169. package/project/client/markup/markup-pattern-data.js +50 -0
  170. package/project/client/markup/markup-pattern-function.js +47 -0
  171. package/project/client/markup/markup-repos/markup-repos.js +31 -0
  172. package/project/client/markup/markup-sequence-diagram.js +466 -0
  173. package/project/client/markup/markup-system-under-test/markup-system-under-test-instances.js +29 -0
  174. package/project/client/markup/markup-system-under-test/markup-system-under-test-nodes.js +30 -0
  175. package/project/client/markup/markup-table-key-value-parse.js +25 -0
  176. package/project/client/markup/markup-table-key-value-stringify.js +91 -0
  177. package/project/client/markup/markup-table-key-value.js +18 -0
  178. package/project/client/markup/markup-table-name-value.js +101 -0
  179. package/project/client/markup/markup-table.js +85 -0
  180. package/project/client/markup/markup-tables-parser.js +122 -0
  181. package/project/client/markup/markup-test-case/markup-test-case.js +67 -0
  182. package/project/client/markup/markup-test-data/markup-test-data-environment.js +31 -0
  183. package/project/client/markup/markup-test-data/markup-test-data-general.js +31 -0
  184. package/project/client/markup/markup-test-data/markup-test-data-output.js +31 -0
  185. package/project/client/markup/markup-test-data/markup-test-data-system.js +31 -0
  186. package/project/client/markup/markup-test-suite/markup-test-suite.js +40 -0
  187. package/project/client/react-components/helper/line-data.js +16 -0
  188. package/project/client/react-components/helper/line-object.js +22 -0
  189. package/project/client/react-components/helper/scroll-data.js +74 -0
  190. package/project/client/react-components/markup/component-chart/component-image-chart-line.jsx +203 -0
  191. package/project/client/react-components/markup/component-code.jsx +50 -0
  192. package/project/client/react-components/markup/component-document.jsx +105 -0
  193. package/project/client/react-components/markup/component-documentation-anchor.jsx +47 -0
  194. package/project/client/react-components/markup/component-embed.jsx +48 -0
  195. package/project/client/react-components/markup/component-image-flowchart.jsx +389 -0
  196. package/project/client/react-components/markup/component-image-image.jsx +32 -0
  197. package/project/client/react-components/markup/component-image-lab.jsx +696 -0
  198. package/project/client/react-components/markup/component-image-node-diagram.jsx +506 -0
  199. package/project/client/react-components/markup/component-image-result.jsx +22 -0
  200. package/project/client/react-components/markup/component-image-sequence-diagram.jsx +645 -0
  201. package/project/client/react-components/markup/component-image-state-machine.jsx +633 -0
  202. package/project/client/react-components/markup/component-image-table.jsx +96 -0
  203. package/project/client/react-components/markup/component-local-note.jsx +99 -0
  204. package/project/client/react-components/markup/component-markup-remarkable.jsx +79 -0
  205. package/project/client/react-components/markup/component-markup.jsx +1036 -0
  206. package/project/client/react-components/markup/component-table-data-table.jsx +146 -0
  207. package/project/client/stores/style-store.js +96 -0
  208. package/project/z-abs-complayer-markup-client.tree +239 -0
@@ -0,0 +1,15 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataSystemUnderTestInstances extends DataTableKeyValue {
8
+ constructor(name, description) {
9
+ super();
10
+ this.name = name;
11
+ this.description = description;
12
+ }
13
+ }
14
+
15
+ module.exports = DataSystemUnderTestInstances;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataSystemUnderTestNodes extends DataTableKeyValue {
8
+ constructor(name, instanceName, criteriaType, criteria, description) {
9
+ super();
10
+ this.name = name;
11
+ this.instanceName = instanceName;
12
+ this.criteriaType = criteriaType;
13
+ this.criteria = criteria;
14
+ this.description = description;
15
+ }
16
+ }
17
+
18
+ module.exports = DataSystemUnderTestNodes;
@@ -0,0 +1,21 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataConfig = require('../data-config');
5
+
6
+
7
+ class DataConfigTable extends DataConfig {
8
+ constructor() {
9
+ super();
10
+ this.classHeading = '';
11
+ }
12
+
13
+ addConfig(name, value) {
14
+ const member = this[name];
15
+ if(undefined !== member) {
16
+ this[name] = value;
17
+ }
18
+ }
19
+ }
20
+
21
+ module.exports = DataConfigTable;
@@ -0,0 +1,56 @@
1
+
2
+ 'use strict';
3
+
4
+
5
+ class DataTableKeyValue {
6
+ constructor(defaultValues, allowedValues) {
7
+ this._defaultValues = new Map(defaultValues);
8
+ this._allowedValues = new Map(allowedValues);
9
+ }
10
+
11
+ getName() {
12
+ return this.constructor.name.substr(4);
13
+ }
14
+
15
+ getHeadings() {
16
+ const headings = Object.keys(this);
17
+ const filteredHeadings = headings.filter((value) => {
18
+ return !value.startsWith('_');
19
+ });
20
+ return filteredHeadings;
21
+ }
22
+
23
+ getValue(heading, rowData) {
24
+ let value = rowData[heading];
25
+ let style = {color:'black'};
26
+ if(undefined === value || '' === value) {
27
+ let defaultFunction = this._defaultValues.get(heading);
28
+ if(undefined !== defaultFunction) {
29
+ value = defaultFunction(rowData);
30
+ rowData[heading] = value;
31
+ style = {color:'#009933'};
32
+ }
33
+ }
34
+ let allowedFunction = this._allowedValues.get(heading);
35
+ if(undefined !== allowedFunction) {
36
+ switch(allowedFunction(rowData)) {
37
+ case DataTableKeyValue.ALLOWED_NOK_VALUE:
38
+ style = {color:'red'};
39
+ break;
40
+ case DataTableKeyValue.ALLOWED_NOK_COMBO:
41
+ style = {color:'orange'};
42
+ break;
43
+ }
44
+ }
45
+ return {
46
+ value: value,
47
+ style: style
48
+ }
49
+ }
50
+ }
51
+
52
+ DataTableKeyValue.ALLOWED_OK = 0;
53
+ DataTableKeyValue.ALLOWED_NOK_VALUE = 1;
54
+ DataTableKeyValue.ALLOWED_NOK_COMBO = 2;
55
+
56
+ module.exports = DataTableKeyValue;
@@ -0,0 +1,282 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataActor extends DataTableKeyValue {
8
+ constructor(name, node, type, phase, execution, src, dst, srv, testData, verification) {
9
+ super([
10
+ ['phase', (rowData) => {return this._defaultPhase(rowData);}],
11
+ ['execution', (rowData) => {return this._defaultExecution(rowData);}]
12
+ ],
13
+ [
14
+ ['type', (rowData) => {
15
+ switch(rowData.type) {
16
+ case 'orig':
17
+ case 'term':
18
+ case 'inter':
19
+ case 'proxy':
20
+ case 'sut':
21
+ case 'local':
22
+ return DataTableKeyValue.ALLOWED_OK;
23
+ case 'cond':
24
+ switch(rowData.phase) {
25
+ case '':
26
+ case 'pre, post':
27
+ return DataTableKeyValue.ALLOWED_OK;
28
+ default:
29
+ return DataTableKeyValue.ALLOWED_NOK_COMBO;
30
+ }
31
+ default:
32
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
33
+ }
34
+ }],
35
+ ['phase', (rowData) => {
36
+ switch(rowData.phase) {
37
+ case 'pre':
38
+ case 'exec':
39
+ case 'post':
40
+ if('cond' === rowData.type) {
41
+ return DataTableKeyValue.ALLOWED_NOK_COMBO;
42
+ }
43
+ else {
44
+ return DataTableKeyValue.ALLOWED_OK;
45
+ }
46
+ case 'pre, post':
47
+ case '':
48
+ if('cond' === rowData.type) {
49
+ return DataTableKeyValue.ALLOWED_OK;
50
+ }
51
+ else {
52
+ return DataTableKeyValue.ALLOWED_NOK_COMBO;
53
+ }
54
+ default:
55
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
56
+ }
57
+ }],
58
+ ['execution', (rowData) => {
59
+ switch(rowData.execution) {
60
+ case 'serial':
61
+ case 'parallel':
62
+ return DataTableKeyValue.ALLOWED_OK;
63
+ default:
64
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
65
+ }
66
+ }],
67
+ ['src', (rowData) => {return this._allowedAddressNames(rowData.src, 'src');}],
68
+ ['dst', (rowData) => {return this._allowedAddressNames(rowData.dst, 'dst');}],
69
+ ['srv', (rowData) => {return this._allowedAddressNames(rowData.srv, 'srv');}],
70
+ ['testData', (rowData) => {return this._allowedTestData(rowData);}],
71
+ ['verification', (rowData) => {return this._allowedVerification(rowData);}]
72
+ ]);
73
+ this.name = name;
74
+ this.node = node;
75
+ this.type = type;
76
+ this.phase = phase;
77
+ this.execution = execution;
78
+ this.src = src;
79
+ this.dst = dst;
80
+ this.srv = srv;
81
+ this.testData = testData;
82
+ this.verification = verification;
83
+ this._phaseDefault = null;
84
+ this._phaseExecution = null;
85
+ }
86
+
87
+ getValue(heading, rowData) {
88
+ if('name' !== heading) {
89
+ return super.getValue(heading, rowData);
90
+ }
91
+ else {
92
+ let value = super.getValue(heading, rowData);
93
+ let actorPaths = value.value.split('.');
94
+ value.link = `/actor-editor/${actorPaths.join('/')}.js`
95
+ return value;
96
+ }
97
+ }
98
+
99
+ _defaultPhase(rowData) {
100
+ if('cond' === rowData.type) {
101
+ this._phaseDefault = 'pre, post';
102
+ return 'pre, post';
103
+ }
104
+ else {
105
+ this._phaseDefault = 'exec';
106
+ return 'exec';
107
+ }
108
+ }
109
+
110
+ _defaultExecution(rowData) {
111
+ if('orig' === rowData.type || 'cond' === rowData.type || 'local' === rowData.type) {
112
+ this._phaseExecution = 'serial';
113
+ return 'serial';
114
+ }
115
+ else {
116
+ this._phaseExecution = 'parallel';
117
+ return 'parallel';
118
+ }
119
+ }
120
+
121
+ _allowedTestData(rowData) {
122
+ if(undefined === rowData.testData || '' === rowData.testData) {
123
+ return DataTableKeyValue.ALLOWED_OK;
124
+ }
125
+ else {
126
+ try {
127
+ let testDataActors = JSON.parse(rowData.testData);
128
+ if(Array.isArray(testDataActors) && testDataActors.length >= 1) {
129
+ let formatOk = true;
130
+ testDataActors.forEach((testDataActor) => {
131
+ if(Array.isArray(testDataActor)) {
132
+ if(2 !== testDataActor.length && 3 !== testDataActor.length) {
133
+ formatOk = false;
134
+ }
135
+ }
136
+ else {
137
+ formatOk = false;
138
+ }
139
+ });
140
+ if(formatOk) {
141
+ return DataTableKeyValue.ALLOWED_OK;
142
+ }
143
+ else {
144
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
145
+ }
146
+ }
147
+ }
148
+ catch(err) {
149
+ }
150
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
151
+ }
152
+ }
153
+
154
+ _allowedVerification(rowData) {
155
+ if(undefined === rowData.verification || '' === rowData.verification) {
156
+ return DataTableKeyValue.ALLOWED_OK;
157
+ }
158
+ else {
159
+ try {
160
+ let verificationActors = JSON.parse(rowData.verification);
161
+ if(Array.isArray(verificationActors) && verificationActors.length >= 1) {
162
+ let formatOk = true;
163
+ verificationActors.forEach((verificationActor) => {
164
+ if(Array.isArray(verificationActor)) {
165
+ if(2 !== verificationActor.length && 3 !== verificationActor.length) {
166
+ formatOk = false;
167
+ }
168
+ }
169
+ else {
170
+ formatOk = false;
171
+ }
172
+ });
173
+ if(formatOk) {
174
+ return DataTableKeyValue.ALLOWED_OK;
175
+ }
176
+ else {
177
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
178
+ }
179
+ }
180
+ }
181
+ catch(err) {
182
+ }
183
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
184
+ }
185
+ }
186
+
187
+ _allowedAddressName(addressName, type) {
188
+ if(typeof addressName === 'string') {
189
+ if('' === addressName) {
190
+ return DataTableKeyValue.ALLOWED_OK;
191
+ }
192
+ else {
193
+ try {
194
+ const testDataAddressNames = JSON.parse(addressName);
195
+ if(Array.isArray(testDataAddressNames) && testDataAddressNames.length >= 1) {
196
+ for(let i = 0; i < testDataAddressNames.length; ++i) {
197
+ if('string' !== typeof testDataAddressNames[i]) {
198
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
199
+ }
200
+ const notAllowedSigns = testDataAddressNames[i].replace(/\w/g, '');
201
+ if(0 !== notAllowedSigns.length) {
202
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
203
+ }
204
+ }
205
+ return DataTableKeyValue.ALLOWED_OK;
206
+ }
207
+ else if(typeof testDataAddressNames === 'object') {
208
+ const obj = testDataAddressNames;
209
+ if(undefined !== obj.host && '' !== obj.host) {
210
+ // TODO: Verify correct host name.
211
+ return DataTableKeyValue.ALLOWED_OK;
212
+ }
213
+ else if(undefined !== obj.uri && '' !== obj.uri) {
214
+ // TODO: Verify correct uri.
215
+ return DataTableKeyValue.ALLOWED_OK;
216
+ }
217
+ else {
218
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
219
+ }
220
+ }
221
+ }
222
+ catch(err) {
223
+ const notAllowedSigns = addressName.replace(/\w/g, '');
224
+ if(0 === notAllowedSigns.length) {
225
+ return DataTableKeyValue.ALLOWED_OK;
226
+ }
227
+ }
228
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
229
+ }
230
+ }
231
+ else if(Array.isArray(addressName) && 'dst' === type) {
232
+ if(2 === addressName.length) {
233
+ if(DataTableKeyValue.ALLOWED_OK === this._allowedAddressName(addressName[0], type) && DataTableKeyValue.ALLOWED_OK === this._allowedAddressName(addressName[1], type)) {
234
+ return DataTableKeyValue.ALLOWED_OK;
235
+ }
236
+ else {
237
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
238
+ }
239
+ }
240
+ else {
241
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
242
+ }
243
+ }
244
+ else {
245
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
246
+ }
247
+ }
248
+
249
+ _allowedAddressNames(addressName, type) {
250
+ if(undefined === addressName) {
251
+ return DataTableKeyValue.ALLOWED_OK;
252
+ }
253
+ else {
254
+ let addresses = null;
255
+ try {
256
+ addresses = JSON.parse(addressName);
257
+ }
258
+ catch(err) {}
259
+ if(Array.isArray(addresses)) {
260
+ const results = [];
261
+ addresses.forEach((address) => {
262
+ results.push(this._allowedAddressName(address, type));
263
+ });
264
+ const first = results[0];
265
+ const allEqual = results.every((result) => {
266
+ return first === result;
267
+ });
268
+ if(allEqual && DataTableKeyValue.ALLOWED_OK === first) {
269
+ return DataTableKeyValue.ALLOWED_OK;
270
+ }
271
+ else {
272
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
273
+ }
274
+ }
275
+ else {
276
+ return this._allowedAddressName(addressName, type);
277
+ }
278
+ }
279
+ }
280
+ }
281
+
282
+ module.exports = DataActor;
@@ -0,0 +1,49 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestCaseSettings extends DataTableKeyValue {
8
+ constructor(preResult, execResult, postResult) {
9
+ super([
10
+ ['preResult', (rowData) => {return 'success'}],
11
+ ['execResult', (rowData) => {return 'success'}],
12
+ ['postResult', (rowData) => {return 'success'}]
13
+ ],
14
+ [
15
+ ['preResult', (rowData) => {
16
+ return this.getAllowedResult(rowData.preResult);
17
+ }],
18
+ ['execResult', (rowData) => {
19
+ return this.getAllowedResult(rowData.execResult);
20
+ }],
21
+ ['postResult', (rowData) => {
22
+ return this.getAllowedResult(rowData.postResult);
23
+ }]
24
+ ]);
25
+ this.preResult = preResult;
26
+ this.execResult = execResult;
27
+ this.postResult = postResult;
28
+ }
29
+
30
+ getAllowedResult(resultId) {
31
+ switch(resultId) {
32
+ case 'none':
33
+ case 'n/a':
34
+ case 'n_impl':
35
+ case 'success':
36
+ case 'n_exec':
37
+ case 'interrupt':
38
+ case 'failure':
39
+ case 'error':
40
+ case 'timeout':
41
+ case 'reflection':
42
+ return DataTableKeyValue.ALLOWED_OK;
43
+ default:
44
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
45
+ }
46
+ }
47
+ }
48
+
49
+ module.exports = DataTestCaseSettings;
@@ -0,0 +1,19 @@
1
+
2
+ 'use strict';
3
+
4
+
5
+ class DataTestCase {
6
+ constructor(settings = [], actors = [], testDataTestCases = [], testDataIteration = [], verificationTestCases = []) {
7
+ this.settings = settings;
8
+ this.actors = actors;
9
+ this.testDataTestCases = testDataTestCases;
10
+ this.testDataIteration = testDataIteration;
11
+ this.verificationTestCases = verificationTestCases;
12
+ }
13
+
14
+ addActor(actor) {
15
+ this.actors.push(actor);
16
+ }
17
+ }
18
+
19
+ module.exports = DataTestCase;
@@ -0,0 +1,54 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataIteration extends DataTableKeyValue {
8
+ constructor(phase, type, key, value, description) {
9
+ super([
10
+ ['phase', (rowData) => {return 'exec'}],
11
+ ['type', (rowData) => {
12
+ if(rowData.phase === 'pre') {
13
+ return 'cond';
14
+ }
15
+ else if(rowData.phase === 'exec') {
16
+ return 'orig';
17
+ }
18
+ else if(rowData.phase === 'post') {
19
+ return 'cond';
20
+ }
21
+ }]
22
+ ],
23
+ [
24
+ ['phase', (rowData) => {
25
+ return this.getAllowedPhase(rowData);
26
+ }],
27
+ ['type', (rowData) => {
28
+ return this.getAllowedType(rowData);
29
+ }]
30
+ ]);
31
+ this.phase = phase;
32
+ this.type = type;
33
+ this.key = key;
34
+ this.value = value;
35
+ this.description = description;
36
+ }
37
+
38
+ getAllowedPhase(rowData) {
39
+ switch(rowData.phase) {
40
+ case 'pre':
41
+ case 'exec':
42
+ case 'post':
43
+ return DataTableKeyValue.ALLOWED_OK;
44
+ default:
45
+ return DataTableKeyValue.ALLOWED_NOK_VALUE;
46
+ }
47
+ }
48
+
49
+ getAllowedType(rowData) {
50
+ return DataTableKeyValue.ALLOWED_OK;
51
+ }
52
+ }
53
+
54
+ module.exports = DataTestDataIteration;
@@ -0,0 +1,16 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataTestCase extends DataTableKeyValue {
8
+ constructor(key, value, description) {
9
+ super();
10
+ this.key = key;
11
+ this.value = value;
12
+ this.description = description;
13
+ }
14
+ }
15
+
16
+ module.exports = DataTestDataTestCase;
@@ -0,0 +1,24 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataVerificationTestCase extends DataTableKeyValue {
8
+ constructor(key, value, operation, type, description) {
9
+ super([
10
+ ['type', (rowData) => {return 'string'}],
11
+ ['operation', (rowData) => {return '==='}]
12
+ ],
13
+ [
14
+ []
15
+ ]);
16
+ this.key = key;
17
+ this.value = value;
18
+ this.operation = operation;
19
+ this.type = type;
20
+ this.description = description;
21
+ }
22
+ }
23
+
24
+ module.exports = DataVerificationTestCase;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataEnvironmentGlobal extends DataTableKeyValue {
8
+ constructor(name, sut, sutInstance, value, description) {
9
+ super();
10
+ this.name = name;
11
+ this.sut = sut;
12
+ this.sutInstance = sutInstance;
13
+ this.value = value;
14
+ this.description = description;
15
+ }
16
+ }
17
+
18
+ module.exports = DataTestDataEnvironmentGlobal;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataEnvironmentLocal extends DataTableKeyValue {
8
+ constructor(name, sut, sutInstance, value, description) {
9
+ super();
10
+ this.name = name;
11
+ this.sut = sut;
12
+ this.sutInstance = sutInstance;
13
+ this.value = value;
14
+ this.description = description;
15
+ }
16
+ }
17
+
18
+ module.exports = DataTestDataEnvironmentLocal;
@@ -0,0 +1,16 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataEnvironmentStatic extends DataTableKeyValue {
8
+ constructor(name, value, description) {
9
+ super();
10
+ this.name = name;
11
+ this.value = value;
12
+ this.description = description;
13
+ }
14
+ }
15
+
16
+ module.exports = DataTestDataEnvironmentStatic;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataGeneralGlobal extends DataTableKeyValue {
8
+ constructor(name, sut, sutInstance, value, description) {
9
+ super();
10
+ this.name = name;
11
+ this.sut = sut;
12
+ this.sutInstance = sutInstance;
13
+ this.value = value;
14
+ this.description = description;
15
+ }
16
+ }
17
+
18
+ module.exports = DataTestDataGeneralGlobal;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataGeneralLocal extends DataTableKeyValue {
8
+ constructor(name, sut, sutInstance, value, description) {
9
+ super();
10
+ this.name = name;
11
+ this.sut = sut;
12
+ this.sutInstance = sutInstance;
13
+ this.value = value;
14
+ this.description = description;
15
+ }
16
+ }
17
+
18
+ module.exports = DataTestDataGeneralLocal;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataOutputGlobal extends DataTableKeyValue {
8
+ constructor(name, sut, sutInstance, value, description) {
9
+ super();
10
+ this.name = name;
11
+ this.sut = sut;
12
+ this.sutInstance = sutInstance;
13
+ this.value = value;
14
+ this.description = description;
15
+ }
16
+ }
17
+
18
+ module.exports = DataTestDataOutputGlobal;
@@ -0,0 +1,18 @@
1
+
2
+ 'use strict';
3
+
4
+ const DataTableKeyValue = require('../data-table-key-value');
5
+
6
+
7
+ class DataTestDataOutputLocal extends DataTableKeyValue {
8
+ constructor(name, sut, sutInstance, value, description) {
9
+ super();
10
+ this.name = name;
11
+ this.sut = sut;
12
+ this.sutInstance = sutInstance;
13
+ this.value = value;
14
+ this.description = description;
15
+ }
16
+ }
17
+
18
+ module.exports = DataTestDataOutputLocal;