diff --git a/spec/javascripts/integrations/integration_settings_form_spec.js b/spec/javascripts/integrations/integration_settings_form_spec.js index 77ade71cc55..57846555261 100644 --- a/spec/javascripts/integrations/integration_settings_form_spec.js +++ b/spec/javascripts/integrations/integration_settings_form_spec.js @@ -168,7 +168,7 @@ describe('IntegrationSettingsForm', () => { expect($flashAction).toBeDefined(); spyOn(integrationSettingsForm.$form, 'submit'); - $flashAction.click; + $flashAction.click(); expect(integrationSettingsForm.$form.submit).toHaveBeenCalled(); }); diff --git a/spec/javascripts/issue_spec.js b/spec/javascripts/issue_spec.js index 2c22b4db077..e982f23c87e 100644 --- a/spec/javascripts/issue_spec.js +++ b/spec/javascripts/issue_spec.js @@ -128,7 +128,7 @@ describe('Issue', function() { }); it(`${action}s the issue`, function() { - this.$triggeredButton.click; + this.$triggeredButton.click(); this.issueStateDeferred.resolve({ id: 34 }); @@ -143,7 +143,7 @@ describe('Issue', function() { }); it(`fails to ${action} the issue if saved:false`, function() { - this.$triggeredButton.click; + this.$triggeredButton.click(); this.issueStateDeferred.resolve({ saved: false }); @@ -159,7 +159,7 @@ describe('Issue', function() { }); it(`fails to ${action} the issue if HTTP error occurs`, function() { - this.$triggeredButton.click; + this.$triggeredButton.click(); this.issueStateDeferred.reject(); this.canCreateBranchDeferred.resolve({ can_create_branch: isIssueInitiallyOpen @@ -173,7 +173,7 @@ describe('Issue', function() { }); it('disables the new branch button if Ajax call fails', function() { - this.$triggeredButton.click; + this.$triggeredButton.click(); this.issueStateDeferred.reject(); this.canCreateBranchDeferred.reject(); @@ -184,7 +184,7 @@ describe('Issue', function() { Issue.$btnNewBranch = $(); this.canCreateBranchDeferred = null; - this.$triggeredButton.click; + this.$triggeredButton.click(); this.issueStateDeferred.reject(); }); }); diff --git a/spec/javascripts/merge_request_notes_spec.js b/spec/javascripts/merge_request_notes_spec.js index f0ec22792d3..7ba754e672a 100644 --- a/spec/javascripts/merge_request_notes_spec.js +++ b/spec/javascripts/merge_request_notes_spec.js @@ -84,7 +84,7 @@ describe('Merge request notes', () => { spyOnEvent('.note:last .js-note-edit', 'click'); - $('.js-discussion-reply-button').click; + $('.js-discussion-reply-button').click(); setTimeout(() => { $('.js-note-text').trigger(upArrowEvent); diff --git a/spec/javascripts/pipeline_schedules/setup_pipeline_variable_list_spec.js b/spec/javascripts/pipeline_schedules/setup_pipeline_variable_list_spec.js index 162a393f6d4..e90c20e20d2 100644 --- a/spec/javascripts/pipeline_schedules/setup_pipeline_variable_list_spec.js +++ b/spec/javascripts/pipeline_schedules/setup_pipeline_variable_list_spec.js @@ -92,7 +92,7 @@ describe('Pipeline Variable List', () => { }); it('should remove the row when clicking the remove button', () => { - $markup.find('.js-row-remove-button').click; + $markup.find('.js-row-remove-button').click(); expect($markup.find('.js-row').length).toBe(0); }); diff --git a/spec/javascripts/u2f/authenticate_spec.js b/spec/javascripts/u2f/authenticate_spec.js index 037e0aefdf4..e924107b29b 100644 --- a/spec/javascripts/u2f/authenticate_spec.js +++ b/spec/javascripts/u2f/authenticate_spec.js @@ -44,7 +44,7 @@ import './mock_u2f_device'; it("displays an error message", function() { var errorMessage, setupButton; setupButton = this.container.find("#js-login-u2f-device"); - setupButton.click; + setupButton.click(); this.u2fDevice.respondToAuthenticateRequest({ errorCode: "error!" }); @@ -54,14 +54,14 @@ import './mock_u2f_device'; return it("allows retrying authentication after an error", function() { var retryButton, setupButton; setupButton = this.container.find("#js-login-u2f-device"); - setupButton.click; + setupButton.click(); this.u2fDevice.respondToAuthenticateRequest({ errorCode: "error!" }); retryButton = this.container.find("#js-u2f-try-again"); - retryButton.click; + retryButton.click(); setupButton = this.container.find("#js-login-u2f-device"); - setupButton.click; + setupButton.click(); this.u2fDevice.respondToAuthenticateRequest({ deviceData: "this is data from the device" }); diff --git a/spec/javascripts/u2f/register_spec.js b/spec/javascripts/u2f/register_spec.js index 2c80ac9aa69..f5e32c1b358 100644 --- a/spec/javascripts/u2f/register_spec.js +++ b/spec/javascripts/u2f/register_spec.js @@ -23,7 +23,7 @@ import './mock_u2f_device'; var deviceResponse, inProgressMessage, registeredMessage, setupButton; setupButton = this.container.find("#js-setup-u2f-device"); expect(setupButton.text()).toBe('Setup new U2F device'); - setupButton.click; + setupButton.click(); inProgressMessage = this.container.children("p"); expect(inProgressMessage.text()).toContain("Trying to communicate with your device"); this.u2fDevice.respondToRegisterRequest({ @@ -38,7 +38,7 @@ import './mock_u2f_device'; it("doesn't allow the same device to be registered twice (for the same user", function() { var errorMessage, setupButton; setupButton = this.container.find("#js-setup-u2f-device"); - setupButton.click; + setupButton.click(); this.u2fDevice.respondToRegisterRequest({ errorCode: 4 }); @@ -48,7 +48,7 @@ import './mock_u2f_device'; it("displays an error message for other errors", function() { var errorMessage, setupButton; setupButton = this.container.find("#js-setup-u2f-device"); - setupButton.click; + setupButton.click(); this.u2fDevice.respondToRegisterRequest({ errorCode: "error!" }); @@ -58,14 +58,14 @@ import './mock_u2f_device'; return it("allows retrying registration after an error", function() { var registeredMessage, retryButton, setupButton; setupButton = this.container.find("#js-setup-u2f-device"); - setupButton.click; + setupButton.click(); this.u2fDevice.respondToRegisterRequest({ errorCode: "error!" }); retryButton = this.container.find("#U2FTryAgain"); - retryButton.click; + retryButton.click(); setupButton = this.container.find("#js-setup-u2f-device"); - setupButton.click; + setupButton.click(); this.u2fDevice.respondToRegisterRequest({ deviceData: "this is data from the device" });