[ALOY-838] Alloy: Mix conditional environment and platform values
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2014-08-05T21:26:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Alloy 1.3.0, 2013 Sprint 22, 2013 Sprint 25 |
| Components | Runtime, Tooling |
| Labels | alloy, config, environment, platform, qe-automatedtest |
| Reporter | Fokke Zandbergen |
| Assignee | Tony Lukasavage |
| Created | 2013-09-29T08:58:54.000+0000 |
| Updated | 2014-08-05T21:26:31.000+0000 |
Description
Right now it's not possible to have a configuration that applies only to
ios in production in config.json. It would be nice to be able to mix both conditionals, just like in the XML views and TSS styles (and of course JS controllers).
The PR: https://github.com/appcelerator/alloy/pull/247
test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-838 Functional test should include running the given test app on multiple platforms, both sims and devices, and confirming that the runtime unit tests pass. Asserting that all existing compilations still pass with
jake test:allwould be a good idea too.Reopening as one unit test is failing. In order to have all runtime unit test passing on Android, those lines have to be added in the config.json file:
otherwise one test is failing on Android:"os:android env:test": { "button": "os:android env:test" }, "os:android env:development": { "button": "os:android env:development" },TiSDK 3.2.0.v20131127194046 CLI 3.2.0-beta Alloy 1.3.0-beta Titanium Studio 3.2.0.201311262027 iPad OS 7 and simulator Android Google Nexus Galaxy 4.3[FAIL] index controller --> #button component has correct style [INFO] [INFO] index controller #button component has correct style [INFO] expected [object Button] to have style: [INFO] {"envOnly":"test","id":"button","osOnly":"android","title":"os:android env:test"} [INFO] but found this instead: [INFO] {"envOnly":"test","id":"button","osOnly":"android","title":"env:test os:android "} [INFO] Error: expected [object Button] to have style: [INFO] {"envOnly":"test","id":"button","osOnly":"android","title":"os:android env:test"} [INFO] but found this instead: [INFO] {"envOnly":"test","id":"button","osOnly":"android","title":"env:test os:android "} [INFO] at new <anonymous> (jasmine.js:1:1431) [INFO] at [object Object].toHaveStyle (jasmine.js:1:13466) [INFO] at [object Object].<anonymous> (runtimeTester.js:1:1637) [INFO] at [object Object].execute (jasmine.js:1:10733) [INFO] at [object Object].next_ (jasmine.js:1:27094) [INFO] at [object Object].start (jasmine.js:1:26510) [INFO] at [object Object].execute (jasmine.js:1:31005) [INFO] at [object Object].next_ (jasmine.js:1:27094) [INFO] at jasmine.js:1:27067 [INFO] at [object Object].finish (jasmine.js:1:30669) [INFO] Finished in 0.039 seconds [INFO] 8 specs, 1 failurePR for the updated config.json: https://github.com/appcelerator/alloy/pull/280
Resolved using [~fokke]'s PR above
Verified all tests are passing after latest PR (merged in master) with Alloy 1.3.0-beta. Is it possible to merge the PR in the 1_3_X branch too?
already done