rely on I18n in specs for german

This commit is contained in:
ulferts
2020-10-02 23:31:10 +02:00
parent c32b1908ac
commit c098a79847
2 changed files with 5 additions and 5 deletions
@@ -111,7 +111,7 @@ describe 'adding a new budget', type: :feature, js: true do
I18n.locale = :de
new_budget_page.visit!
fill_in 'Thema', with: 'First Aid'
fill_in Budget.human_attribute_name(:subject, locale: :de), with: 'First Aid'
new_budget_page.add_unit_costs! '3,50', comment: 'RadAway'
new_budget_page.add_unit_costs! '1.000,50', comment: 'Rad-X'
@@ -120,7 +120,7 @@ describe 'adding a new budget', type: :feature, js: true do
new_budget_page.add_labor_costs! '0,5', user_name: user.name, comment: 'attendance'
click_on 'Anlegen'
expect(page).to have_content('Erfolgreich angelegt')
expect(page).to have_content(I18n.t(:notice_successful_create, locale: :de))
expect(new_budget_page.unit_costs_at(1)).to have_content '175,00 EUR'
expect(new_budget_page.unit_costs_at(2)).to have_content '50.025,00 EUR'
@@ -130,7 +130,7 @@ describe 'adding a new budget', type: :feature, js: true do
expect(new_budget_page.labor_costs_at(2)).to have_content '12,50 EUR'
expect(new_budget_page.overall_labor_costs).to have_content '125.015,00 EUR'
click_on 'Bearbeiten'
click_on I18n.t(:button_update, locale: :de)
budget_page.expect_planned_costs! type: :material, row: 1, expected: '175,00 EUR'
budget_page.expect_planned_costs! type: :material, row: 2, expected: '50.025,00 EUR'
@@ -154,7 +154,7 @@ describe 'updating a budget', type: :feature, js: true do
it 'retains the overridden budget when opening, but not editing (Regression #32822)' do
material_budget_item2
budget_page.visit!
click_on 'Bearbeiten'
click_on I18n.t(:button_update, locale: :de)
budget_page.expect_planned_costs! type: :material, row: 1, expected: '150,00 EUR'
budget_page.expect_planned_costs! type: :material, row: 2, expected: '1.000,00 EUR'
@@ -165,7 +165,7 @@ describe 'updating a budget', type: :feature, js: true do
expect(page).to have_field("budget_existing_material_budget_item_attributes_#{material_budget_item.id}_costs_edit")
click_on 'OK'
expect(budget_page).to have_content("Erfolgreich aktualisiert.")
expect(budget_page).to have_content(I18n.t(:notice_successful_update, locale: :de))
expect(page).to have_selector('tbody td.currency', text: '150,00 EUR')
expect(page).to have_selector('tbody td.currency', text: '1.000,00 EUR')