Commit 11b92b2f527610bc0b5c6d86defe8d2ceb871b11

Authored by Antonio Terceiro
2 parents 7e5512ff 41e841ea

Merge branch 'lattes_fix' into 'master'

Generalize lattes_curriculum plugins' cucumber test

See merge request !631
plugins/lattes_curriculum/features/lattes_curriculum.feature
@@ -29,7 +29,7 @@ Feature: import lattes information @@ -29,7 +29,7 @@ Feature: import lattes information
29 And I fill in "Lattes URL" with "http://lattes.cnpq.br/2864976228727880" 29 And I fill in "Lattes URL" with "http://lattes.cnpq.br/2864976228727880"
30 And I press "Save" 30 And I press "Save"
31 And I go to /profile/admin_user#lattes_tab 31 And I go to /profile/admin_user#lattes_tab
32 - Then I should see "Endereço para acessar este CV: http://lattes.cnpq.br/2864976228727880" 32 + Then I should see "Lattes"
33 33
34 Scenario: Don't show lattes informations for blank lattes urls 34 Scenario: Don't show lattes informations for blank lattes urls
35 Given I am on admin_user's control panel 35 Given I am on admin_user's control panel
plugins/lattes_curriculum/lib/html_parser.rb
@@ -19,6 +19,8 @@ class Html_parser @@ -19,6 +19,8 @@ class Html_parser
19 page = _("Lattes not found. Please, make sure the informed URL is correct.") 19 page = _("Lattes not found. Please, make sure the informed URL is correct.")
20 rescue Timeout::Error => e 20 rescue Timeout::Error => e
21 page = _("Lattes Platform is unreachable. Please, try it later.") 21 page = _("Lattes Platform is unreachable. Please, try it later.")
  22 + rescue
  23 + page = _("Could not import the lattes")
22 end 24 end
23 end 25 end
24 26