Making JS tests ready to go into master #13111

Merged
merged 3 commits into from Dec 2, 2016

Projects

None yet

5 participants

@cebe
Member
cebe commented Dec 1, 2016 edited

This PR contains the changes from #12936 by @arogachev as well as improved travis-ci configuration for NodeJS. I have squashed the work on JS tests to one commit as they were not applicable on current master (contained a lot of changes and reverts):

Implemented Javascript test suite

fixes #12840

Used @nkovacs draft as starting
point(#11037 (comment)).
I also fixed some bugs in yii.validation.js and did some refactoring.

Implemented tests:

  • yii.validation.js

Running tests:

  • Install Node.js. I used the latest version available at the moment -
    v7.1.0. Note that used jsdom dependent library version requires
    Node.js >= 4.
  • Run npm install to install dependencies.
  • Execute npm test for running tests.

I have already merged the adjustements made to the travis-ci setup to master: 729ddc5...47ece37
In combination with #13100 by @rob006 the build seems to be quite stable to me.

The changes have already been reviewed and commented in #12936. lets have a second look at what has changed in yii.validation.js and get this ready to be merged.

Huge thanks to @arogachev already for preparing this and all others participating for the input.

arogachev and others added some commits Dec 1, 2016
@arogachev @cebe arogachev Implemented Javascript test suite
fixes #12840

Used @nkovacs draft as starting
point(#11037 (comment)).
I also fixed some bugs in `yii.validation.js` and did some refactoring.

Implemented tests:

- yii.validation.js

Running tests:

- Install Node.js. I used the latest version available at the moment -
  `v7.1.0`. Note that used `jsdom` dependent library version requires
`Node.js >= 4`.
- Run `npm install` to install dependencies.
- Execute `npm test` for running tests.
8ea1f51
@cebe cebe move JS tests into a separate branch in travis matrix
this avoids running JS tests for each PHP version.
02af14e
@cebe cebe added the type:test label Dec 1, 2016
@cebe cebe added this to the 2.0.11 milestone Dec 1, 2016
@cebe cebe referenced this pull request Dec 1, 2016
Closed

#12840: Added unit tests for yii.validation.js #12936

8 of 8 tasks complete
@dynasource

looks ok to me. Well done.

@samdark
samdark approved these changes Dec 1, 2016 View changes
.travis.yml
+ # disable xdebug for performance in composer
+ - phpenv config-rm xdebug.ini || echo "xdebug is not installed"
+ - travis_retry composer self-update && composer --version
+ - travis_retry composer global require "fxp/composer-asset-plugin:^1.2.0"
@samdark
samdark Dec 1, 2016 Member

I'd add --no-plugins here for better stability when either composer or fxp updates.

@cebe
cebe Dec 1, 2016 Member

done.

@cebe cebe improved composer stability for the asset plugin
51786cb
@cebe cebe merged commit 612afdb into master Dec 2, 2016

3 checks passed

codeclimate Code Climate didn't find any new or fixed issues.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@cebe cebe deleted the js-tests branch Dec 2, 2016
@dynasource dynasource added the JS label Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment