This adds the ability to assign multiple, specific skills to workers from the UI. Skills are separated by a +.
E.g.: dev, dev+qa would create two workers:
worker 1 only has the dev skill
worker 2 has the dev and qa skills
To achieve this, I extracted a parsing.js module from setup.js which only contains parsing methods that work on primitives (i.e. no document.querySelector() stuff). I also took the liberty to write some tests for those methods (see parsing.spec.js).
Lastly, I changed the format of the data passed to a scenario (also see changes in scenario.spec.js):
Before the change workers were specified as scenario = {..., workers: ['dev', 'qa'] }.
After my changes, the workers now look like this: scenario = {..., workers: [ { skills: ['dev'] }, { skills: ['qa'] } ] }.
Let me know if this is useful or if you see anything that can be improved :)
This adds the ability to assign multiple, specific skills to workers from the UI. Skills are separated by a
+
.E.g.:
dev, dev+qa
would create two workers:dev
skilldev
andqa
skillsTo achieve this, I extracted a
parsing.js
module fromsetup.js
which only contains parsing methods that work on primitives (i.e. nodocument.querySelector()
stuff). I also took the liberty to write some tests for those methods (seeparsing.spec.js
).Lastly, I changed the format of the data passed to a scenario (also see changes in
scenario.spec.js
):scenario = {..., workers: ['dev', 'qa'] }
.scenario = {..., workers: [ { skills: ['dev'] }, { skills: ['qa'] } ] }
.Let me know if this is useful or if you see anything that can be improved :)