Fixes specs
This commit is contained in:
@@ -42,6 +42,7 @@ data:
|
|||||||
- config/locales/%{locale}/documents.yml
|
- config/locales/%{locale}/documents.yml
|
||||||
- config/locales/%{locale}/images.yml
|
- config/locales/%{locale}/images.yml
|
||||||
- config/locales/%{locale}/guides.yml
|
- config/locales/%{locale}/guides.yml
|
||||||
|
- config/locales/%{locale}/user_groups.yml
|
||||||
|
|
||||||
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
|
# Locale files to write new keys to, based on a list of key pattern => file rules. Matched from top to bottom:
|
||||||
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
en:
|
en:
|
||||||
user_group:
|
user_group:
|
||||||
zero: There are 0 groups of valuators
|
|
||||||
one: There is 1 group de valuators
|
|
||||||
other: There are '%{count}' groups of valuators
|
|
||||||
notice:
|
notice:
|
||||||
created: "User group created successfully"
|
created: "User group created successfully"
|
||||||
updated: "User group updated successfully"
|
updated: "User group updated successfully"
|
||||||
destroyed: "User group destroyed successfully"
|
destroyed: "User group deleted successfully"
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
es:
|
es:
|
||||||
user_group:
|
user_group:
|
||||||
zero: Hay 0 grupos de evaluadores
|
|
||||||
one: Hay 1 grupo de evaluadores
|
|
||||||
other: Hay '%{count}' grupos de evaluadores
|
|
||||||
notice:
|
notice:
|
||||||
created: "Grupo de usuarios creado correctamente"
|
created: "Grupo de usuarios creado correctamente"
|
||||||
updated: "Grupo de usuarios actualizado correctamente"
|
updated: "Grupo de usuarios actualizado correctamente"
|
||||||
|
|||||||
@@ -29,14 +29,14 @@ feature "Valuator groups", :focus do
|
|||||||
scenario "Create" do
|
scenario "Create" do
|
||||||
visit admin_valuators_path
|
visit admin_valuators_path
|
||||||
|
|
||||||
click_link "Grupos de evaluadores"
|
click_link "Valuator Groups"
|
||||||
click_link "Nuevo"
|
click_link "Create valuators group"
|
||||||
|
|
||||||
fill_in "valuator_group_name", with: "Health"
|
fill_in "valuator_group_name", with: "Health"
|
||||||
click_button "Create Valuator group"
|
click_button "Create valuators group"
|
||||||
|
|
||||||
expect(page).to have_content "User group created successfully"
|
expect(page).to have_content "User group created successfully"
|
||||||
#expect(page).to have_content "There are 1 groups of valuators"
|
expect(page).to have_content "There is 1 valuator group"
|
||||||
expect(page).to have_content "Health"
|
expect(page).to have_content "Health"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -47,20 +47,20 @@ feature "Valuator groups", :focus do
|
|||||||
click_link "Edit"
|
click_link "Edit"
|
||||||
|
|
||||||
fill_in "valuator_group_name", with: "Health and Sports"
|
fill_in "valuator_group_name", with: "Health and Sports"
|
||||||
click_button "Update Valuator group"
|
click_button "Save valuators group"
|
||||||
|
|
||||||
expect(page).to have_content "User group updated successfully"
|
expect(page).to have_content "User group updated successfully"
|
||||||
expect(page).to have_content "Health and Sports"
|
expect(page).to have_content "Health and Sports"
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "Destroy" do
|
scenario "Delete" do
|
||||||
group = create(:valuator_group)
|
group = create(:valuator_group)
|
||||||
|
|
||||||
visit admin_valuator_groups_path
|
visit admin_valuator_groups_path
|
||||||
click_link "Destroy"
|
click_link "Delete"
|
||||||
|
|
||||||
expect(page).to have_content "User group destroyed successfully"
|
expect(page).to have_content "User group deleted successfully"
|
||||||
expect(page).to have_content "There are 0 groups of users"
|
expect(page).to have_content "There are no valuator groups"
|
||||||
end
|
end
|
||||||
|
|
||||||
pending "When we change the group of a Valuator we should also change the valuator_assignments"
|
pending "When we change the group of a Valuator we should also change the valuator_assignments"
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ feature 'Admin valuators', :focus do
|
|||||||
visit edit_admin_valuator_path(@valuator)
|
visit edit_admin_valuator_path(@valuator)
|
||||||
|
|
||||||
fill_in 'valuator_description', with: 'Valuator for health'
|
fill_in 'valuator_description', with: 'Valuator for health'
|
||||||
click_button "Update Evaluador"
|
click_button "Update valuator"
|
||||||
|
|
||||||
expect(page).to have_content "Valuator updated successfully"
|
expect(page).to have_content "Valuator updated successfully"
|
||||||
expect(page).to have_content @valuator.email
|
expect(page).to have_content @valuator.email
|
||||||
@@ -113,7 +113,7 @@ feature 'Admin valuators', :focus do
|
|||||||
visit edit_admin_valuator_path(valuator)
|
visit edit_admin_valuator_path(valuator)
|
||||||
|
|
||||||
select "Health", from: "valuator_valuator_group_id"
|
select "Health", from: "valuator_valuator_group_id"
|
||||||
click_button "Update Evaluador"
|
click_button "Update valuator"
|
||||||
|
|
||||||
expect(page).to have_content "Valuator updated successfully"
|
expect(page).to have_content "Valuator updated successfully"
|
||||||
expect(page).to have_content "Health"
|
expect(page).to have_content "Health"
|
||||||
@@ -127,7 +127,7 @@ feature 'Admin valuators', :focus do
|
|||||||
|
|
||||||
visit edit_admin_valuator_path(valuator)
|
visit edit_admin_valuator_path(valuator)
|
||||||
select "Economy", from: "valuator_valuator_group_id"
|
select "Economy", from: "valuator_valuator_group_id"
|
||||||
click_button "Update Evaluador"
|
click_button "Update valuator"
|
||||||
|
|
||||||
expect(page).to have_content "Valuator updated successfully"
|
expect(page).to have_content "Valuator updated successfully"
|
||||||
expect(page).to have_content "Economy"
|
expect(page).to have_content "Economy"
|
||||||
@@ -140,7 +140,7 @@ feature 'Admin valuators', :focus do
|
|||||||
|
|
||||||
visit edit_admin_valuator_path(valuator)
|
visit edit_admin_valuator_path(valuator)
|
||||||
select "", from: "valuator_valuator_group_id"
|
select "", from: "valuator_valuator_group_id"
|
||||||
click_button "Update Evaluador"
|
click_button "Update valuator"
|
||||||
|
|
||||||
expect(page).to have_content "Valuator updated successfully"
|
expect(page).to have_content "Valuator updated successfully"
|
||||||
expect(page).to_not have_content "Health"
|
expect(page).to_not have_content "Health"
|
||||||
|
|||||||
Reference in New Issue
Block a user