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

Ensure formatting toolbars on comments appear in all variations #8477

Closed
wants to merge 9 commits into from

Conversation

Sagarpreet
Copy link
Contributor

Fixes: #8475

🔜

@Sagarpreet Sagarpreet requested a review from a team as a code owner October 7, 2020 14:29
@gitpod-io
Copy link

gitpod-io bot commented Oct 7, 2020

@Sagarpreet Sagarpreet changed the title [WIP] Ensure formatting toolbars on comments appear in all variations Ensure formatting toolbars on comments appear in all variations Oct 7, 2020
@codecov
Copy link

codecov bot commented Oct 7, 2020

Codecov Report

Merging #8477 into main will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8477   +/-   ##
=======================================
  Coverage   81.76%   81.76%           
=======================================
  Files         101      101           
  Lines        5901     5901           
=======================================
  Hits         4825     4825           
  Misses       1076     1076           

@Sagarpreet
Copy link
Contributor Author

 FAIL["test_comment_deletion", #<Minitest::Reporters::Suite:0x00007f37ca25c868 @name="CommentTest">, 256.499083343]
 test_comment_deletion#CommentTest (256.50s)
        expected to find css "#comments-list .comment" 1 time but there were no matches
        test/system/comment_test.rb:229:in `block in <class:CommentTest>'
[Screenshot]: tmp/screenshots/failures_test_comment_editing.png
ERROR["test_comment_editing", #<Minitest::Reporters::Suite:0x00007f37ca82f538 @name="CommentTest">, 258.861415905]
 test_comment_editing#CommentTest (258.86s)
Minitest::UnexpectedError:         Selenium::WebDriver::Error::JavascriptError: javascript error: Cannot read property 'id' of undefined
          (Session info: headless chrome=86.0.4240.75)
            test/system/comment_test.rb:251:in `block in <class:CommentTest>'
  96/96: [=================================] 100% Time: 00:04:34, Time: 00:04:34
Finished in 274.94103s
96 tests, 85 assertions, 1 failures, 1 errors, 0 skips

@Sagarpreet
Copy link
Contributor Author

@cesswairimu @jywarren where can I see the screenshot results? Thanks!

@Sagarpreet Sagarpreet closed this Oct 13, 2020
@Sagarpreet Sagarpreet reopened this Oct 13, 2020
@gitpod-io
Copy link

gitpod-io bot commented Oct 13, 2020

@jywarren jywarren added this to the Comment editor milestone Oct 13, 2020
@jywarren
Copy link
Member

Oof, unfortunately the screenshots are not linked to anymore as our Dangerbot script broke. They used to be stored in Google Cloud here:

plots2/Dangerfile

Lines 67 to 81 in 3664a28

# Store screenshots in Google Cloud
require "google/cloud/storage"
storage = Google::Cloud::Storage.anonymous # don't rely on a key credential
bucket = storage.bucket "plots2-screenshots"
Encoding.default_external = 'UTF-8'
images = []
Dir.glob('tmp/screenshots/*') do |item|
file = bucket.create_file item, github.pr_json["number"].to_s + "-" + item.split('/').last
images << "<h3>#{file.name}</h3><p><img src='#{file.public_url}' /></p>"
end
screenshots = "<details><summary>Screenshots :camera_flash: (click to expand)</summary>" + images.join + "</details>"
screenshots += "<p><a href='https://github.com/publiclab/plots2/issues/5316'>Learn about automated screenshots</a></p>"
markdown(screenshots)

However, this script is not really running any more 😭

You can, however, open GitPod and check there. I do wish at some point to remake that script, maybe using the JS version of Dangerbot? https://danger.systems/

However, bots via Github Actions have become far more powerful recently so maybe it's something we could just build into a Probot bot or something... https://probot.github.io/

Feel free to spin out this comment into its own issue!

@sagarpreet-chadha
Copy link
Contributor

Okay cool Jeff 👍
I will need to debug in that case why the tests are failing.

@Sagarpreet
Copy link
Contributor Author

Okay now deletion system test is passing but editing system test is still giving error:

ERROR["test_comment_editing", #<Minitest::Reporters::Suite:0x00007fc7a1377178 @name="CommentTest">, 131.42664090699998]
 test_comment_editing#CommentTest (131.43s)
Minitest::UnexpectedError:         Selenium::WebDriver::Error::JavascriptError: javascript error: Cannot read property 'id' of undefined
          (Session info: headless chrome=86.0.4240.75)
            test/system/comment_test.rb:251:in `block in <class:CommentTest>'

@codeclimate
Copy link

codeclimate bot commented Oct 19, 2020

Code Climate has analyzed commit 3d3ce2b and detected 0 issues on this pull request.

View more on Code Climate.

@Sagarpreet
Copy link
Contributor Author

Sagarpreet commented Oct 19, 2020

Yayyy tests passed 🎉
@jywarren kindly test it on gitpod, otherwise it is ready to be merged 😄
The system tests can be sometimes difficult to debug without screenshots, we should work on fixing that script 👍

@Sagarpreet
Copy link
Contributor Author

Moved to #8636

@Sagarpreet Sagarpreet closed this Oct 20, 2020
@Sagarpreet Sagarpreet deleted the 4 branch October 20, 2020 08:16
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.

Ensure formatting toolbars on comments appear in all variations
3 participants