Arquisoft / InciManager_i2b

InciManager_i2b
MIT License
1 stars 2 forks source link

Quick fix1 #52

Closed carmee-en closed 6 years ago

carmee-en commented 6 years ago

Very small fix regarding the landing page '/'.

I'm having problems executing WebTest on SpringBoot, as none of the tests pass. As I understand it, this class isn't tested on Travis or Circle so... Are we sure these tests passed on the local machine before? I mean I only added a new method in the controller. However, it is possible that the problem is in my installation or I'm missing something.

Anyway, I'm 100% positive the redirect from '/' without being logged in works.

codecov[bot] commented 6 years ago

Codecov Report

Merging #52 into master will increase coverage by 0.02%. The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #52      +/-   ##
============================================
+ Coverage     87.69%   87.71%   +0.02%     
- Complexity      184      185       +1     
============================================
  Files            25       25              
  Lines           512      513       +1     
  Branches         58       58              
============================================
+ Hits            449      450       +1     
  Misses           43       43              
  Partials         20       20
Impacted Files Coverage Δ Complexity Δ
...om/uniovi/controllers/IncidentsInfoController.java 95.45% <100%> (+0.21%) 9 <1> (+1) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3efca99...b0809ce. Read the comment docs.

alejgh commented 6 years ago

Selenium tests are not run with Travis, since we need to change the configuration to simulate a web browser (I'm pretty sure it is possible to do it, but I haven't investigated it yet). However, that test should pass in your local machine, so I don't know why they are failing. Nevertheless, in order to test the controller you need to add a new test case in the IncidentsControllerTests class, you can check the other functions in the class to see how to implement the test. Selenium tests are complementary to the controller tests, just to check that the views display as expected. Controllers tests are more important IMO.

carmee-en commented 6 years ago

Oh man I forgot about the repository tests. Also, about redirection I felt it was pretty redundant to write again the condition, as it is checked in that other method. Anyway, I will add documentation for clarity

Thanks a lot!