Commit Graph

94 Commits

Author SHA1 Message Date
Phil Hughes b543a96e1c Added text_utility to JS tests 2016-06-20 08:54:57 +01:00
Jacob Schatz 7b18e8c744 Merge branch '13525-sane-defaults-for-merge-request-js-class-constructor' into 'master'
Avoid a TypeError when initializing MergeRequest JS class with no arg

## What does this MR do?

Avoid a TypeError when initializing MergeRequest JS class with no arg.

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

No.

## Why was this MR needed?

Without this sane default you would get the following error when you
tried to instantiate a new MergeRequest object with no argument (i.e.
`new MergeRequest();`):
    
    TypeError: undefined is not an object (evaluating 'this.opts.action')

## What are the relevant issue numbers?

Fixes #13525.

## Does this MR meet the acceptance criteria?

- [x] No CHANGELOG since it's a trivial internal change
- [x] Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

See merge request !4667
2016-06-16 18:32:23 +00:00
Fatih Acet fe125f8dc9 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into category-search-dropdown
# Conflicts:
#	app/assets/javascripts/lib/common_utils.js.coffee
2016-06-16 02:04:09 +03:00
Fatih Acet 415b032ba1 Prevent default disabled buttons and links. 2016-06-15 11:37:45 -04:00
Rémy Coutable 8aed815b6e
Avoid a TypeError when initializing MergeRequest JS class with no arg
Without this sane default you would get the following error when you
tried to instantiate a new MergeRequest object with no argument (i.e.
`new MergeRequest();`):

TypeError: undefined is not an object (evaluating 'this.opts.action')

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-06-15 10:33:36 +02:00
Timothy Andrew d8a531687c Fix teaspoon spec.
- We added a `current_user.two_factor_via_otp?` check to the view. When
  rendering the view via the teaspoon fixture, `current_user` is `nil`.
2016-06-15 08:16:57 +05:30
Fatih Acet 7bad6814b1 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into category-search-dropdown 2016-06-10 02:41:45 +03:00
Fatih Acet e864bdf25b Fix specs and add new tests. 2016-06-10 01:05:09 +03:00
Fatih Acet 92af60c244 Move award_menu_url variable into gon object. 2016-06-09 03:37:40 +03:00
Fatih Acet 50b3b8ce80 Added tests for categorised search autocomplete. 2016-06-07 17:54:29 +03:00
Douwe Maan 4d4a9b7c8a Merge branch 'notes-are-awardables' into 'master'
Notes are awardables

## What does this MR do?

Makes sure we can :thunder_cloud_rain: comments/notes.

## What are the relevant issue numbers?
Follows up upon !2901, depends on !3785

Closes #3655 

## Screenshots (if relevant)
TODO



See merge request !4291
2016-06-06 16:48:35 +00:00
Jacob Schatz 316630ad2c Merge branch 'jquery2' into 'master'
Upgraded jQuery to version 2

## What does this MR do?

Upgrades jQuery to 2.2.1. 

Had to include the task_list JS file directly as it includes jQuery 1 directly https://github.com/github-archive/task_list/blob/master/app/assets/javascripts/task_list.coffee#L8 so when we change jQuery to `jquery2` it was including both jQuery 1 & 2.

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

For any JS errors

## What are the relevant issue numbers?

Closes #12440

See merge request !4384
2016-06-06 14:25:23 +00:00
Fatih Acet 8dc1fa0d8d Updated MR notes. 2016-06-06 16:02:11 +02:00
Fatih Acet c1e2b02e34 Added tests for award emoji feature. 2016-06-06 11:10:10 +02:00
Timothy Andrew 86b07caa59 Implement authentication (login) using a U2F device.
- Move the `authenticate_with_two_factor` method from
  `ApplicationController` to the `AuthenticatesWithTwoFactor` module,
  where it should be.
2016-06-06 12:50:31 +05:30
Timothy Andrew 128549f10b Implement U2F registration.
- Move the `TwoFactorAuthsController`'s `new` action to `show`, since
  the page is not used to create a single "two factor auth" anymore. We
  can have a single 2FA authenticator app, along with any number of U2F
  devices, in any combination, so the page will be accessed after the
  first "two factor auth" is created.
- Add the `u2f` javascript library, which provides an API to the
  browser's U2F implementation.
- Add tests for the JS components
2016-06-06 12:50:31 +05:30
Phil Hughes 515a5aeb33 Fixed JS errors
CHANGELOG item
2016-06-05 16:15:51 -04:00
Connor Shea 586d1a9b24
Move JS graph specs to match assets tree. 2016-06-01 19:48:01 -06:00
Connor Shea 81f4605448
Fix teaspoon 2016-06-01 19:42:49 -06:00
Fatih Acet aa2a7dad59 Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into #15643
# Conflicts:
#	app/assets/stylesheets/pages/issuable.scss
2016-05-23 23:08:00 +03:00
Alfredo Sumaran ab96ca2bf1 Dropdown implementation 2016-05-20 15:58:36 -05:00
Fatih Acet b99471ca5d Added specs for right sidebar. 2016-05-12 00:38:01 +03:00
Benedikt Huss ed2a7a1ec6 Fix build notification on merge request page change even if the build status didn't change 2016-05-08 21:41:09 +02:00
Benedikt Huss 0e9c2e721b Feedback from stanhu 2016-05-05 00:18:36 +02:00
Benedikt Huss 655b2640ae Merge request widget displays TeamCity build state and code coverage correctly again 2016-05-05 00:07:56 +02:00
Phil Hughes 6e93bd56f0 Placeholder on milestone form
Updated JS spec to include gl_form
2016-04-14 10:28:05 +01:00
Phil Hughes 6416f8eab1 Updated based on Ruby feedback 2016-04-12 13:10:43 -04:00
Phil Hughes 14b124faca Tests update 2016-04-12 13:10:43 -04:00
Jacob Schatz 2446f853bd Merge branch 'close-issue-bug' into 'master'
Fix data check in update issue response



See merge request !3548
2016-04-05 20:48:00 +00:00
Annabel Dunstone 1eeec7c63e Update issue_spec test 2016-04-05 13:13:49 -07:00
Phil Hughes 29f414aa5a Tests update 2016-04-04 10:48:49 +01:00
Robert Speicher 76ed2afcfc Change `js-quick-submit` behavior to expect the class on the form
Now it will work on any field inside that form, and it's easier to scope
new behavior, which is what we're adding next!
2016-03-02 15:11:15 -05:00
Phil Hughes b724f0871a Project dropdown test span -> i 2016-02-05 20:08:28 +00:00
Phil Hughes 0a094cb1df Changed the project switcher dropdown toggle
Moved the positioning of the dropdown to be more aligned with the title

Closes #13219 and #13214
2016-02-05 18:56:37 +00:00
Jacob Schatz c4c919e59d Merge branch 'title-projects-dropdown' into 'master'
Added dropdown to list all projects on project header

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/4212

When clicking the current project name, it shows a dropdown menu with a list of all projects for that group or user.

When closed:

![Screen_Shot_2016-01-14_at_19.17.44](/uploads/a7258ba388dba238fc2f0468711fc729/Screen_Shot_2016-01-14_at_19.17.44.png)

When open:

![Screen_Shot_2016-01-14_at_19.17.51](/uploads/716533d9eb44b123c5fdff36a4740489/Screen_Shot_2016-01-14_at_19.17.51.png)


cc. @jschatz1

See merge request !2438
2016-02-02 22:15:40 +00:00
Robert Speicher 933834c4a6 Allow manual resize of js-autosize textareas
First, the autosize library was being too controlling and removed the
`resize` property from any elements to which it was attached, removing
the drag handle.

Second, we detect when the user manually resizes an autosize textarea,
and then remove the autosize behavior from it and increase its
max-height.

This should allow for the best of both worlds.

Closes #12832
2016-02-01 17:00:03 -05:00
Phil Hughes 56b0c46bf6 added tests 2016-01-30 16:01:50 +00:00
Jacob Schatz 63363e47f4 reverting more MR ajax files, will appear in different commit 2016-01-12 14:55:54 -05:00
Jacob Schatz f2edb26a1e fixes conflicts 2016-01-11 18:06:15 -05:00
Robert Speicher 89ca4f04f6 Refactor ZenMode
- No longer depends on the "hidden checkbox".
- No longer depends on manually storing/restoring the scroll position.
  Instead, we take advantage of jquery.scrollTo.
- Event-based.
- Simplifies the state-based styling.
2016-01-08 23:36:09 -05:00
Jacob Schatz 8f6ca70055 fixes ajax issue with issue spec 2016-01-07 12:27:01 -05:00
Jacob Schatz f71642017e adds tests (and passes them) for ajax open and close merge requests. 2016-01-06 07:33:50 -05:00
Robert Speicher 98f77d2edc Merge branch 'close-open-ajax-issue' into 'master'
open and close issue via ajax request. With tests

Close and Reopen issues with ajax request.

See merge request !2164
2015-12-25 21:00:16 +00:00
Douwe Maan 93b5ea6f0e Fix NewBranchForm spec 2015-12-24 15:09:29 +01:00
Jacob Schatz 00e967a07f removes unused `alert` from issue spec. Requires flash in the *implementation* instead of the spec. 2015-12-23 20:57:16 -05:00
Jacob Schatz e11ee5ff01 adds test for issue close/reopen failure 2015-12-23 17:41:05 -05:00
Jacob Schatz 7e43fa6709 fixes tests to work with jasmine/jquery 2015-12-23 16:56:36 -05:00
Douglas Barbosa Alexandre 3657eb76c2 Add helper methods to JS validation spec for invalid branch names 2015-12-22 15:32:57 -02:00
Douglas Barbosa Alexandre 23b436dc93 Fix minor stylistic complaints 2015-12-21 22:21:10 -02:00
Jacob Schatz 453479143d adds alerts for when http request errors out in some way. 2015-12-21 17:03:28 -05:00