@sap-ux/ui5-test-writer 0.5.0 → 0.5.1

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.
@@ -56,7 +56,7 @@ function filterByUi5Version(files, templateUi5Version) {
56
56
  return true;
57
57
  }
58
58
  // For all other files, include only those in the current UI5 version directory.
59
- return filePath.includes(`/${templateUi5Version}/`);
59
+ return filePath.includes(`${path_1.sep}${templateUi5Version}${path_1.sep}`);
60
60
  });
61
61
  }
62
62
  /**
@@ -89,7 +89,7 @@ function filterByTypeScript(files, isTypeScript) {
89
89
  */
90
90
  function getDestFilePath(filePath, freestyleTemplateDir, commonTemplateDir, templateUi5Version) {
91
91
  if (filePath.includes(freestyleTemplateDir)) {
92
- return filePath.replace(freestyleTemplateDir, '').replace(`/${templateUi5Version}/`, '/');
92
+ return filePath.replace(freestyleTemplateDir, '').replace(`${path_1.sep}${templateUi5Version}${path_1.sep}`, path_1.sep);
93
93
  }
94
94
  else if (filePath.includes(commonTemplateDir)) {
95
95
  return filePath.replace(commonTemplateDir, '');
@@ -135,10 +135,10 @@ async function generateFreestyleOPAFiles(basePath, opaConfig, fs, log) {
135
135
  // - viewName.js files are renamed to include the view name in their file path
136
136
  // - viewName.ts files are renamed with the view name appended with 'Page'
137
137
  const renameMap = {
138
- '/integration/pages/viewName.js': `integration/pages/${viewName}.js`,
139
- '/integration/pages/viewName.ts': `integration/pages/${viewName}Page.ts`,
140
- '/unit/controller/viewName.controller.js': `unit/controller/${viewName}.controller.js`,
141
- '/unit/controller/viewName.controller.ts': `unit/controller/${viewName}Page.controller.ts`
138
+ [(0, path_1.join)('/integration/pages/viewName.js')]: (0, path_1.join)(`integration/pages/${viewName}.js`),
139
+ [(0, path_1.join)('/integration/pages/viewName.ts')]: (0, path_1.join)(`integration/pages/${viewName}Page.ts`),
140
+ [(0, path_1.join)('/unit/controller/viewName.controller.js')]: (0, path_1.join)(`unit/controller/${viewName}.controller.js`),
141
+ [(0, path_1.join)('/unit/controller/viewName.controller.ts')]: (0, path_1.join)(`unit/controller/${viewName}Page.controller.ts`)
142
142
  };
143
143
  // copy templates
144
144
  let freestyleTestTemplatesCopied = false;
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": "0.5.0",
4
+ "version": "0.5.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",