Skip to content
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

ADD: Comment image upload system test #7255

Merged
merged 2 commits into from
Jan 16, 2020
Merged

ADD: Comment image upload system test #7255

merged 2 commits into from
Jan 16, 2020

Conversation

VladimirMikulic
Copy link
Contributor

Part of #5316

@jywarren could you review this? Thanks.

@codecov
Copy link

codecov bot commented Jan 16, 2020

Codecov Report

Merging #7255 into master will increase coverage by 20.3%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7255      +/-   ##
==========================================
+ Coverage   61.25%   81.55%   +20.3%     
==========================================
  Files          97       97              
  Lines        5709     5601     -108     
==========================================
+ Hits         3497     4568    +1071     
+ Misses       2212     1033    -1179
Impacted Files Coverage Δ
app/controllers/application_controller.rb 92.3% <100%> (+8.4%) ⬆️
app/controllers/home_controller.rb 98.38% <0%> (+1.61%) ⬆️
app/models/user.rb 91.01% <0%> (+1.95%) ⬆️
app/models/image.rb 82.5% <0%> (+2.5%) ⬆️
app/models/comment.rb 76.78% <0%> (+2.5%) ⬆️
app/models/node.rb 90.9% <0%> (+2.96%) ⬆️
app/models/tag_selection.rb 96% <0%> (+4%) ⬆️
app/controllers/stats_controller.rb 74.19% <0%> (+5.37%) ⬆️
app/helpers/application_helper.rb 84.52% <0%> (+5.95%) ⬆️
... and 28 more

@@ -74,4 +74,40 @@ def setup
assert_equal( comment_preview_button.text, "Preview" )
end

test 'comment image upload' do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a test for exceeding image size too

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question is, do you have a limit set? I've uploaded 60mb image without a problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't display some kind of error message or something, then I can't test it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly check. We need to set the limit if not set yet. pinging @jywarren for limit

@SidharthBansal
Copy link
Member

@Uzay-G @VladimirMikulic Please create a pr for Comments.
In the comments pr you can add all the system tests regarding comments.
For example, image upload tests, Cntrl+Enter should result in posting the comment and so on.
It will result in pr floods if you will add one pr per system test. I hope this makes sense.
However if you think that you require functional changes with the system tests, then you can create a discrete pr.

@SidharthBansal
Copy link
Member

The prs requiring the functional changes will be graded separately. We will be fair to you all in terms of marks.

@Uzay-G
Copy link
Member

Uzay-G commented Jan 16, 2020

@Uzay-G @VladimirMikulic Please create a pr for Comments.
In the comments pr you can add all the system tests regarding comments.
For example, image upload tests, Cntrl+Enter should result in posting the comment and so on.
It will result in pr floods if you will add one pr per system test. I hope this makes sense.
However if you think that you require functional changes with the system tests, then you can create a discrete pr.

My comment test has already been merged but we will do this if there are more comments tests 👍

@plotsbot
Copy link
Collaborator

1 Warning
⚠️ There was an error with Danger bot’s Junit parsing: No JUnit file was found at output.xml
2 Messages
📖 @VladimirMikulic Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 #
Screenshots 📸 (click to expand)

7255-test_questions.png

7255-test_embeddable_grids.png

7255-test_signup.png

7255-test_viewing_the_settings_page.png

7255-test_tag_by_author_page.png

7255-test_wiki_page_with_inline_grids.png

7255-test_stats.png

7255-test_viewing_the_dashboard.png

7255-test_searching_an_item_from_the_homepage.png

7255-test_signup_modal_form_validation.png

7255-test_tag_stats.png

7255-test_login_modal_form_validation.png

7255-test_questions_shadow.png

7255-test_login_modal.png

7255-test_profile_page.png

7255-test_comments.png

7255-test_tags.png

7255-test_signup_modal.png

7255-test_wiki.png

7255-test_methods.png

7255-test_tag_page.png

7255-test_blog_page_with_location_modal.png

7255-test_tag_wildcard.png

7255-test_signup_modal_disabled_submit_button_on_empty_username.png

7255-test_embeddable_thumbnail_grids.png

7255-test_front_page_with_navbar_search_autocomplete.png

7255-test_spam_moderation_page.png

7255-test_login.png

7255-test_viewing_the_dropdown_menu.png

7255-test_viewing_question_post.png

7255-test_mobile_displays.png

7255-test_simple-data-grapher_powertag.png

7255-test_front.png

7255-test_question_page.png

7255-test_tag_contributors_page.png

7255-test_blog.png

7255-test_people.png

7255-test_wiki_revisions.png

Learn about automated screenshots

Generated by 🚫 Danger

@VladimirMikulic
Copy link
Contributor Author

VladimirMikulic commented Jan 16, 2020

@jywarren I think you'll be glad to see this. Both image upload tests have been repaired and are working (even image drag & drop)! The system tests are awesome 😄 Love them!

@jywarren
Copy link
Member

This is EPIC! So great! I'm so glad you like system testing. It's so powerful. Thank you a ton for this! I'll close my original attempt!

@SidharthBansal
Copy link
Member

Yeah we should do more tests.

vinitshahdeo pushed a commit to vinitshahdeo/plots2 that referenced this pull request Feb 1, 2020
* ADD: Comment image upload system test

* ADD: Comment image drag & drop upload system test
NitinBhasneria pushed a commit to NitinBhasneria/plots2 that referenced this pull request Feb 5, 2020
* ADD: Comment image upload system test

* ADD: Comment image drag & drop upload system test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants