-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
initial fix attempt for comment/answer markdown #2605
Conversation
Generated by 🚫 Danger |
45ab665
to
cdd0df6
Compare
This is complete, but I can't figure out how to write the |
Hmm, @publiclab/reviewers any ideas on how to match these |
As you can see I've been trying all kinds of things! |
|
||
get :show, id: node.id | ||
|
||
assert_select 'strong', 'markdown' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jywarren don't know how to pull this PR to test locally so i cant test. but instead of "strong"
can you please try "b"
?
I actually started with b - but I don't think the assertion is failing,
it's actually the syntax of assert_select that's causing an error!
There should be instructions under "command line" below, but I think it
should be "git pull jywarren comment-markdown"
…On Tue, Apr 10, 2018, 8:05 PM Emmanuel Hayford ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/functional/questions_controller_test.rb
<#2605 (comment)>:
> note = nodes(:question)
get :show, id: note.id
assert_response :success
end
+ test 'question comment markdown and autolinking works' do
+ node = nodes(:question)
+ assert node.comments.length > 0
+ comment = node.comments.last
+ comment.comment = 'Test **markdown** and http://links.com'
+
+ get :show, id: node.id
+
+ assert_select 'strong', 'markdown'
@jywarren <https://github.com/jywarren> don't know how to pull this PR to
test locally so i cant test. but instead of "strong" can you please try
"b"?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2605 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJw7LMubzbxRJBK2p7BGG7LP_r-hCks5tnVbMgaJpZM4TNaCU>
.
|
And thanks!!!
…On Tue, Apr 10, 2018, 8:13 PM Jeffrey Warren ***@***.***> wrote:
I actually started with b - but I don't think the assertion is failing,
it's actually the syntax of assert_select that's causing an error!
There should be instructions under "command line" below, but I think it
should be "git pull jywarren comment-markdown"
On Tue, Apr 10, 2018, 8:05 PM Emmanuel Hayford ***@***.***>
wrote:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In test/functional/questions_controller_test.rb
> <#2605 (comment)>:
>
> > note = nodes(:question)
> get :show, id: note.id
> assert_response :success
> end
>
> + test 'question comment markdown and autolinking works' do
> + node = nodes(:question)
> + assert node.comments.length > 0
> + comment = node.comments.last
> + comment.comment = 'Test **markdown** and http://links.com'
> +
> + get :show, id: node.id
> +
> + assert_select 'strong', 'markdown'
>
> @jywarren <https://github.com/jywarren> don't know how to pull this PR
> to test locally so i cant test. but instead of "strong" can you please
> try "b"?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#2605 (review)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AABfJw7LMubzbxRJBK2p7BGG7LP_r-hCks5tnVbMgaJpZM4TNaCU>
> .
>
|
it's weird that i can't find your branch here to pull https://github.com/publiclab/plots2/branches/all?utf8=%E2%9C%93&query=comment :/ @jywarren |
Ah it's because it's a branch on my fork at jywarren/plots2!
…On Tue, Apr 10, 2018, 8:39 PM Emmanuel Hayford ***@***.***> wrote:
it's weird that i can't find your branch here to pull
https://github.com/publiclab/plots2/branches/all?utf8=%E2%9C%93&query=comment
:/ @jywarren <https://github.com/jywarren>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2605 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJwxdWviXKmfRcs3Iv2q_tEeHXfvpks5tnV6bgaJpZM4TNaCU>
.
|
Hmm, no luck? |
i stopped investigating last night cause it was time for sleep but today i looked into it and made some changes: f11e88f and made some comments in the file. |
Courtesy of @sagarpreet-chadha
@sagarpreet-chadha solution i went after. my history shows me doing |
I resolved a small conflict, let's see how this does! Thanks everybody for helping out, i really appreciate it. @Fastie is struggling a bit with commenting while this is broken. |
Copied this solution to the last test -- great catch. I feel a bit silly for missing that! |
Phew! Deploying to stable to check. |
Confirmed, it works!!! 🎉 🎆 🙌 👍 |
Awesome!!!! |
* initial fix attempt * additional tests for question comments and answer comments * unit tests for comment/answer body_markdown * test fix * should resolve some tests * fix note/node ref in test * comma * various test fixes * functional test fixes * one more functional test fix * Update questions_controller_test.rb * answer comment css selector * test css nesting * test css tweaks * rearranging assert_select * assert_select fixes * Update _comment.html.erb * Update _comment.html.erb * Update notes_controller_test.rb * Update notes_controller_test.rb * Update notes_controller_test.rb * Fix test for comment/answer markdown * Clean up nesting * Looks like a simpler solution Courtesy of @sagarpreet-chadha * Clean up * Update notes_controller_test.rb
fixes #2604
Starting with tests!