Intern-based Unit Tests for Fuel UI

Implement unit test runner for Fuel UI.

Problem description

Currently Fuel UI is covered only by functional tests based on CasperJS functional testing framework. It allows end-to-end testing of Fuel UI, but there are lots of cases which can’t be covered (or covered with lots of efforts) by functional testing. So we need also to be able to write and run unit tests for Fuel UI.

Proposed change

We should implement unit test runner for Fuel UI using Intern Framework: * It should be available by running ./ --ui-unit. * It should be voting. * At least one test suite should be added (for Expression parser).


There are quite a few JS unit test frameworks available, but we should go with Intern as it also support functional testing and we plan to switch to it someday.

Data model impact


REST API impact


Upgrade impact


Security impact


Notifications impact


Other end user impact


Performance Impact


Plugin impact


Other deployer impact


Developer impact

If suitable, new changes to Fuel UI should be covered by unit tests.

Infrastructure impact

Intern uses Selenium, so Java Runtime Environment (JRE) 1.6 or newer version should be installed on Fuel CI workers.



Primary assignee: * Vitaly Kramskikh <>

Other contributors: * Przemyslaw Kaminski <>

Mandatory design review: * Vitaly Kramskikh <>

QA engineer: * Anastasia Palkina <>

Work Items

  • Rearrange the code in place where it is needed so it can be covered by unit tests.
  • Update gulpfile so gulp can run unit tests by command gulp unit-tests.
  • Update so in can run uint tests using --ui-unit argument. Unit tests should be voting.
  • Add a test suite for Expression parser.





Acceptance criteria

  • It is possible to run unit tests by running ./ --ui-unit.
  • Unit tests failure leads to failure of verify-fuel-web job.
  • Documentation is updated to mention how to set up and run unit tests.
  • Unit test suite for Expression parser exists.

Documentation Impact

  • Development environment setup docs should be modified to mention dependency on JRE for UI unit testing.
  • There should be described how to run unit tests on development environments.