-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
move Freestyle OPA templates to ui5-test-writer
#2928
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: f814276 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…n-ux-tools into freestyle-test-templates
…n-ux-tools into freestyle-test-templates
packages/fiori-elements-writer/test/__snapshots__/lrop.test.ts.snap
Outdated
Show resolved
Hide resolved
@IainSAP @devinea Previously I had combined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments.
I think it would be easier to maintain going forward if to split templates based on UI5 template version e.g. 1.71.0 and 1.120.0
} | ||
] | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file can be removed as it was related to handlebars?
...opaConfig, | ||
viewNamePage: `${viewName}Page`, | ||
appIdWithSlash, | ||
ui5Version: templateUi5Version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ui5Version: templateUi5Version, | |
templateUi5Version: templateUi5Version, |
<link rel="stylesheet" type="text/css" href="../../resources/sap/ui/thirdparty/qunit-2.css"> | ||
<script src="../../resources/sap/ui/thirdparty/qunit-2.js"></script> | ||
<script src="../../resources/sap/ui/qunit/qunit-junit.js"></script> | ||
<% if (ui5Version !== "1.71.0") { %><script src="opaTests.qunit.js"></script><% } -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<% if (ui5Version !== "1.71.0") { %><script src="opaTests.qunit.js"></script><% } -%> | |
<% if (templateUi5Version !== "1.71.0") { %><script src="opaTests.qunit.js"></script><% } -%> |
I think it is better to rename this variable for clarity
@@ -0,0 +1,17 @@ | |||
/* global QUnit */ | |||
<% if (ui5Version === '1.71.0') { -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<% if (ui5Version === '1.71.0') { -%> | |
<% if (templateUi5Version === "1.71.0") { -%> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By placing the template folders into separate folders for versions 1.71.0 and 1.120.0, this is no longer required.
// eslint-disable-next-line fiori-custom/sap-no-global-define | ||
|
||
window.suite = function() { | ||
'use strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must use double quotes in UI5 template files
…n-ux-tools into freestyle-test-templates
* @param {Package} packageJson - The package.json object to update. | ||
* @param {boolean} addMock - Whether to include the UI5 mock YAML configuration. | ||
*/ | ||
function addTestScripts(packageJson: Package, addMock: boolean): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please consider moving this to another function in another file along with all the test related code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to packages/fiori-freestyle-writer/src/generateOPATests.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add tests to the writer tests packages/fiori-freestyle-writer/test/basic.test.ts ?
1.71.xand >1.120 cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
packages/fiori-freestyle-writer/templates/basic/extend/1.120.0/webapp/manifest.json
Show resolved
Hide resolved
|
#2932
ui5-writer-tests
ad logic.addUnits
flag to freestyle Fiori App to enable tests.