Commit Graph

294 Commits

Author SHA1 Message Date
Filipa Lacerda 11040589c8 Adds tests for the MiniPipelineGraph class 2016-12-20 11:10:20 +00:00
Mitchell Hentges 66ff2dede1 Make CI badge hitboxes better match container 2016-12-19 10:13:25 -08:00
Kamil Trzciński 67f41ac0e1 Merge branch 'abuse_report-fixture' into 'master'
Replace static fixture for abuse_reports_spec

## What does this MR do?

Replace static HAML fixture for `abuse_reports_spec` by dynamically created one.

## What are the relevant issue numbers?

#24753

See merge request !7644
2016-12-16 12:29:14 +00:00
Fatih Acet b2fdad0a64 Merge branch 'add-object-assign-polyfill' into 'master'
Add Object.assign polyfill

Because PhantomJS

See merge request !8090
2016-12-15 16:53:08 +00:00
winniehell b7f297ed8a Replace static fixture for abuse_reports_spec (!7644) 2016-12-15 12:12:33 +01:00
Alfredo Sumaran 4e68b88193 Merge branch 'clean-no-undef' into 'master'
Explicitly declare all javascript globals and all eslint rule violations

This merge request takes every single external global variable referenced within a javascript file and explicitly marks it with a `/* global Foo */` comment block at the top of the script.

This also expands all blanket instances of `/* eslint-disable */` with an explicit list of disabled rules.  This is useful because if we need to search for violations of a particular rule we can simply grep the codebase for something like `no-unused-vars` or `semi` and find all of the places where this rule has yet to be fixed.

Lastly, it also removes and resolves any existing `no-undef` eslint violations.  This is useful for catching mistakes like forgetting to declare a variable with `var`/`let`/`const` which can cause hard to find bugs.

## What does this MR do?

1. Looks for generic uses of `/* eslint-disable */` and refactors them into individual rule exceptions.
2. Looks for all occurrences of `/* eslint-disable ... no-undef */` and resolves them by either fixing bugs or declaring globals with `/* global Foo */`.

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

This touches a lot of files, most changes touch nothing other than comment blocks or whitespace.  The exceptions are the following 14 files which required some small bug fixes after removing `no-undef`:

- api.js
- breakpoints.js
- build.js
- commits.js
- diff_notes/components/jump_to_discussion.js.es6
- gfm_auto_complete.js.es6
- gl_dropdown.js
- groups_select.js
- importer_status.js
- namespace_select.js
- notes.js
- preview_markdown.js
- projects_list.js
- single_file_diff.js

## Why was this MR needed?

Removal of ~"technical debt" and some necessary changes to help !7288 

## Screenshots (if relevant)

N/A

## Does this MR meet the acceptance criteria?

- [ ] ~~[Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added~~
- [ ] ~~[Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)~~
- [ ] ~~API support added~~
- Tests
  - [ ] ~~Added for this feature/bug~~
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

N/A

See merge request !8043
2016-12-15 00:52:46 +00:00
Alfredo Sumaran f796840fd3 Add Object.assign polyfill 2016-12-14 11:45:45 -05:00
Alfredo Sumaran 1fca9658ce Merge branch '24927-custom-event-polyfill-test' into 'master'
Adds tests for Custom Event polyfill

## What does this MR do?
Adds tests for CustomEvent polyfill.

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Closes #24927

See merge request !7996
2016-12-14 15:35:05 +00:00
Mike Greiling 8e0e902b13 resolve all instances of no-undef eslint rule violations 2016-12-14 02:11:13 -06:00
Mike Greiling 23f5865e18 expand remaining non-explicit eslint-disable blocks and factor out globals when no-undef encountered 2016-12-13 21:07:31 -06:00
Filipa Lacerda 7caab6c2ae Fix broken test in chrome 2016-12-13 11:04:43 +00:00
Alfredo Sumaran d8d07976ec Merge branch 'awards_handler-fixture' into 'master'
Replace static fixture for awards_handler_spec

## What does this MR do?

Use the already existing dynamic fixture `issues/open-issue.html` (!6059) in `awards_handler_spec.js` instead of the static fixture `awards_handler.html.haml`.

## What are the relevant issue numbers?

#24753

See merge request !7661
2016-12-13 00:58:16 +00:00
Alfredo Sumaran e9759570e8 Merge branch 'fix-eslint-warnings' into 'master'
Fixed lint warning and propose fail or warning

## What does this MR do?

1. Fixes a linter warning that is currently on `master`.

2. Proposes the use of `--max-warnings 0` with `eslint` to make sure the CI build fails on any warnings.

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

## Why was this MR needed?

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !8025
2016-12-13 00:02:58 +00:00
winniehell f21e13ae19 Replace static fixture for awards_handler_spec (!7661) 2016-12-12 23:17:25 +01:00
Fatih Acet 407adb9e95 Merge branch '25483-broken-tabs' into 'master'
Fix TypeError: Cannot read property 'initTabs'

## What does this MR do?
Adds a default value to the `options` argument in order to prevent errors when `Pipelines` is initialised without arguments.
Adds tests to guarantee this does not happen again.

Adds back removed pipeline class to make the pipeline graph visible, `js-pipeline-graph`

## Why was this MR needed?
In the places where `Pipelines` is initialised without arguments it throws an error: `TypeError: Cannot read property 'initTabs'`


## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Closes #25483 
Closes #25493 

See merge request !8009
2016-12-12 17:44:10 +00:00
Luke "Jared" Bennett 62f8717c03 Added hiddenInterval and immediateExecution settings, fixed visibilitychange listening, implemented with mr widget
Updated tests

Added tests

Review changes
2016-12-12 15:56:11 +03:00
Filipa Lacerda 52e0c4ba91 Fix tests
Fix broken tests
2016-12-12 12:44:46 +00:00
Filipa Lacerda 401a2ec0b1 Adds tests to prevent future errors.
Fix undefined variable in es5
2016-12-12 12:44:45 +00:00
Luke "Jared" Bennett bc31040ea9
Fixed lint warning and propose fail or warning 2016-12-10 12:04:54 +00:00
Alfredo Sumaran 3a66c2398a Merge branch 'issue_24020' into 'master'
fix display hook error message

## What does this MR do?

Fix hook error message display.  

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

Probably Hook will return the plain multi line text.  It is better `pre` tag than `h4`.  
I thought of another good looking display, but I did not come up with it. 😓 

## Why was this MR needed?

When the hook returns an STDERR, "Merge in progress" button spinning forever. Due to javascript's error.  

## Screenshots (if relevant)

When update hook returns an error like

```
XXXXXXXX

YYYYYYYY
ZZZZZZZZ
```

![screen_shot](/uploads/8dac77972a309dfcb72c741dffbd7270/screen_shot.png)

## What are the relevant issue numbers?

Closes #24020

See merge request !7775
2016-12-09 22:49:08 +00:00
Filipa Lacerda 383e6b552e Fix broken test 2016-12-09 12:13:54 +00:00
Filipa Lacerda d98f03d3f5 Adds tests 2016-12-09 10:14:48 +00:00
Filipa Lacerda 3768de8065 Uniformize props name format 2016-12-09 10:14:48 +00:00
Fatih Acet 1413c94a8e Merge branch '15081-wrong-login-tab-ldap-frontend' into 'master'
Fixed Wrong Tab Selected When Loggin Fails And Multiple Login Tabs Exists

## What does this MR do?
Fixes issue: 15081 Wrong Tab Selected When Loggin Fails And Multiple Login Tabs Exists
This is done by saving into a cookie when the active tab changes and by always selecting that tab when the page is loaded.
## Are there points in the code the reviewer needs to double check?
No
## Why was this MR needed?
In order to fix the issue: 15081
## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?


Closes #15081

See merge request !7314
2016-12-09 09:17:41 +00:00
Filipa Lacerda 67c2e74119 Adds tests for Custom Event polyfill
Update changelog with MR ID
2016-12-08 17:29:25 +00:00
Sean McGivern 564b166236 Merge branch 'fix-all-dashboard' into 'master'
Don't whitelist events for all filter

Closes #24826

See merge request !7673
2016-12-08 15:28:45 +00:00
Alfredo Sumaran b61d058605 Merge branch 'add-element-extensions-tests' into 'master'
Added element extensions spec for .matches and .closest

## What does this MR do?

Adds tests for `Element.prototype.matches` and `Element.prototype.closest`.

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

## Why was this MR needed?

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [ ] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [ ] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [ ] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !7755
2016-12-05 19:35:39 +00:00
basyura 3ce2ba1afb fix display hook error message 2016-12-05 22:02:45 +09:00
Steffen Rauh 4efdbdb266 Fixed influence from other specs. 2016-12-05 11:00:19 +01:00
Oxan van Leeuwen bb447383c5 Add issue events filter and make sure "All" really shows everything
Currently, the EventFilter whitelists event types for the "All" filter.
This has gotten outdated, which causes the confusing behaviour of the
"All" tab not really showing all events. To make matters worse, by
default no tab at all is selected, which does show all events, so
selecting the "All" tab actually hides some events.

Fix this by:
- Making sure All always includes all activity, by abolishing the
  whitelist and just returning all events instead.
- Make the All tab selected by default.
- Add Issue events tab to include the specific events around opening
  and closing issues, since there was no specific filter to see them
  yet.

Fixes #24826
2016-12-04 23:07:22 +01:00
Steffen Rauh 0d53e97ee8 Satisfied eslint 2016-12-03 23:04:21 +01:00
Steffen Rauh 0966c6d2c6 Fix compatibility with Internet Explorer 11 for merge requests 2016-12-03 22:40:18 +01:00
Mike Greiling f6624b5ce4 fix eslint failures on Diff and MergeRequestTabs 2016-12-02 17:38:58 -06:00
Mike Greiling f14c5ae888 refactor MergeRequestTabs to es6 class syntax 2016-12-02 17:32:37 -06:00
Jacob Schatz 44dc417330 Merge branch '25264-ref-commit' into 'master'
Change ref property to commitRef

## What does this MR do?
Changes `ref` prop to `commitRef` because `ref` is a reserved word in Vue.js

## Does this MR meet the acceptance criteria?

- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [ ] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [ ] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Closes #25264

//cc @selfup

See merge request !7901
2016-12-02 18:35:33 +00:00
Alfredo Sumaran 2f91c0eef4 Merge branch 'cleanup-common_utils.js' into 'master'
Clean up common_utils.js

## What does this MR do?

- Remove unused functions from `common_utils.js`.
- Move functions which are used from only one file to that file.

## Why was this MR needed?

Because some utils weren't that common (anymore).

See merge request !7318
2016-12-02 16:03:18 +00:00
Filipa Lacerda f83927ebde Change prop name to keep consistency with other props. 2016-12-02 15:41:58 +00:00
Filipa Lacerda 76abe0eded Change ref property to commitRef 2016-12-02 15:26:06 +00:00
Luke "Jared" Bennett 63e2d6528e
Added element extensions spec for .matches and .closest 2016-12-02 12:10:11 +00:00
Jacopo 8235f83015 Fixed Wrong Tab Selected When Loggin Fails And Multiple Login Tabs Exists
When ldap is enabled and use "Standard" authentication method, if authentication fails
the correct tab remain selected.
This is done by saving into localStorage when the active tab changes and by always selecting that tab when
the page is loaded.
2016-12-02 10:19:31 +01:00
Alfredo Sumaran 9945302708 Merge branch 'comments-fixture' into 'master'
Replace static fixture for notes_spec

## What does this MR do?

Replace `comments.html.haml` and `issue_note.html.haml` used in `notes_spec.js` by dynamically created fixture.

## What are the relevant issue numbers?

#24753

See merge request !7683
2016-12-02 00:44:24 +00:00
winniehell f90b6200e4 Clean up common_utils.js (!7318) 2016-12-01 23:16:09 +01:00
Fatih Acet 629624f30f Merge branch '24814-pipeline-tabs' into 'master'
Pipelines tabs

## What does this MR do?
Changes the URL when the builds tab is clicked making it possible to be shared.

1. Adds a standard way to handle linked tabs:
    *   This behaviour is already present in the merge requests, commit and user `show` page. 
    *    This MR introduces a reusable way to accomplish this behaviour for pages with static content.

2. Adds test:
    *   For the linked tabs reusable class
    *  For the pipelines tabs

## Why was this MR needed?
To allow having a sharable URL that represented the opened tab

![tabs](/uploads/91e663c12c6e9ac46a17aa3a9489dc72/tabs.gif)

## Does this MR meet the acceptance criteria?
- [x] [Changelog entry](https://docs.gitlab.com/ce/development/changelog.html) added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [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 it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?
Closes #24814

See merge request !7709
2016-12-01 21:20:59 +00:00
Fatih Acet 1646b81e2a Merge branch 'right-sidebar-fixture' into 'master'
Replace static fixture for right_sidebar_spec

## What does this MR do?

Replace `right_sidebar.html.haml` for `right_sidebar_spec.js` by already existing dynamically generated fixture.

## What are the relevant issue numbers?

#24753

See merge request !7687
2016-12-01 21:03:18 +00:00
Alfredo Sumaran 1919ae9615 Merge branch 'shortcuts-issuable-fixture' into 'master'
Replace static fixture for shortcuts_issuable_spec

## What does this MR do?

Replace `issuable.html.haml` for `shortcuts_issuable_spec.js` by already existing dynamically generated fixture.

## What are the relevant issue numbers?

#24753

See merge request !7685
2016-12-01 16:30:34 +00:00
winniehell c4244ba4c2 Replace static fixture for notes_spec (!7683) 2016-12-01 15:04:07 +01:00
Filipa Lacerda 640062abdb Adds tests for tabs in the rspec for pipelines
Adds tests for the Linked Tabs class

Removes event listener

Adds builds
2016-11-30 17:06:46 +00:00
Filipa Lacerda cd5813ee21 Fix comma-dangle in function's arguments errors 2016-11-30 14:24:12 +00:00
Filipa Lacerda edc97c9dc6 Use created date from last_deployment
Adds test

Adds changelog entry
2016-11-30 12:44:42 +00:00
Luke "Jared" Bennett c145413d1a
Remove JSX/React eslint plugins.
Change airbnb eslint config package to `eslint-config-airbnb-base` and update plugins.

Change `airbnb` to `airbnb-base` for .eslintrc `extends` value.

Added changelog entry

Made sure all plugins and envs are set

Corrected new failing specs
2016-11-29 16:15:47 +00:00