Ticket #4385: patch

File patch, 1.3 KB (added by elexis, 7 years ago)
  • binaries/data/mods/public/simulation/components/tests/test_GuiInterface.js

    Resources = {  
    4040        "food": "Food",
    4141        "metal": "Metal",
    4242        "stone": "Stone",
    4343        "wood": "Wood"
    4444    }),
    45     "GetResource": () => ({}),
     45    "GetResource": resource => ({
     46        "aiAnalysisInfluenceGroup": "sparse"
     47    }),
    4648};
    4749
    4850var cmp = ConstructComponent(SYSTEM_ENTITY, "GuiInterface");
    4951
    5052
    TS_ASSERT_UNEVAL_EQUALS(cmp.GetSimulatio  
    355357            "metal": "Metal",
    356358            "stone": "Stone",
    357359            "wood": "Wood",
    358360        },
    359361        "aiInfluenceGroups": {
    360             "food": 0,
    361             "metal": 0,
    362             "stone": 0,
    363             "wood": 0,
     362            "food": "sparse",
     363            "metal": "sparse",
     364            "stone": "sparse",
     365            "wood": "sparse",
    364366        }
    365367    },
    366368});
    367369
    368370TS_ASSERT_UNEVAL_EQUALS(cmp.GetExtendedSimulationState(), {
    TS_ASSERT_UNEVAL_EQUALS(cmp.GetExtendedS  
    493495            "metal": "Metal",
    494496            "stone": "Stone",
    495497            "wood": "Wood",
    496498        },
    497499        "aiInfluenceGroups": {
    498             "food": 0,
    499             "metal": 0,
    500             "stone": 0,
    501             "wood": 0,
     500            "food": "sparse",
     501            "metal": "sparse",
     502            "stone": "sparse",
     503            "wood": "sparse",
    502504        }
    503505    },
    504506});
    505507
    506508