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

Bump publiclab-editor from 3.0.1 to 3.0.2 #9323

Merged

Conversation

dependabot-preview[bot]
Copy link
Contributor

Bumps publiclab-editor from 3.0.1 to 3.0.2.

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in the .dependabot/config.yml file in this repo:

  • Update frequency
  • Automerge options (never/patch/minor, and dev/runtime dependencies)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

@gitpod-io
Copy link

gitpod-io bot commented Mar 16, 2021

@jywarren
Copy link
Member

Fixes publiclab/PublicLab.Editor#698

@codecov
Copy link

codecov bot commented Mar 16, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@0908bfd). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 1892301 differs from pull request most recent head 623400a. Consider uploading reports for the commit 623400a to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main    #9323   +/-   ##
=======================================
  Coverage        ?   82.26%           
=======================================
  Files           ?       98           
  Lines           ?     5870           
  Branches        ?        0           
=======================================
  Hits            ?     4829           
  Misses          ?     1041           
  Partials        ?        0           

@jywarren
Copy link
Member

Odd, the second doesn't seem editor related...

Not sure why the first one is failing either...

ERROR RichTextEditorTest#test_main_textarea_image_drag_and_drop_upload (83.86s)
Minitest::UnexpectedError:         ActiveRecord::RecordNotFound: Couldn't find Node with 'nid'=0
            app/controllers/images_controller.rb:36:in `create'

==[Screenshot]: tmp/screenshots/test_front_page_with_navbar_search_autocomplete.png
[Screenshot]: tmp/screenshots/test_searching_an_item_from_the_homepage.png
=[Screenshot]: tmp/screenshots/test_viewing_the_settings_page.png
=[Screenshot]: tmp/screenshots/failures_test_User_can_flag_a_node_from_dashboard.png
ERROR DashboardTest#test_User_can_flag_a_node_from_dashboard (220.49s)
Minitest::UnexpectedError:         Capybara::ElementNotFound: Unable to find visible css "div.alert" with text "Node flagged."
            test/system/dashboard_test.rb:35:in `block in <class:DashboardTest>'

@jywarren
Copy link
Member

Oof now this error:


Progress: | FAIL TagSelectionTest#test_graph (0.40s)
        Expected: 18
          Actual: 23
        test/unit/tag_selection_test.rb:14:in `block in <class:TagSelectionTest>

@cesswairimu
Copy link
Collaborator

I've seen this error before I think...I will try to reopen

@dependabot-preview
Copy link
Contributor Author

OK, I won't notify you again about this release, but will get in touch when a new version is available.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@cesswairimu cesswairimu reopened this Mar 17, 2021
@gitpod-io
Copy link

gitpod-io bot commented Mar 17, 2021

@jywarren
Copy link
Member

So weird this... but ok this is the only one i saw last time i ran it:

ERROR RichTextEditorTest#test_main_textarea_image_drag_and_drop_upload (195.82s)
Minitest::UnexpectedError:         ActiveRecord::RecordNotFound: Couldn't find Node with 'nid'=0
            app/controllers/images_controller.rb:36:in `create'

Really almost nothing else has changed about the editor though... since 3.0.0 - https://github.com/publiclab/PublicLab.Editor/commits

however it's odd, i don't actually see a commit for 3.0.1, i wonder if i published that from a branch mistakenly...

@jywarren
Copy link
Member

That system test just won't pass. I think we should try running a diff on the library between v3.0.0 and v3.0.2 to see what changed, maybe it needs an additional patch.

@jywarren
Copy link
Member

jywarren commented Mar 18, 2021

ERROR RichTextEditorTest#test_main_textarea_image_drag_and_drop_upload (657.58s)
Minitest::UnexpectedError:         ActiveRecord::RecordNotFound: Couldn't find Node with 'nid'=0
            app/controllers/images_controller.rb:36:in `create'

def create
if params[:i]
@image = Image.new(remote_url: params[:i],
uid: current_user.uid)
flash[:error] = 'The image could not be saved.' unless @image.save!
elsif params[:data]
filetype = params[:data].split(';').first.split('/').last
@image = Image.new(uid: current_user.uid,
photo: params[:data],
photo_file_name: 'dataurl.' + filetype)
@image.save!
else
@image = Image.new(uid: current_user.uid,
photo: params[:image][:photo],
title: params[:image][:title],
notes: params[:image][:notes])
end
@image.nid = Node.find(params[:nid].to_i).nid unless params[:nid].nil? || params[:nid] == 'undefined'
if @image.save!

In fact based on line 36 maybe we can modify the Rails to detect 0 as being same as null?

@@ -33,7 +33,7 @@ def create
title: params[:image][:title],
notes: params[:image][:notes])
end
@image.nid = Node.find(params[:nid].to_i).nid unless params[:nid].nil? || params[:nid] == 'undefined'
@image.nid = Node.find(params[:nid].to_i).nid unless params[:nid].nil? || params[:nid] == 'undefined' || params[:nid].to_i == 0
Copy link

Choose a reason for hiding this comment

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

Use params[:nid].to_i.zero? instead of params[:nid].to_i == 0.

@codeclimate
Copy link

codeclimate bot commented Mar 18, 2021

Code Climate has analyzed commit 623400a and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Style 1

View more on Code Climate.

@RuthNjeri
Copy link
Contributor

I did a rebuild of this issue and the tests are now passing, this should be okay? @jywarren or is the nid = 0 a concern?

@dependabot-preview dependabot-preview bot merged commit 07a243d into main Mar 19, 2021
@dependabot-preview dependabot-preview bot deleted the dependabot/npm_and_yarn/publiclab-editor-3.0.2 branch March 19, 2021 17:21
@jywarren
Copy link
Member

jywarren commented Mar 19, 2021 via email

@jywarren jywarren mentioned this pull request Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file JavaScript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants