@sap-ux/ui5-test-writer 1.2.16 → 1.2.18

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.
@@ -177,14 +177,10 @@ function buildPageEntry(page, pageIndent, innerIndent) {
177
177
  const framework = page.template ?? 'ListReport';
178
178
  const innerProps = [
179
179
  `${innerIndent} appId: "${page.appID ?? ''}"`,
180
- `${innerIndent} componentId: "${page.componentID ?? ''}"`
180
+ `${innerIndent} componentId: "${page.componentID ?? ''}"`,
181
+ `${innerIndent} entitySet: "${page.entitySet ?? ''}"`,
182
+ `${innerIndent} contextPath: "${page.contextPath ?? ''}"`
181
183
  ];
182
- if (page.entitySet) {
183
- innerProps.push(`${innerIndent} entitySet: "${page.entitySet}"`);
184
- }
185
- if (page.contextPath) {
186
- innerProps.push(`${innerIndent} contextPath: "${page.contextPath}"`);
187
- }
188
184
  return [
189
185
  `${pageIndent}onThe${page.targetKey}Generated: new ${framework}(`,
190
186
  `${innerIndent}{`,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/ui5-test-writer",
3
3
  "description": "SAP UI5 tests writer",
4
- "version": "1.2.16",
4
+ "version": "1.2.18",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -34,7 +34,7 @@ sap.ui.define([
34
34
  <%_ }); -%>
35
35
  <%_ } -%>
36
36
  <%_ if (tableColumns && Object.keys(tableColumns).length > 0) { _%>
37
- Then.onThe<%- pageName %>Generated.onTable().iCheckColumns(<%- Object.keys(tableColumns).length %>, <%- JSON.stringify(tableColumns) %>);
37
+ Then.onThe<%- pageName %>Generated.onTable().iCheckColumns(undefined, <%- JSON.stringify(tableColumns) %>);
38
38
  <%_ } %>
39
39
  <%_ }); -%>
40
40
  });
@@ -26,11 +26,13 @@ sap.ui.define([
26
26
 
27
27
  opaTest("Navigate to <%- name%>ObjectPage", function (Given, When, Then) {
28
28
  Given.iStartMyApp();
29
- <% if (!hideFilterBar) { %>
29
+ <% if(navigationParents.parentLRName) { -%>
30
+ <% if (!hideFilterBar) { -%>
30
31
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
31
- <% } %>
32
+ <% } -%>
32
33
  Then.onThe<%- navigationParents.parentLRName%>Generated.onTable().iCheckRows();
33
34
  When.onThe<%- navigationParents.parentLRName%>Generated.onTable().iPressRow(0);
35
+ <% } -%>
34
36
  <% if(navigationParents.parentOPName) { %>
35
37
  Then.onThe<%- navigationParents.parentOPName%>Generated.iSeeThisPage();
36
38
  Then.onThe<%- navigationParents.parentOPName%>Generated.onTable({ property: "<%- navigationParents.parentOPTableSection %>" }).iCheckRows();
@@ -131,7 +133,7 @@ sap.ui.define([
131
133
  <% }) -%>
132
134
  <% } -%>
133
135
  <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%>
134
- Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(subSection.tableColumns) %>);
136
+ Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(subSection.tableColumns) %>);
135
137
  <% } -%>
136
138
  <% }) -%>
137
139
  <% } else { -%>
@@ -141,7 +143,7 @@ sap.ui.define([
141
143
  <% }) -%>
142
144
  <% } -%>
143
145
  <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%>
144
- Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(section.tableColumns) %>);
146
+ Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(section.tableColumns) %>);
145
147
  <% } -%>
146
148
  <% } -%>
147
149
  <% }) -%>
@@ -45,11 +45,13 @@ function journey() {
45
45
 
46
46
  opaTest("Navigate to <%- name%>ObjectPage", function (Given: Given, When: When, Then: Then) {
47
47
  Given.iStartMyApp();
48
- <% if (!hideFilterBar) { %>
48
+ <% if(navigationParents.parentLRName) { -%>
49
+ <% if (!hideFilterBar) { -%>
49
50
  When.onThe<%- navigationParents.parentLRName%>Generated.onFilterBar().iExecuteSearch();
50
- <% } %>
51
+ <% } -%>
51
52
  Then.onThe<%- navigationParents.parentLRName%>Generated.onTable("").iCheckRows();
52
53
  When.onThe<%- navigationParents.parentLRName%>Generated.onTable("").iPressRow(0);
54
+ <% } -%>
53
55
  <% if(navigationParents.parentOPName) { %>
54
56
  Then.onThe<%- navigationParents.parentOPName%>Generated.iSeeThisPage();
55
57
  Then.onThe<%- navigationParents.parentOPName%>Generated.onTable({ property: "<%- navigationParents.parentOPTableSection %>" }).iCheckRows();
@@ -150,7 +152,7 @@ function journey() {
150
152
  <% }) -%>
151
153
  <% } -%>
152
154
  <% if (subSection.tableColumns && Object.keys(subSection.tableColumns).length > 0 && subSection.navigationProperty) { -%>
153
- Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(subSection.tableColumns) %>);
155
+ Then.onThe<%- name%>Generated.onTable({ property: "<%- subSection.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(subSection.tableColumns) %>);
154
156
  <% } -%>
155
157
  <% }) -%>
156
158
  <% } else { -%>
@@ -160,7 +162,7 @@ function journey() {
160
162
  <% }) -%>
161
163
  <% } -%>
162
164
  <% if (section.tableColumns && Object.keys(section.tableColumns).length > 0 && section.navigationProperty) { -%>
163
- Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(<%- JSON.stringify(section.tableColumns) %>);
165
+ Then.onThe<%- name%>Generated.onTable({ property: "<%- section.navigationProperty %>" }).iCheckColumns(undefined, <%- JSON.stringify(section.tableColumns) %>);
164
166
  <% } -%>
165
167
  <% } -%>
166
168
  <% }) -%>
@@ -18,7 +18,7 @@
18
18
  sap.ui.define(['sap/fe/test/TemplatePage'], function(TemplatePage) {
19
19
  'use strict';
20
20
 
21
- var CustomPageDefinitions = {
21
+ const CustomPageDefinitions = {
22
22
  actions: {},
23
23
  assertions: {}
24
24
  };
@@ -4,7 +4,7 @@ sap.ui.define([
4
4
  <% } %>], function (JourneyRunner<% if (pages.length > 0) { %>, <%- pages.map(function(page) {return page.targetKey + "Generated";}).join(', ') %><% } %>) {
5
5
  'use strict';
6
6
 
7
- var runner = new JourneyRunner({
7
+ const runner = new JourneyRunner({
8
8
  launchUrl: sap.ui.require.toUrl('<%- appPath %>') + '/<%- htmlTarget %>',
9
9
  pages: {<% if (pages.length > 0) { %>
10
10
  <%- pages.map((page) => {return '\t\t\tonThe' + page.targetKey + 'Generated: ' + page.targetKey + "Generated"}).join(',\n')%>
@@ -10,26 +10,17 @@ import ObjectPage from "sap/fe/test/ObjectPage";
10
10
  const runner = new JourneyRunner({
11
11
  launchUrl: sap.ui.require.toUrl("<%- appPath %>") + "/<%- htmlTarget %>",
12
12
  pages: {
13
- <%- pages.map((page) => {
14
- const innerProps = [
15
- ' appId: "' + page.appID + '"',
16
- ' componentId: "' + page.componentID + '"'
17
- ];
18
- if (page.entitySet) {
19
- innerProps.push(' entitySet: "' + page.entitySet + '"');
20
- }
21
- if (page.contextPath) {
22
- innerProps.push(' contextPath: "' + page.contextPath + '"');
23
- }
24
- return (
25
- ' onThe' + page.targetKey + 'Generated: new ' + page.template + '(\n' +
26
- ' {\n' +
27
- innerProps.join(',\n') + '\n' +
28
- ' },\n' +
29
- ' Custom' + page.targetKey + 'Generated\n' +
30
- ' )'
31
- );
32
- }).join(',\n') %>
13
+ <%- pages.map((page) =>
14
+ ' onThe' + page.targetKey + 'Generated: new ' + page.template + '(\n' +
15
+ ' {\n' +
16
+ ' appId: "' + page.appID + '",\n' +
17
+ ' componentId: "' + page.componentID + '",\n' +
18
+ ' entitySet: "' + (page.entitySet || '') + '",\n' +
19
+ ' contextPath: "' + (page.contextPath || '') + '"\n' +
20
+ ' },\n' +
21
+ ' Custom' + page.targetKey + 'Generated\n' +
22
+ ' )'
23
+ ).join(',\n') %>
33
24
  },
34
25
  async: true
35
26
  });
@@ -18,7 +18,7 @@
18
18
  sap.ui.define(['sap/fe/test/ListReport'], function(ListReport) {
19
19
  'use strict';
20
20
 
21
- var CustomPageDefinitions = {
21
+ const CustomPageDefinitions = {
22
22
  actions: {},
23
23
  assertions: {}
24
24
  };
@@ -18,7 +18,7 @@
18
18
  sap.ui.define(['sap/fe/test/ObjectPage', 'sap/ui/test/actions/Press'], function(ObjectPage, Press) {
19
19
  'use strict';
20
20
 
21
- var CustomPageDefinitions = {
21
+ const CustomPageDefinitions = {
22
22
  actions: {
23
23
  iPressSectionIconTabFilterButton: function (section) {
24
24
  return this.waitFor({