VRFS-1592 fixed
This commit is contained in:
parent
404670c9a5
commit
fc1fa1412f
|
|
@ -10,7 +10,7 @@ module JamRuby
|
|||
self.primary_key = 'id'
|
||||
|
||||
before_save :stringify_photo_info , :if => :updating_photo
|
||||
validates :biography, no_profanity: true, presence:true
|
||||
validates :biography, no_profanity: true, presence:true, length: {maximum: 4000}
|
||||
validates :name, presence: true
|
||||
validates :country, presence: true, :unless => :skip_location_validation
|
||||
validates :state, presence: true, :unless => :skip_location_validation
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
|
|||
end
|
||||
|
||||
it "handles max-length field input" do
|
||||
pending "update this after VRFS-1610 is resolved"
|
||||
# pending "update this after VRFS-1610 is resolved"
|
||||
max = {
|
||||
name: 1024,
|
||||
bio: 4000,
|
||||
|
|
@ -108,10 +108,14 @@ describe "Bands", :js => true, :type => :feature, :capybara_feature => true do
|
|||
band_name = 'a'*(max[:name] + 1)
|
||||
band_bio = 'b'*(max[:bio] + 1)
|
||||
band_website = 'c'*(max[:website] + 1)
|
||||
complete_band_setup_form(band_name, band_bio, 'band-website' => band_website)
|
||||
|
||||
expect(page).to have_selector('#band-profile-name', text: band_name.slice(0, max[:name]))
|
||||
expect(page).to have_selector('#band-profile-biography', text: band_bio.slice(0, max[:bio]))
|
||||
within('#band-setup-form') do
|
||||
fill_in 'band-name', with: band_name
|
||||
fill_in 'band-biography', with: band_bio
|
||||
all('#band-genres input[type="checkbox"]').first.trigger(:click)
|
||||
end
|
||||
sleep 1
|
||||
find('#btn-band-setup-next').trigger(:click)
|
||||
expect(page).to have_selector('#tdBandBiography .error-text li', text: "is too long (maximum is 4000 characters)")
|
||||
end
|
||||
|
||||
it "handles special characters in text fields" do
|
||||
|
|
|
|||
Loading…
Reference in New Issue