Skip to content

Fix spec/features/issues/form_spec.rb when using Vite

What does this MR do and why?

This MR fixes the following specs when using Vite:

  1. spec/features/issues/form_spec.rb
  2. ee/spec/features/issues/form_spec.rb

A bug happens when the page has just been loaded and the dropdowns have initialized already. Because Vite compiles code on-demand the rest of the page might not load immediately. That leaves us in a state when a basic dropdown logic is loaded but the business logic is not (i.e. assigning users, searching). During that period you'd be able to open the dropdown but not be able to search users or assign them. Once the business logic is loaded it's not immediately activated. You'd need to reopen dropdown for that. To fix this we will now wait for the description textarea to be initialized first, since it's the heaviest component on the page.

Example of an uninitialized Assignees dropdown:

Screen_Recording_2024-03-04_at_23.46.32

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Run the following feature specs:

  1. spec/features/issues/form_spec.rb
  2. ee/spec/features/issues/form_spec.rb

No issues should occur.

Edited by Stanislav Lashmanov

Merge request reports