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

Fix HTML Escape String Comparison in Test supervisor_datatable_spec #… #2825

Merged
merged 1 commit into from
Oct 23, 2021

Conversation

roseliux
Copy link
Contributor

…2810

  • Add a supervisor with an apostrophe in their name to the list of inactive supervisors before running the test

What github issue is this PR for, if any?

Resolves #2810

What changed, and why?

Add a supervisor with an apostrophe in their name to the list of inactive supervisors before running the test.

Comment on lines 45 to 46
expect(subject[:data].map { |d| Nokogiri::HTML(d[:display_name]).text }).to include(active_supervisor.display_name)
expect(subject[:data].map { |d| Nokogiri::HTML(d[:display_name]).text }).to include(inactive_supervisor.display_name)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nokogiri::HTML is an alias for Nokogiri::HTML4 I think you want HTML5

Copy link
Contributor Author

@roseliux roseliux Oct 22, 2021

Choose a reason for hiding this comment

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

Nokogiri.HTML5 was introduce on version v1.12.0 I believe and casa use "1.11.7"
https://nokogiri.org/rdoc/Nokogiri/HTML5.html
should i update as part of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

update seems like is not supported by other dependencies

➜ bundle update nokogiri
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies......................
Bundler could not find compatible versions for gem "azure-storage-blob":
  In snapshot (Gemfile.lock):
    azure-storage-blob (= 2.0.1)

  In Gemfile:
    azure-storage-blob

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

Bundler could not find compatible versions for gem "nokogiri":
  In Gemfile:
    nokogiri (>= 1.12.0)

    azure-storage-blob was resolved to 2.0.1, which depends on
      nokogiri (~> 1.11.0.rc2)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe just use this instead
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done @FireLemons please review again.

@roseliux roseliux requested a review from FireLemons October 22, 2021 01:17
@roseliux roseliux force-pushed the issue-2810-html-scape-string branch from 9c68134 to a2d0022 Compare October 22, 2021 16:25
@FireLemons
Copy link
Collaborator

could you run bundle exec standardrb --fix and commit again?

…ubyforgood#2810

- Add a supervisor with an apostrophe in their name to the list of inactive supervisors before running the test
- Use CGI::escapeHTML
@roseliux roseliux force-pushed the issue-2810-html-scape-string branch from a2d0022 to 919f8db Compare October 22, 2021 20:54
@FireLemons
Copy link
Collaborator

🏅

@FireLemons FireLemons merged commit c4355b4 into rubyforgood:main Oct 23, 2021
@roseliux roseliux deleted the issue-2810-html-scape-string branch January 14, 2022 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix HTML Escape String Comparison in Test supervisor_datatable_spec
2 participants