Comments (6)
Is there a goal to make the tooling output usable immediately after generation?
Generator does not know anything about use cases implemented by a component, it does not know how to give meaningful names to elements, what methods it needs etc. So we always assumed that whatever is generated is later adjusted manually or with generator config next to a Page Object, see docs https://utam.dev/tools/generator-content if development pipeline means to generate every time you build code.
We currently explore AI driven generation for Lightning Components, but we first release it internally for our engineers, we do not know yet if/when it will be available outside Salesforce.
from utam-java.
@0xtr When you say "in the repo, run utam-compile.js," to which repo are you referring? There is no utam-compile.js
in this repo that I'm aware of. Also, what is the structure of the JSON file that you are attempting to compile with the UTAM compiler?
It sounds like you're using a generator of some sort to parse the LWC markup into JSON, which is then passed to the JSON compiler. If that's the case, the bug may be in the generator, and not the UTAM compiler. Can you share the information about how you're generating the JSON input?
from utam-java.
@0xtr
I see what you mean - in generated JSON element name is "failure.id" hence the error as it's not valid.
"elements": [
{
"public": true,
"name": "failure.id",
We might fix it sometime, but it's definitely not high on priority list because generated content is usually edited before using it. Please manually replace generated element name to whatever is appropriate, for example to "failureId"
from utam-java.
@0xtr When you say "in the repo, run utam-compile.js," to which repo are you referring? There is no
utam-compile.js
in this repo that I'm aware of. Also, what is the structure of the JSON file that you are attempting to compile with the UTAM compiler?It sounds like you're using a generator of some sort to parse the LWC markup into JSON, which is then passed to the JSON compiler. If that's the case, the bug may be in the generator, and not the UTAM compiler. Can you share the information about how you're generating the JSON input?
Sorry, poor phrasing by myself there - in the same directory, that should be. I'm running it in one of my company's repos. I'm using the generator from https://www.npmjs.com/package/utam. Unless I've misunderstood the documentation there's no equivalent tooling for generating LWC->JSON that fits into the Java toolchain similarly?
This is the JSON file structure with other unrelated elements removed:
{
"description": {
"author": "UTAM generator",
"text": [
"Page Object: comp_name"
]
},
"shadow": {
"elements": [
<cut>
{
"name": "list",
"type": [],
"selector": {
"css": "ul"
},
"elements": [
{
"public": true,
"name": "listItems",
"type": [
"actionable",
"clickable"
],
"selector": {
"css": "li",
"returnAll": true
}
},
{
"public": true,
"name": "listItemByIndex",
"type": [
"actionable",
"clickable"
],
"selector": {
"css": "li:nth-of-type(%d)",
"args": [
{
"name": "index",
"type": "number"
}
]
},
"elements": [
{
"public": true,
"name": "failure.id",
"type": [
"actionable",
"clickable"
],
"selector": {
"css": "a"
}
}
]
}
]
},
<cut>
]
}
}
from utam-java.
@0xtr I see what you mean - in generated JSON element name is "failure.id" hence the error as it's not valid.
"elements": [ { "public": true, "name": "failure.id",We might fix it sometime, but it's definitely not high on priority list because generated content is usually edited before using it. Please manually replace generated element name to whatever is appropriate, for example to "failureId"
Will do, thank you. Is there a goal to make the tooling output usable immediately after generation? Having to edit the files manually means I am unlikely to update them very often unless something breaks; as an example, in this single repo I have 183 utam.json files generated via the utam npm command, and there are other repos.
from utam-java.
@lizaiv77 Good to know, thanks. I'll close this then if the intention is to edit compiler output for now.
from utam-java.
Related Issues (7)
- [Feat Request] Anything similar for Python HOT 1
- UtamBase.waitFor overload to allow specifying timeout explicitly HOT 3
- Scroll to any element not just Actionable HOT 3
- [Bug]Not able to identify the Components using UTAM page Object for salesforce HOT 4
- [Bug] npm install utam fails with errno -4048 Error: EPERM: operation not permitted, mkdir 'C:\' HOT 1
- Documentation or User Guide for UTAM-Java HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utam-java.