Titanium JIRA Archive
Alloy (ALOY)

[ALOY-838] Alloy: Mix conditional environment and platform values

GitHub Issuen/a
TypeImprovement
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-08-05T21:26:31.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.3.0, 2013 Sprint 22, 2013 Sprint 25
ComponentsRuntime, Tooling
Labelsalloy, config, environment, platform, qe-automatedtest
ReporterFokke Zandbergen
AssigneeTony Lukasavage
Created2013-09-29T08:58:54.000+0000
Updated2014-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).

Comments

  1. Fokke Zandbergen 2013-09-29

    The PR: https://github.com/appcelerator/alloy/pull/247
  2. Tony Lukasavage 2013-10-23

    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:all would be a good idea too.
  3. Federico Casali 2013-12-02

    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:
        "os:android env:test": {
               "button": "os:android env:test"
           },
       "os:android env:development": {
               "button": "os:android env:development"
           },
       
    otherwise one test is failing on Android:
       [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 failure
       
       
    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
  4. Fokke Zandbergen 2013-12-03

    PR for the updated config.json: https://github.com/appcelerator/alloy/pull/280
  5. Tony Lukasavage 2013-12-03

    Resolved using [~fokke]'s PR above
  6. Federico Casali 2013-12-03

    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?
  7. Tony Lukasavage 2013-12-03

    already done

JSON Source