Webogram: Create tests for the full controller

Created on 6 Mar 2017  Â·  3Comments  Â·  Source: zhukov/webogram

Currently, when running "npm test", the following scores appear for controller.js:

| | % Statements | % Branch | % Functions | % Lines |
|:------------:|:------------:|:--------:|:-------------:|:---------:|
| Currently | 3.5 | 0 | 0.36 | 3.52 |

The test are help to keep the controller bug-free. It also gives confirmation to developers contributing to the code that the old functionality was not changed (unless this is the intented purpose). This could be useful when the controller is split up in modules (#1300).
In order to create better scores, the following controllers need additional testing:

  • [ ] AppLoginController
  • [ ] AppIMController
  • [ ] AppImDialogsController
  • [ ] AppImHistoryController
  • [x] AppImPanelController
  • [ ] AppImSendController
  • [x] AppFooterController
  • [ ] PhotoModalController
  • [ ] UserpicModalController
  • [ ] ChatpicModalController
  • [x] VideoModalController
  • [x] DocumentModalController
  • [x] EmbedModalController
  • [ ] GameModalController
  • [ ] UserModalController
  • [ ] ChatModalController
  • [ ] ChannelModalController
  • [ ] SettingModalController
  • [x] ChangelogModalController
  • [x] ProfileEditModalController
  • [x] UsernameEditModalController
  • [ ] SessionsListModalController
  • [ ] PasswordUpdateModalController
  • [x] PasswordRecoveryModalController
  • [ ] ContactsModalController
  • [x] PeerSelectController
  • [ ] ChatCreateModalController
  • [ ] ChatEditModalController
  • [ ] ChannelEditModalController
  • [ ] ChatInviteLinkModalController
  • [x] ImportContactModalController
enhancement

Most helpful comment

Let me see if I can give some help here.

All 3 comments

I was lucky to get karma and test coverage into the code repository. Don't expect @zhukov to tackle your issue on himself. In his opinion UI related does not need to be automatically tested (IIRC).

However he's likely to accept your PR if you submit one. Currently I'm lacking time to wrap my head around the code base. Otherwise I'd have contributed more patches myself.

Let me see if I can give some help here.

Thanks! If you do, can you "claim" some controllers so that we don't do the work twice?
You can look at previous PR's and existing tests in order to create a uniform testing suite

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bicatso picture bicatso  Â·  3Comments

iagocavalcante picture iagocavalcante  Â·  8Comments

thisIsTheFoxe picture thisIsTheFoxe  Â·  3Comments

realreef picture realreef  Â·  6Comments

plyaskin picture plyaskin  Â·  3Comments