Skip to content

Fix rspec prevent default errors

Clement Ho requested to merge fix-rspec-prevent-default into multiple_assignees_review

What does this MR do?

Fixes all the rspec errors that are failing due to TypeError: undefined is not an object (evaluating 'n.preventDefault')

As seen in https://gitlab.com/gitlab-org/gitlab-ee/builds/15220510

1) Auto deploy when a deployment service is active creates a merge request using "auto-deploy" branch
     Failure/Error: click_on 'OpenShift'

     Capybara::Poltergeist::JavascriptError:
       One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).

       TypeError: undefined is not an object (evaluating 'n.preventDefault')
       TypeError: undefined is not an object (evaluating 'n.preventDefault')
           at http://127.0.0.1:44215/assets/webpack/main.03450ce4b062cfa62d55.bundle.js:62 in value

Note: This MR doesn't fix all the tests, it will have to be merged with failing builds. Just need to make sure that all the preventDefault rspec errors are not showing up anymore before merging to the review branch.

Are there points in the code the reviewer needs to double check?

Shouldn't be

Why was this MR needed?

Fixes failing tests

Does this MR meet the acceptance criteria?

Yes

What are the relevant issue numbers?

#1904 (closed)

Merge request reports