Skip to content

Replace jQuery in ee/custom_project_templates.js file

What does this MR do and why?

This MR updates the custom project templates js file to:

  • Remove the jquery dependency
  • Update all selectors to use querySelector/querySelectorAll
  • Updates jquery methods to their js equivalents

This file is referenced from multiple places, ideally we could restructure this file into shared utils and move the binding to the places they're needed, but i've left that out of the scope of this.

Screenshots or screen recordings

No visual changes

How to set up and validate locally

There don't seem to be any related frontend tests, but with some trial and error I found a few related rspec tests:

  • ee/spec/features/projects/new_project_spec.rb
  • ee/spec/features/projects/custom_projects_template_spec.rb
  • ee/spec/features/projects/new_project_from_template_spec.rb
  • ee/spec/features/projects/user_applies_custom_file_template_spec.rb
  • spec/features/projects/new_project_spec.rb
  • spec/features/projects/new_project_from_template_spec.rb
  • spec/features/projects/user_creates_project_spec.rb
  • spec/features/projects/import_export/import_file_spec.rb

Execute the tests locally with:

$ bin/rspec ./ee/spec/features/projects/new_project_spec.rb ./ee/spec/features/projects/custom_projects_template_spec.rb ./ee/spec/features/projects/new_project_from_template_spec.rb ./ee/spec/features/projects/user_applies_custom_file_template_spec.rb ./spec/features/projects/new_project_spec.rb ./spec/features/projects/new_project_from_template_spec.rb ./spec/features/projects/user_creates_project_spec.rb ./spec/features/projects/import_export/import_file_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #362998 (closed)

Edited by Ezekiel Kigbo

Merge request reports

Loading