[TIMOB-25123] Windows: Mocha test Titanium.UI.Layout centerYPrecedence test failure
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Medium |
| Status | Closed |
| Resolution | Needs more info |
| Resolution Date | 2019-05-08T01:48:46.000+0000 |
| Affected Version/s | Release 8.0.0 |
| Fix Version/s | n/a |
| Components | Windows |
| Labels | engSchedule, failure-reviewed |
| Reporter | Eric Merriman |
| Assignee | Kota Iguchi |
| Created | 2017-08-11T16:22:02.000+0000 |
| Updated | 2019-05-20T14:14:48.000+0000 |
Description
Titanium.UI.Layout centerYPrecedence please investigate the failure.
Please use https://github.com/ewanharris/titanium-mobile-mocha-suite/tree/TIMOB-24816 to find the related test
You can use https://github.com/ewanharris/mocha-test to quickly debug (most) mocha tests)
Error "error":{"name":"AssertionError","actual":150,"expected":100,"operator":"to equal","message":"expected 150 to equal 100","generatedMessage":true,"stack":"/should.js:1411:20\n/your-test.js:39:42","showDiff":true}} from https://github.com/ewanharris/titanium-mobile-mocha-suite/blob/TIMOB-24816/Resources/ti.ui.layout.test.js#L740
Still valid, on desktop for me, now fails with
expected 59 to equal 100I would resolve this as "Need more info" for now as I was not able to reproduce this locally as well as on Jenkins. Test Code:
var view = Ti.UI.createView({ height: 200, width: 200, backgroundColor: 'yellow' }), viewChild = Ti.UI.createView({ backgroundColor: 'red', center: { y: 100, }, bottom: 50 }); var win = Ti.UI.createWindow(); viewChild.addEventListener('postlayout', function () { console.log(viewChild.size.height + ' should eql 100'); }); view.add(viewChild); win.add(view); win.open();[~kiguchi] just to clarify that it is not reproducible on Jenkins as well, meaning that it no longer fails the Mocha test?
[~amukherjee] Right. Jenkins no longer fails the test.
[Center precedence layout tests are enabled now](https://github.com/appcelerator/titanium-mobile-mocha-suite/pull/157) and [Jenkins passes them all](https://jenkins.appcelerator.org/blue/organizations/jenkins/titanium-sdk%2Ftitanium_mobile_windows/detail/master/77/pipeline).
Closing ticket as tests are running fine on Jenkins.