Fix admin price UI

#475
This commit is contained in:
Artur Beljajev 2017-04-27 16:51:47 +03:00
parent b775555c00
commit 9530fd939d
7 changed files with 28 additions and 17 deletions

View file

@ -9,8 +9,15 @@ RSpec.feature 'Deleting price in admin area', settings: false do
scenario 'deletes price' do
visit admin_prices_url
click_link_or_button t('admin.billing.prices.price.delete_btn')
open_form
click_link_or_button t('admin.billing.prices.edit.delete_btn')
expect(page).to have_text(t('admin.billing.prices.destroy.destroyed'))
end
private
def open_form
click_link_or_button 'admin-edit-price-btn'
end
end

View file

@ -15,8 +15,10 @@ RSpec.feature 'Editing price in admin area', settings: false do
expect(page).to have_text(t('admin.billing.prices.update.updated'))
end
private
def open_form
click_link_or_button t('admin.billing.prices.price.edit_btn')
click_link_or_button 'admin-edit-price-btn'
end
def submit_form

View file

@ -16,6 +16,8 @@ RSpec.feature 'New price in admin area', settings: false do
expect(page).to have_text(t('admin.billing.prices.create.created'))
end
private
def open_list
click_link_or_button t('admin.menu.prices')
end