Comments (10)
Can you share your code + the .showroom file?
from showroom.
Of course:
export default {
component: 'calendar-graph',
path: '/dist/cyChart.min.js',
functions: {
initStatusMapping: () => {
dashboard.targetComponent.setStatusMapping([
{
condition: {
is: 2
},
action: {
bgColor: 'green'
},
legend: 'Good (>60%)'
},
{
condition: {
is: 1
},
action: {
bgColor: 'yellow'
},
legend: 'Okay (30-60%)'
},
{
condition: {
is: 0
},
action: {
bgColor: 'red'
},
legend: 'Bad (<30%)'
},
{
condition: {
is: null
},
action: {
bgColor: 'grey'
},
legend: 'Nicht verwendet'
}
]);
},
initData: () => {
dashboard.targetComponent.setData([
{date: '2016-02-15T00:00:00Z', devices: [{name: 'M1', value: null}, {name: 'M2', value: 1}]},
{date: '2016-02-13T00:00:00Z', devices: [{name: 'M1', value: 2}, {name: 'M2', value: 2}]},
{date: '2016-02-14T00:00:00Z', devices: [{name: 'Machine1', value: 0}, {name: 'M2', value: null}]},
]);
}
}
}
from showroom.
I can’t share the code of the component itself, it’s property of the company where I work :(
from showroom.
Can you share the test part that is failing?
from showroom.
Hey,
I did an simplified example where this issue can be reproduced:
https://github.com/msteller-connyun/showroom-test
just execute:
yarn
yarn build
yarn test
After this issue is fluffy it my not fail the first time, try to run yarn test
several times in a row, if the error does not occur the first time.
from showroom.
Hey, your example is working correctly, if you run npm run build
before tests.
try npx showroom
, browser to http://localhost:3000
and see that without build the showroom client app cannot load the component.
from showroom.
Perhaps adding in your package.json "pretest": "npm run build"
?
from showroom.
Hey,
the tests are fluffy, that means that it sometimes works and sometimes not.
Mostly, the first time it works. If I execute the test immediately a second time it’s mostly broken. If it’s broken I have to wait some time, before it’s working again.
Yes, probably npm run build could fix the issue, because if there is a small break between the tests it works (mostly). This is similar to my setTimeout workaround.
Please execute npm run test
two or three times directly in a row and check if it still working for you.
And yes, in the showroom GUI it’s working always. It’s a test-only issue.
from showroom.
Will check further
from showroom.
I'm having the same issue. It is difficult to reproduce locally but happens more often than not in my CI builds.
Ex. https://circleci.com/gh/evtaylor/functional-lit-element/20
from showroom.
Related Issues (10)
- FF<66 Does not support `import()` HOT 1
- Missing dependency HOT 1
- Call a method? HOT 6
- The site doesn't work HOT 1
- Using internal properties editor strips down properties with function values HOT 1
- Documentation issues
- Feature Request: findAll HOT 9
- Need help with understanding Showroom HOT 8
- Render Container / Wrapper Overlay HOT 1
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 showroom.