Fixes spec when introducing invalid instagram link

It seems that only the slash at the end of the address is making it invalid, which does not correspond to the error message. This is a separate issue.
This commit is contained in:
filipefurtad0
2023-03-06 10:38:27 +00:00
committed by Jean-Baptiste Bellet
parent ae166ae220
commit 6d05d57846

View File

@@ -98,7 +98,6 @@ describe "Registration" do
click_button "Continue"
expect(page).to have_content 'Step 1. Select Logo Image'
# Images
# Upload logo image
attach_file "image-select", Rails.root.join("spec/fixtures/files/logo.png"), visible: false
@@ -118,12 +117,12 @@ describe "Registration" do
click_button "Continue"
expect(page).to have_content 'How can people find My Awesome Enterprise online?'
# Filling in social with invalid value for instagram
fill_in "enterprise_instagram", with: "www.instagram.com/coopcircuits/ "
click_button "Continue"
# Filling in social with invalid value for instagram - slash after InStAgRaM
fill_in "enterprise_instagram", with: 'www.instagram.com/InStAgRaM/'
accept_alert "Failed to update your enterprise." do
expect(page).to have_content "Must be user name only eg. the_prof"
click_button "Continue"
end
expect(page).to have_content "Must be user name only eg. the_prof"
# Filling in social
fill_in 'enterprise_website', with: 'www.shop.com'