Fix problem with string matchers

This commit is contained in:
Luis Ramos
2020-09-04 13:12:33 +01:00
parent 6950d7717f
commit 4125fe1690

View File

@@ -36,8 +36,7 @@ feature 'shipping methods' do
expect(page).to have_no_button I18n.t("actions.create")
# Then the shipping method should have its distributor set
message = "Shipping Method \"Carrier Pidgeon\" has been successfully created!"
expect(page).to have_flash_message message
expect(flash_message).to include "Carrier Pidgeon", "successfully created!"
sm = Spree::ShippingMethod.last
expect(sm.name).to eq('Carrier Pidgeon')
@@ -49,7 +48,7 @@ feature 'shipping methods' do
scenario "deleting a shipping method" do
visit_delete spree.admin_shipping_method_path(@shipping_method)
expect(page).to have_content "Shipping Method \"#{@shipping_method.name}\" has been successfully removed!"
expect(flash_message).to eq "Successfully Removed"
expect(Spree::ShippingMethod.where(id: @shipping_method.id)).to be_empty
end
@@ -126,7 +125,7 @@ feature 'shipping methods' do
click_button I18n.t("actions.create")
expect(page).to have_content I18n.t('spree.admin.shipping_methods.edit.editing_shipping_method')
expect(flash_message).to eq I18n.t('successfully_created', resource: 'Shipping Method "Teleport"')
expect(flash_message).to include "Teleport", "successfully created!"
expect(first('tags-input .tag-list ti-tag-item')).to have_content "local"