[noosfero/noosfero][master] Fix selenium tests related to article edition
Victor Costa
gitlab at gitlab.com
Mon Apr 6 14:16:47 BRT 2015
Victor Costa pushed to master at Noosfero / noosfero
Commits:
ef9d58aa by Victor Costa at 2015-04-06T13:36:55Z
Fix selenium tests related to article edition
- - - - -
2 changed files:
- features/edit_article.feature
- features/step_definitions/internationalization_steps.rb
Changes:
=====================================
features/edit_article.feature
=====================================
--- a/features/edit_article.feature
+++ b/features/edit_article.feature
@@ -250,6 +250,7 @@ Feature: edit article
Scenario: add a translation to an article
Given I am on joaosilva's sitemap
And I follow "Save the whales"
+ And the following languages "en es" are available on environment
Then I should not see "Add translation"
And I follow "Edit"
And I select "English" from "Language"
@@ -267,6 +268,7 @@ Feature: edit article
| owner | name | language |
| joaosilva | Article in English | en |
And I am on joaosilva's sitemap
+ And the following languages "en pt" are available on environment
When I follow "Article in English"
And I follow "Add translation"
And I fill in "Title" with "Article in Portuguese"
=====================================
features/step_definitions/internationalization_steps.rb
=====================================
--- a/features/step_definitions/internationalization_steps.rb
+++ b/features/step_definitions/internationalization_steps.rb
@@ -22,6 +22,10 @@ Given /^Noosfero is configured to use (.+) as default$/ do |lang|
Noosfero.default_locale = language_to_code(lang)
end
+Given /^the following languages "([^"]*)" are available on environment$/ do |languages|
+ Environment.default.update_attribute(:languages, languages.split)
+end
+
After do
# reset everything back to normal
Noosfero.default_locale = nil
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/ef9d58aafb7889e7e3b6e63249fab1bf4f7fbbad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150406/dc6b6095/attachment.html>
More information about the Noosfero-dev
mailing list