Comments (14)
Actually, upon closer inspection this is not the problem.
bio_markup includes the original text which the user wrote.
bio is bio_markup as rendered by textile into html.
So when best_in_place is rendering the contents of bio, something is getting confused. If the user wrote:
I'm editing with bip
Then the bio field stores "
Iām editing with bip". Inspecting the JS at runtime, this.original_content is just showing "I". It seems like the HTML code is confusing things somewhere.
I'll keep trying to read through things and understand what's not working.
from best_in_place.
Hello @bratsche,
Could you open a new branch an commit a failing spec for that case? You can use user's show view, in a similar fashion to other integration tests.
We'll be happy to check what's the problem and fix it.
Thank you,
from best_in_place.
Sure, I'd be happy to try to do that. I'm not quite sure how to setup the testing environment for bip though. I git cloned it, did bundle install, installed rspec.. then ran "bundle exec rspec". I get a lot of errors, which makes me assume I did something wrong.
ludwig:best_in_place cody$ bundle exec rspec
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF....FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
from best_in_place.
Hi @bratsche,
Can you provide the backtrace for these failing tests? The backtrace error should include some reason explaining why the tests are not passing.
By the way, I'm running the tests by doing bundle exec rspec spec/
, if it is useful to you.
from best_in_place.
I'm getting a lot of errors saying "Could not find table 'users'", so I must have missed a step on setting up the db for testing.
1) BestInPlace::BestInPlaceHelpers#best_in_place should generate a proper span
Failure/Error: @user = User.new :name => "Lucia",
ActiveRecord::StatementInvalid:
Could not find table 'users'
# ./spec/helpers/best_in_place_spec.rb:7:in `new'
# ./spec/helpers/best_in_place_spec.rb:7:in `block (3 levels) in <top (required)>'
from best_in_place.
Hi @bratsche,
You simply haven't your database up to date. Tests implying models are in the test_app
; thus, these tests use test_app
's database.
Please go to the test_app
folder and run bundle exec rake db:schema:prepare
in order to set up your . This should work.
from best_in_place.
I don't see a db:schema:prepare rake task. There is a db:schema:load rake task, so I ran that.. but it did not appear to fix the problem.
from best_in_place.
Sorry, I mispelled it:
bundle exec rake db:test:prepare
from best_in_place.
Perfect, thank you! Now I only see two errors in the tests, everything else works perfectly.
I will try to create a test to reproduce the problem I'm having now. Thank you!
from best_in_place.
Can you tell me which tests are failing now?
I have no failing specs locally, neither are in Travis CI (http://travis-ci.org/#!/bernat/best_in_place).
from best_in_place.
I'm sorry, I was mistaken. When I was trying to figure out how to run the tests I tried to run "rake test" from within the test_app directory, and there are two errors there. I still had those in my terminal window and mistakenly thought they were part of the rspec that I had just run.
from best_in_place.
I noticed the same issue today. If I have time I'll try to dig into it.
from best_in_place.
I am having this same error when I use display_with
from best_in_place.
related to #331
from best_in_place.
Related Issues (20)
- Rails 6 deprecation warnings
- undefined method `service_path' when adding best_in
- editing an item in a jsonb column
- undefined method `service_path' when adding best_in_place
- bip_text Test Helper datapicker MiniTest failure
- How to select foreign_key using friendly_id's hash_id?
- BestInPlaceEditor is not defined HOT 1
- Still okay to use? HOT 1
- Usage in Rails 6 HOT 28
- Rails 6 Deprecation warning
- Textarea not working HOT 1
- Rails 6 deprecation warning HOT 4
- How do differ best_in_place xhr request from othes?
- Project status HOT 6
- ActionView::Template::Error (wrong number of arguments (given 1, expected 3..4)) with cancan
- update is sent even though no change is made
- Render partial not working in ajax:success
- Release a new version, please HOT 1
- ignore this
- Add Ruby 3.2 support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from best_in_place.