Skip to content

Fix undefined error in project_templates_spec.rb

Coung Ngo requested to merge 342689-fix-undefined-error into master

Background

  1. We converted the New Project page dropdown from Haml to Vue in !68778 (merged) behind the feature flag paginatable_namespace_drop_down_for_project_creation
  2. We updated the QA tests to pass with this feature flag on in !71085 (merged)
  3. We turned on the feature flag on staging, but one QA test failed due to an undefined error

What does this MR do and why?

This MR fixes the QA failure identified in #342689 (closed). It adds a null check to fix an error when a variable is undefined, which happens when creating a new project using a template from a group (see screencast below).

Screenshots or screen recordings

Screen_Recording_2021-10-11_at_1.20.49_pm

How to set up and validate locally

  1. In rails console enable the feature flag
    Feature.enable(:paginatable_namespace_drop_down_for_project_creation)
  2. Go to a group that contains subgroups then create New Project from there
  3. Click Create from template
  4. Click the Group tab
  5. Click Use template for any group and see that the form is shown with no console errors

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 #342689 (closed)

Edited by Coung Ngo

Merge request reports