summaryrefslogtreecommitdiff
path: root/spec/javascripts
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-03-06 08:55:35 +0100
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-03-06 08:55:35 +0100
commit449ecd6c68150a7d6d97c3070ffbc3f8b1e372dd (patch)
tree0b77d366e22d52703fd7e6907f6d95f7dbbe7995 /spec/javascripts
parentb3aae422a6adbc0e46901a0c9dde5b75b791e060 (diff)
parent9f908cfc8ed3acf2fd6692f098ed1bd526631a0d (diff)
downloadgitlab-ce-449ecd6c68150a7d6d97c3070ffbc3f8b1e372dd.tar.gz
Merge branch 'master' into zj-create-mattermost-team
Diffstat (limited to 'spec/javascripts')
-rw-r--r--spec/javascripts/abuse_reports_spec.js (renamed from spec/javascripts/abuse_reports_spec.js.es6)0
-rw-r--r--spec/javascripts/activities_spec.js (renamed from spec/javascripts/activities_spec.js.es6)0
-rw-r--r--spec/javascripts/boards/boards_store_spec.js (renamed from spec/javascripts/boards/boards_store_spec.js.es6)0
-rw-r--r--spec/javascripts/boards/issue_card_spec.js (renamed from spec/javascripts/boards/issue_card_spec.js.es6)0
-rw-r--r--spec/javascripts/boards/issue_spec.js (renamed from spec/javascripts/boards/issue_spec.js.es6)0
-rw-r--r--spec/javascripts/boards/list_spec.js (renamed from spec/javascripts/boards/list_spec.js.es6)0
-rw-r--r--spec/javascripts/boards/mock_data.js (renamed from spec/javascripts/boards/mock_data.js.es6)0
-rw-r--r--spec/javascripts/boards/modal_store_spec.js (renamed from spec/javascripts/boards/modal_store_spec.js.es6)0
-rw-r--r--spec/javascripts/bootstrap_linked_tabs_spec.js (renamed from spec/javascripts/bootstrap_linked_tabs_spec.js.es6)0
-rw-r--r--spec/javascripts/build_spec.js (renamed from spec/javascripts/build_spec.js.es6)0
-rw-r--r--spec/javascripts/commit/pipelines/mock_data.js (renamed from spec/javascripts/commit/pipelines/mock_data.js.es6)0
-rw-r--r--spec/javascripts/commit/pipelines/pipelines_spec.js (renamed from spec/javascripts/commit/pipelines/pipelines_spec.js.es6)0
-rw-r--r--spec/javascripts/commit/pipelines/pipelines_store_spec.js (renamed from spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6)0
-rw-r--r--spec/javascripts/commits_spec.js (renamed from spec/javascripts/commits_spec.js.es6)0
-rw-r--r--spec/javascripts/datetime_utility_spec.js (renamed from spec/javascripts/datetime_utility_spec.js.es6)0
-rw-r--r--spec/javascripts/diff_comments_store_spec.js (renamed from spec/javascripts/diff_comments_store_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/environment_actions_spec.js (renamed from spec/javascripts/environments/environment_actions_spec.js.es6)30
-rw-r--r--spec/javascripts/environments/environment_external_url_spec.js (renamed from spec/javascripts/environments/environment_external_url_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/environment_item_spec.js (renamed from spec/javascripts/environments/environment_item_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/environment_rollback_spec.js (renamed from spec/javascripts/environments/environment_rollback_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/environment_spec.js (renamed from spec/javascripts/environments/environment_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/environment_stop_spec.js (renamed from spec/javascripts/environments/environment_stop_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/environment_table_spec.js (renamed from spec/javascripts/environments/environment_table_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/environments_store_spec.js (renamed from spec/javascripts/environments/environments_store_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/folder/environments_folder_view_spec.js (renamed from spec/javascripts/environments/folder/environments_folder_view_spec.js.es6)0
-rw-r--r--spec/javascripts/environments/mock_data.js (renamed from spec/javascripts/environments/mock_data.js.es6)0
-rw-r--r--spec/javascripts/extensions/array_spec.js (renamed from spec/javascripts/extensions/array_spec.js.es6)0
-rw-r--r--spec/javascripts/extensions/element_spec.js (renamed from spec/javascripts/extensions/element_spec.js.es6)0
-rw-r--r--spec/javascripts/extensions/object_spec.js (renamed from spec/javascripts/extensions/object_spec.js.es6)0
-rw-r--r--spec/javascripts/filtered_search/dropdown_user_spec.js (renamed from spec/javascripts/filtered_search/dropdown_user_spec.js.es6)0
-rw-r--r--spec/javascripts/filtered_search/dropdown_utils_spec.js (renamed from spec/javascripts/filtered_search/dropdown_utils_spec.js.es6)0
-rw-r--r--spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js (renamed from spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js.es6)0
-rw-r--r--spec/javascripts/filtered_search/filtered_search_manager_spec.js (renamed from spec/javascripts/filtered_search/filtered_search_manager_spec.js.es6)0
-rw-r--r--spec/javascripts/filtered_search/filtered_search_token_keys_spec.js (renamed from spec/javascripts/filtered_search/filtered_search_token_keys_spec.js.es6)0
-rw-r--r--spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js (renamed from spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js.es6)0
-rw-r--r--spec/javascripts/gfm_auto_complete_spec.js (renamed from spec/javascripts/gfm_auto_complete_spec.js.es6)0
-rw-r--r--spec/javascripts/gl_dropdown_spec.js (renamed from spec/javascripts/gl_dropdown_spec.js.es6)0
-rw-r--r--spec/javascripts/gl_field_errors_spec.js (renamed from spec/javascripts/gl_field_errors_spec.js.es6)0
-rw-r--r--spec/javascripts/gl_form_spec.js (renamed from spec/javascripts/gl_form_spec.js.es6)0
-rw-r--r--spec/javascripts/helpers/class_spec_helper.js (renamed from spec/javascripts/helpers/class_spec_helper.js.es6)0
-rw-r--r--spec/javascripts/helpers/class_spec_helper_spec.js (renamed from spec/javascripts/helpers/class_spec_helper_spec.js.es6)0
-rw-r--r--spec/javascripts/issuable_spec.js (renamed from spec/javascripts/issuable_spec.js.es6)0
-rw-r--r--spec/javascripts/issuable_time_tracker_spec.js (renamed from spec/javascripts/issuable_time_tracker_spec.js.es6)0
-rw-r--r--spec/javascripts/labels_issue_sidebar_spec.js (renamed from spec/javascripts/labels_issue_sidebar_spec.js.es6)0
-rw-r--r--spec/javascripts/lib/utils/common_utils_spec.js (renamed from spec/javascripts/lib/utils/common_utils_spec.js.es6)0
-rw-r--r--spec/javascripts/lib/utils/text_utility_spec.js110
-rw-r--r--spec/javascripts/lib/utils/text_utility_spec.js.es650
-rw-r--r--spec/javascripts/mini_pipeline_graph_dropdown_spec.js (renamed from spec/javascripts/mini_pipeline_graph_dropdown_spec.js.es6)0
-rw-r--r--spec/javascripts/pipelines_spec.js (renamed from spec/javascripts/pipelines_spec.js.es6)0
-rw-r--r--spec/javascripts/pretty_time_spec.js (renamed from spec/javascripts/pretty_time_spec.js.es6)0
-rw-r--r--spec/javascripts/signin_tabs_memoizer_spec.js (renamed from spec/javascripts/signin_tabs_memoizer_spec.js.es6)0
-rw-r--r--spec/javascripts/smart_interval_spec.js (renamed from spec/javascripts/smart_interval_spec.js.es6)0
-rw-r--r--spec/javascripts/subbable_resource_spec.js (renamed from spec/javascripts/subbable_resource_spec.js.es6)0
-rw-r--r--spec/javascripts/test_bundle.js13
-rw-r--r--spec/javascripts/user_callout_spec.js57
-rw-r--r--spec/javascripts/user_callout_spec.js.es637
-rw-r--r--spec/javascripts/version_check_image_spec.js (renamed from spec/javascripts/version_check_image_spec.js.es6)0
-rw-r--r--spec/javascripts/visibility_select_spec.js (renamed from spec/javascripts/visibility_select_spec.js.es6)0
-rw-r--r--spec/javascripts/vue_shared/components/commit_spec.js (renamed from spec/javascripts/vue_shared/components/commit_spec.js.es6)0
-rw-r--r--spec/javascripts/vue_shared/components/pipelines_table_row_spec.js (renamed from spec/javascripts/vue_shared/components/pipelines_table_row_spec.js.es6)0
-rw-r--r--spec/javascripts/vue_shared/components/pipelines_table_spec.js (renamed from spec/javascripts/vue_shared/components/pipelines_table_spec.js.es6)0
-rw-r--r--spec/javascripts/vue_shared/components/table_pagination_spec.js (renamed from spec/javascripts/vue_shared/components/table_pagination_spec.js.es6)0
62 files changed, 168 insertions, 129 deletions
diff --git a/spec/javascripts/abuse_reports_spec.js.es6 b/spec/javascripts/abuse_reports_spec.js
index 76b370b345b..76b370b345b 100644
--- a/spec/javascripts/abuse_reports_spec.js.es6
+++ b/spec/javascripts/abuse_reports_spec.js
diff --git a/spec/javascripts/activities_spec.js.es6 b/spec/javascripts/activities_spec.js
index e6a6fc36ca1..e6a6fc36ca1 100644
--- a/spec/javascripts/activities_spec.js.es6
+++ b/spec/javascripts/activities_spec.js
diff --git a/spec/javascripts/boards/boards_store_spec.js.es6 b/spec/javascripts/boards/boards_store_spec.js
index 9dd741a680b..9dd741a680b 100644
--- a/spec/javascripts/boards/boards_store_spec.js.es6
+++ b/spec/javascripts/boards/boards_store_spec.js
diff --git a/spec/javascripts/boards/issue_card_spec.js.es6 b/spec/javascripts/boards/issue_card_spec.js
index 4340a571017..4340a571017 100644
--- a/spec/javascripts/boards/issue_card_spec.js.es6
+++ b/spec/javascripts/boards/issue_card_spec.js
diff --git a/spec/javascripts/boards/issue_spec.js.es6 b/spec/javascripts/boards/issue_spec.js
index aab4d9c501e..aab4d9c501e 100644
--- a/spec/javascripts/boards/issue_spec.js.es6
+++ b/spec/javascripts/boards/issue_spec.js
diff --git a/spec/javascripts/boards/list_spec.js.es6 b/spec/javascripts/boards/list_spec.js
index c8a18af7198..c8a18af7198 100644
--- a/spec/javascripts/boards/list_spec.js.es6
+++ b/spec/javascripts/boards/list_spec.js
diff --git a/spec/javascripts/boards/mock_data.js.es6 b/spec/javascripts/boards/mock_data.js
index 7a399b307ad..7a399b307ad 100644
--- a/spec/javascripts/boards/mock_data.js.es6
+++ b/spec/javascripts/boards/mock_data.js
diff --git a/spec/javascripts/boards/modal_store_spec.js.es6 b/spec/javascripts/boards/modal_store_spec.js
index 1815847f3fa..1815847f3fa 100644
--- a/spec/javascripts/boards/modal_store_spec.js.es6
+++ b/spec/javascripts/boards/modal_store_spec.js
diff --git a/spec/javascripts/bootstrap_linked_tabs_spec.js.es6 b/spec/javascripts/bootstrap_linked_tabs_spec.js
index fa9f95e16cd..fa9f95e16cd 100644
--- a/spec/javascripts/bootstrap_linked_tabs_spec.js.es6
+++ b/spec/javascripts/bootstrap_linked_tabs_spec.js
diff --git a/spec/javascripts/build_spec.js.es6 b/spec/javascripts/build_spec.js
index 0bd50588f5a..0bd50588f5a 100644
--- a/spec/javascripts/build_spec.js.es6
+++ b/spec/javascripts/build_spec.js
diff --git a/spec/javascripts/commit/pipelines/mock_data.js.es6 b/spec/javascripts/commit/pipelines/mock_data.js
index 188908d66bd..188908d66bd 100644
--- a/spec/javascripts/commit/pipelines/mock_data.js.es6
+++ b/spec/javascripts/commit/pipelines/mock_data.js
diff --git a/spec/javascripts/commit/pipelines/pipelines_spec.js.es6 b/spec/javascripts/commit/pipelines/pipelines_spec.js
index f09c57978a1..f09c57978a1 100644
--- a/spec/javascripts/commit/pipelines/pipelines_spec.js.es6
+++ b/spec/javascripts/commit/pipelines/pipelines_spec.js
diff --git a/spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6 b/spec/javascripts/commit/pipelines/pipelines_store_spec.js
index 94973419979..94973419979 100644
--- a/spec/javascripts/commit/pipelines/pipelines_store_spec.js.es6
+++ b/spec/javascripts/commit/pipelines/pipelines_store_spec.js
diff --git a/spec/javascripts/commits_spec.js.es6 b/spec/javascripts/commits_spec.js
index 05260760c43..05260760c43 100644
--- a/spec/javascripts/commits_spec.js.es6
+++ b/spec/javascripts/commits_spec.js
diff --git a/spec/javascripts/datetime_utility_spec.js.es6 b/spec/javascripts/datetime_utility_spec.js
index d5eec10be42..d5eec10be42 100644
--- a/spec/javascripts/datetime_utility_spec.js.es6
+++ b/spec/javascripts/datetime_utility_spec.js
diff --git a/spec/javascripts/diff_comments_store_spec.js.es6 b/spec/javascripts/diff_comments_store_spec.js
index f956394ef53..f956394ef53 100644
--- a/spec/javascripts/diff_comments_store_spec.js.es6
+++ b/spec/javascripts/diff_comments_store_spec.js
diff --git a/spec/javascripts/environments/environment_actions_spec.js.es6 b/spec/javascripts/environments/environment_actions_spec.js
index 850586f9f3a..d50d45d295e 100644
--- a/spec/javascripts/environments/environment_actions_spec.js.es6
+++ b/spec/javascripts/environments/environment_actions_spec.js
@@ -23,7 +23,6 @@ describe('Actions Component', () => {
el: document.querySelector('.test-dom-element'),
propsData: {
actions: actionsMock,
- playIconSvg: '<svg></svg>',
},
});
@@ -34,33 +33,4 @@ describe('Actions Component', () => {
component.$el.querySelector('.dropdown-menu li a').getAttribute('href'),
).toEqual(actionsMock[0].play_path);
});
-
- it('should render a dropdown with the provided svg', () => {
- const actionsMock = [
- {
- name: 'bar',
- play_path: 'https://gitlab.com/play',
- },
- {
- name: 'foo',
- play_path: '#',
- },
- ];
-
- const component = new ActionsComponent({
- el: document.querySelector('.test-dom-element'),
- propsData: {
- actions: actionsMock,
- playIconSvg: '<svg></svg>',
- },
- });
-
- expect(
- component.$el.querySelector('.js-dropdown-play-icon-container').children,
- ).toContain('svg');
-
- expect(
- component.$el.querySelector('.js-action-play-icon-container').children,
- ).toContain('svg');
- });
});
diff --git a/spec/javascripts/environments/environment_external_url_spec.js.es6 b/spec/javascripts/environments/environment_external_url_spec.js
index 393dbb5aae0..393dbb5aae0 100644
--- a/spec/javascripts/environments/environment_external_url_spec.js.es6
+++ b/spec/javascripts/environments/environment_external_url_spec.js
diff --git a/spec/javascripts/environments/environment_item_spec.js.es6 b/spec/javascripts/environments/environment_item_spec.js
index 7fea80ed799..7fea80ed799 100644
--- a/spec/javascripts/environments/environment_item_spec.js.es6
+++ b/spec/javascripts/environments/environment_item_spec.js
diff --git a/spec/javascripts/environments/environment_rollback_spec.js.es6 b/spec/javascripts/environments/environment_rollback_spec.js
index 4a596baad09..4a596baad09 100644
--- a/spec/javascripts/environments/environment_rollback_spec.js.es6
+++ b/spec/javascripts/environments/environment_rollback_spec.js
diff --git a/spec/javascripts/environments/environment_spec.js.es6 b/spec/javascripts/environments/environment_spec.js
index edd0cad32d0..edd0cad32d0 100644
--- a/spec/javascripts/environments/environment_spec.js.es6
+++ b/spec/javascripts/environments/environment_spec.js
diff --git a/spec/javascripts/environments/environment_stop_spec.js.es6 b/spec/javascripts/environments/environment_stop_spec.js
index 5ca65b1debc..5ca65b1debc 100644
--- a/spec/javascripts/environments/environment_stop_spec.js.es6
+++ b/spec/javascripts/environments/environment_stop_spec.js
diff --git a/spec/javascripts/environments/environment_table_spec.js.es6 b/spec/javascripts/environments/environment_table_spec.js
index be4330b5012..be4330b5012 100644
--- a/spec/javascripts/environments/environment_table_spec.js.es6
+++ b/spec/javascripts/environments/environment_table_spec.js
diff --git a/spec/javascripts/environments/environments_store_spec.js.es6 b/spec/javascripts/environments/environments_store_spec.js
index 77e182b3830..77e182b3830 100644
--- a/spec/javascripts/environments/environments_store_spec.js.es6
+++ b/spec/javascripts/environments/environments_store_spec.js
diff --git a/spec/javascripts/environments/folder/environments_folder_view_spec.js.es6 b/spec/javascripts/environments/folder/environments_folder_view_spec.js
index d1335b5b304..d1335b5b304 100644
--- a/spec/javascripts/environments/folder/environments_folder_view_spec.js.es6
+++ b/spec/javascripts/environments/folder/environments_folder_view_spec.js
diff --git a/spec/javascripts/environments/mock_data.js.es6 b/spec/javascripts/environments/mock_data.js
index 5c395c6b2d8..5c395c6b2d8 100644
--- a/spec/javascripts/environments/mock_data.js.es6
+++ b/spec/javascripts/environments/mock_data.js
diff --git a/spec/javascripts/extensions/array_spec.js.es6 b/spec/javascripts/extensions/array_spec.js
index 60f6b9b78e3..60f6b9b78e3 100644
--- a/spec/javascripts/extensions/array_spec.js.es6
+++ b/spec/javascripts/extensions/array_spec.js
diff --git a/spec/javascripts/extensions/element_spec.js.es6 b/spec/javascripts/extensions/element_spec.js
index 2d8a128ed33..2d8a128ed33 100644
--- a/spec/javascripts/extensions/element_spec.js.es6
+++ b/spec/javascripts/extensions/element_spec.js
diff --git a/spec/javascripts/extensions/object_spec.js.es6 b/spec/javascripts/extensions/object_spec.js
index 2467ed78459..2467ed78459 100644
--- a/spec/javascripts/extensions/object_spec.js.es6
+++ b/spec/javascripts/extensions/object_spec.js
diff --git a/spec/javascripts/filtered_search/dropdown_user_spec.js.es6 b/spec/javascripts/filtered_search/dropdown_user_spec.js
index fa9d03c8a9a..fa9d03c8a9a 100644
--- a/spec/javascripts/filtered_search/dropdown_user_spec.js.es6
+++ b/spec/javascripts/filtered_search/dropdown_user_spec.js
diff --git a/spec/javascripts/filtered_search/dropdown_utils_spec.js.es6 b/spec/javascripts/filtered_search/dropdown_utils_spec.js
index 1e2d7582d5b..1e2d7582d5b 100644
--- a/spec/javascripts/filtered_search/dropdown_utils_spec.js.es6
+++ b/spec/javascripts/filtered_search/dropdown_utils_spec.js
diff --git a/spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js.es6 b/spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js
index ed0b0196ec4..ed0b0196ec4 100644
--- a/spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js.es6
+++ b/spec/javascripts/filtered_search/filtered_search_dropdown_manager_spec.js
diff --git a/spec/javascripts/filtered_search/filtered_search_manager_spec.js.es6 b/spec/javascripts/filtered_search/filtered_search_manager_spec.js
index 98959dda242..98959dda242 100644
--- a/spec/javascripts/filtered_search/filtered_search_manager_spec.js.es6
+++ b/spec/javascripts/filtered_search/filtered_search_manager_spec.js
diff --git a/spec/javascripts/filtered_search/filtered_search_token_keys_spec.js.es6 b/spec/javascripts/filtered_search/filtered_search_token_keys_spec.js
index cf409a7e509..cf409a7e509 100644
--- a/spec/javascripts/filtered_search/filtered_search_token_keys_spec.js.es6
+++ b/spec/javascripts/filtered_search/filtered_search_token_keys_spec.js
diff --git a/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js.es6 b/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js
index a91801cfc89..a91801cfc89 100644
--- a/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js.es6
+++ b/spec/javascripts/filtered_search/filtered_search_tokenizer_spec.js
diff --git a/spec/javascripts/gfm_auto_complete_spec.js.es6 b/spec/javascripts/gfm_auto_complete_spec.js
index 5dfa4008fbd..5dfa4008fbd 100644
--- a/spec/javascripts/gfm_auto_complete_spec.js.es6
+++ b/spec/javascripts/gfm_auto_complete_spec.js
diff --git a/spec/javascripts/gl_dropdown_spec.js.es6 b/spec/javascripts/gl_dropdown_spec.js
index c207fb00a47..c207fb00a47 100644
--- a/spec/javascripts/gl_dropdown_spec.js.es6
+++ b/spec/javascripts/gl_dropdown_spec.js
diff --git a/spec/javascripts/gl_field_errors_spec.js.es6 b/spec/javascripts/gl_field_errors_spec.js
index 733023481f5..733023481f5 100644
--- a/spec/javascripts/gl_field_errors_spec.js.es6
+++ b/spec/javascripts/gl_field_errors_spec.js
diff --git a/spec/javascripts/gl_form_spec.js.es6 b/spec/javascripts/gl_form_spec.js
index 71d6e2a7e22..71d6e2a7e22 100644
--- a/spec/javascripts/gl_form_spec.js.es6
+++ b/spec/javascripts/gl_form_spec.js
diff --git a/spec/javascripts/helpers/class_spec_helper.js.es6 b/spec/javascripts/helpers/class_spec_helper.js
index 61db27a8fcc..61db27a8fcc 100644
--- a/spec/javascripts/helpers/class_spec_helper.js.es6
+++ b/spec/javascripts/helpers/class_spec_helper.js
diff --git a/spec/javascripts/helpers/class_spec_helper_spec.js.es6 b/spec/javascripts/helpers/class_spec_helper_spec.js
index 0a61e561640..0a61e561640 100644
--- a/spec/javascripts/helpers/class_spec_helper_spec.js.es6
+++ b/spec/javascripts/helpers/class_spec_helper_spec.js
diff --git a/spec/javascripts/issuable_spec.js.es6 b/spec/javascripts/issuable_spec.js
index 26d87cc5931..26d87cc5931 100644
--- a/spec/javascripts/issuable_spec.js.es6
+++ b/spec/javascripts/issuable_spec.js
diff --git a/spec/javascripts/issuable_time_tracker_spec.js.es6 b/spec/javascripts/issuable_time_tracker_spec.js
index cb068a4f879..cb068a4f879 100644
--- a/spec/javascripts/issuable_time_tracker_spec.js.es6
+++ b/spec/javascripts/issuable_time_tracker_spec.js
diff --git a/spec/javascripts/labels_issue_sidebar_spec.js.es6 b/spec/javascripts/labels_issue_sidebar_spec.js
index 37e038c16da..37e038c16da 100644
--- a/spec/javascripts/labels_issue_sidebar_spec.js.es6
+++ b/spec/javascripts/labels_issue_sidebar_spec.js
diff --git a/spec/javascripts/lib/utils/common_utils_spec.js.es6 b/spec/javascripts/lib/utils/common_utils_spec.js
index f4d3e77e515..f4d3e77e515 100644
--- a/spec/javascripts/lib/utils/common_utils_spec.js.es6
+++ b/spec/javascripts/lib/utils/common_utils_spec.js
diff --git a/spec/javascripts/lib/utils/text_utility_spec.js b/spec/javascripts/lib/utils/text_utility_spec.js
new file mode 100644
index 00000000000..4200e943121
--- /dev/null
+++ b/spec/javascripts/lib/utils/text_utility_spec.js
@@ -0,0 +1,110 @@
+require('~/lib/utils/text_utility');
+
+(() => {
+ describe('text_utility', () => {
+ describe('gl.text.getTextWidth', () => {
+ it('returns zero width when no text is passed', () => {
+ expect(gl.text.getTextWidth('')).toBe(0);
+ });
+
+ it('returns zero width when no text is passed and font is passed', () => {
+ expect(gl.text.getTextWidth('', '100px sans-serif')).toBe(0);
+ });
+
+ it('returns width when text is passed', () => {
+ expect(gl.text.getTextWidth('foo') > 0).toBe(true);
+ });
+
+ it('returns bigger width when font is larger', () => {
+ const largeFont = gl.text.getTextWidth('foo', '100px sans-serif');
+ const regular = gl.text.getTextWidth('foo', '10px sans-serif');
+ expect(largeFont > regular).toBe(true);
+ });
+ });
+
+ describe('gl.text.pluralize', () => {
+ it('returns pluralized', () => {
+ expect(gl.text.pluralize('test', 2)).toBe('tests');
+ });
+
+ it('returns pluralized when count is 0', () => {
+ expect(gl.text.pluralize('test', 0)).toBe('tests');
+ });
+
+ it('does not return pluralized', () => {
+ expect(gl.text.pluralize('test', 1)).toBe('test');
+ });
+ });
+
+ describe('gl.text.highCountTrim', () => {
+ it('returns 99+ for count >= 100', () => {
+ expect(gl.text.highCountTrim(105)).toBe('99+');
+ expect(gl.text.highCountTrim(100)).toBe('99+');
+ });
+
+ it('returns exact number for count < 100', () => {
+ expect(gl.text.highCountTrim(45)).toBe(45);
+ });
+ });
+
+ describe('gl.text.insertText', () => {
+ let textArea;
+
+ beforeAll(() => {
+ textArea = document.createElement('textarea');
+ document.querySelector('body').appendChild(textArea);
+ });
+
+ afterAll(() => {
+ textArea.parentNode.removeChild(textArea);
+ });
+
+ describe('without selection', () => {
+ it('inserts the tag on an empty line', () => {
+ const initialValue = '';
+
+ textArea.value = initialValue;
+ textArea.selectionStart = 0;
+ textArea.selectionEnd = 0;
+
+ gl.text.insertText(textArea, textArea.value, '*', null, '', false);
+
+ expect(textArea.value).toEqual(`${initialValue}* `);
+ });
+
+ it('inserts the tag on a new line if the current one is not empty', () => {
+ const initialValue = 'some text';
+
+ textArea.value = initialValue;
+ textArea.setSelectionRange(initialValue.length, initialValue.length);
+
+ gl.text.insertText(textArea, textArea.value, '*', null, '', false);
+
+ expect(textArea.value).toEqual(`${initialValue}\n* `);
+ });
+
+ it('inserts the tag on the same line if the current line only contains spaces', () => {
+ const initialValue = ' ';
+
+ textArea.value = initialValue;
+ textArea.setSelectionRange(initialValue.length, initialValue.length);
+
+ gl.text.insertText(textArea, textArea.value, '*', null, '', false);
+
+ expect(textArea.value).toEqual(`${initialValue}* `);
+ });
+
+ it('inserts the tag on the same line if the current line only contains tabs', () => {
+ const initialValue = '\t\t\t';
+
+ textArea.value = initialValue;
+ textArea.setSelectionRange(initialValue.length, initialValue.length);
+
+ gl.text.insertText(textArea, textArea.value, '*', null, '', false);
+
+ expect(textArea.value).toEqual(`${initialValue}* `);
+ });
+ });
+ });
+ });
+})();
diff --git a/spec/javascripts/lib/utils/text_utility_spec.js.es6 b/spec/javascripts/lib/utils/text_utility_spec.js.es6
deleted file mode 100644
index 06b69b8ac17..00000000000
--- a/spec/javascripts/lib/utils/text_utility_spec.js.es6
+++ /dev/null
@@ -1,50 +0,0 @@
-require('~/lib/utils/text_utility');
-
-(() => {
- describe('text_utility', () => {
- describe('gl.text.getTextWidth', () => {
- it('returns zero width when no text is passed', () => {
- expect(gl.text.getTextWidth('')).toBe(0);
- });
-
- it('returns zero width when no text is passed and font is passed', () => {
- expect(gl.text.getTextWidth('', '100px sans-serif')).toBe(0);
- });
-
- it('returns width when text is passed', () => {
- expect(gl.text.getTextWidth('foo') > 0).toBe(true);
- });
-
- it('returns bigger width when font is larger', () => {
- const largeFont = gl.text.getTextWidth('foo', '100px sans-serif');
- const regular = gl.text.getTextWidth('foo', '10px sans-serif');
- expect(largeFont > regular).toBe(true);
- });
- });
-
- describe('gl.text.pluralize', () => {
- it('returns pluralized', () => {
- expect(gl.text.pluralize('test', 2)).toBe('tests');
- });
-
- it('returns pluralized when count is 0', () => {
- expect(gl.text.pluralize('test', 0)).toBe('tests');
- });
-
- it('does not return pluralized', () => {
- expect(gl.text.pluralize('test', 1)).toBe('test');
- });
- });
-
- describe('gl.text.highCountTrim', () => {
- it('returns 99+ for count >= 100', () => {
- expect(gl.text.highCountTrim(105)).toBe('99+');
- expect(gl.text.highCountTrim(100)).toBe('99+');
- });
-
- it('returns exact number for count < 100', () => {
- expect(gl.text.highCountTrim(45)).toBe(45);
- });
- });
- });
-})();
diff --git a/spec/javascripts/mini_pipeline_graph_dropdown_spec.js.es6 b/spec/javascripts/mini_pipeline_graph_dropdown_spec.js
index 7cdade01e00..7cdade01e00 100644
--- a/spec/javascripts/mini_pipeline_graph_dropdown_spec.js.es6
+++ b/spec/javascripts/mini_pipeline_graph_dropdown_spec.js
diff --git a/spec/javascripts/pipelines_spec.js.es6 b/spec/javascripts/pipelines_spec.js
index 72770a702d3..72770a702d3 100644
--- a/spec/javascripts/pipelines_spec.js.es6
+++ b/spec/javascripts/pipelines_spec.js
diff --git a/spec/javascripts/pretty_time_spec.js.es6 b/spec/javascripts/pretty_time_spec.js
index a4662cfb557..a4662cfb557 100644
--- a/spec/javascripts/pretty_time_spec.js.es6
+++ b/spec/javascripts/pretty_time_spec.js
diff --git a/spec/javascripts/signin_tabs_memoizer_spec.js.es6 b/spec/javascripts/signin_tabs_memoizer_spec.js
index d83d9a57b42..d83d9a57b42 100644
--- a/spec/javascripts/signin_tabs_memoizer_spec.js.es6
+++ b/spec/javascripts/signin_tabs_memoizer_spec.js
diff --git a/spec/javascripts/smart_interval_spec.js.es6 b/spec/javascripts/smart_interval_spec.js
index 4366ec2a5b8..4366ec2a5b8 100644
--- a/spec/javascripts/smart_interval_spec.js.es6
+++ b/spec/javascripts/smart_interval_spec.js
diff --git a/spec/javascripts/subbable_resource_spec.js.es6 b/spec/javascripts/subbable_resource_spec.js
index 454386697f5..454386697f5 100644
--- a/spec/javascripts/subbable_resource_spec.js.es6
+++ b/spec/javascripts/subbable_resource_spec.js
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js
index ca707d872a4..fae462561e9 100644
--- a/spec/javascripts/test_bundle.js
+++ b/spec/javascripts/test_bundle.js
@@ -5,23 +5,12 @@ jasmine.getFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
jasmine.getJSONFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
// include common libraries
+require('~/commons/index.js');
window.$ = window.jQuery = require('jquery');
window._ = require('underscore');
window.Cookies = require('js-cookie');
window.Vue = require('vue');
window.Vue.use(require('vue-resource'));
-require('jquery-ujs');
-require('bootstrap/js/affix');
-require('bootstrap/js/alert');
-require('bootstrap/js/button');
-require('bootstrap/js/collapse');
-require('bootstrap/js/dropdown');
-require('bootstrap/js/modal');
-require('bootstrap/js/scrollspy');
-require('bootstrap/js/tab');
-require('bootstrap/js/transition');
-require('bootstrap/js/tooltip');
-require('bootstrap/js/popover');
// stub expected globals
window.gl = window.gl || {};
diff --git a/spec/javascripts/user_callout_spec.js b/spec/javascripts/user_callout_spec.js
new file mode 100644
index 00000000000..205e72af600
--- /dev/null
+++ b/spec/javascripts/user_callout_spec.js
@@ -0,0 +1,57 @@
+const UserCallout = require('~/user_callout');
+
+const USER_CALLOUT_COOKIE = 'user_callout_dismissed';
+const Cookie = window.Cookies;
+
+describe('UserCallout', function () {
+ const fixtureName = 'static/user_callout.html.raw';
+ preloadFixtures(fixtureName);
+
+ beforeEach(() => {
+ loadFixtures(fixtureName);
+ Cookie.remove(USER_CALLOUT_COOKIE);
+
+ this.userCallout = new UserCallout();
+ this.closeButton = $('.close-user-callout');
+ this.userCalloutBtn = $('.user-callout-btn');
+ this.userCalloutContainer = $('.user-callout');
+ });
+
+ it('does not show when cookie is set not defined', () => {
+ expect(Cookie.get(USER_CALLOUT_COOKIE)).toBeUndefined();
+ expect(this.userCalloutContainer.is(':visible')).toBe(true);
+ });
+
+ it('shows when cookie is set to false', () => {
+ Cookie.set(USER_CALLOUT_COOKIE, 'false');
+
+ expect(Cookie.get(USER_CALLOUT_COOKIE)).toBeDefined();
+ expect(this.userCalloutContainer.is(':visible')).toBe(true);
+ });
+
+ it('hides when user clicks on the dismiss-icon', () => {
+ this.closeButton.click();
+ expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
+ });
+
+ it('hides when user clicks on the "check it out" button', () => {
+ this.userCalloutBtn.click();
+ expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
+ });
+});
+
+describe('UserCallout when cookie is present', function () {
+ const fixtureName = 'static/user_callout.html.raw';
+ preloadFixtures(fixtureName);
+
+ beforeEach(() => {
+ loadFixtures(fixtureName);
+ Cookie.set(USER_CALLOUT_COOKIE, 'true');
+ this.userCallout = new UserCallout();
+ this.userCalloutContainer = $('.user-callout');
+ });
+
+ it('removes the DOM element', () => {
+ expect(this.userCalloutContainer.length).toBe(0);
+ });
+});
diff --git a/spec/javascripts/user_callout_spec.js.es6 b/spec/javascripts/user_callout_spec.js.es6
deleted file mode 100644
index 6ee63f56a26..00000000000
--- a/spec/javascripts/user_callout_spec.js.es6
+++ /dev/null
@@ -1,37 +0,0 @@
-const UserCallout = require('~/user_callout');
-
-const USER_CALLOUT_COOKIE = 'user_callout_dismissed';
-const Cookie = window.Cookies;
-
-describe('UserCallout', () => {
- const fixtureName = 'static/user_callout.html.raw';
- preloadFixtures(fixtureName);
-
- beforeEach(function () {
- loadFixtures(fixtureName);
- this.userCallout = new UserCallout();
- this.closeButton = $('.close-user-callout');
- this.userCalloutBtn = $('.user-callout-btn');
- this.userCalloutContainer = $('.user-callout');
- Cookie.set(USER_CALLOUT_COOKIE, 'false');
- });
-
- afterEach(function () {
- Cookie.set(USER_CALLOUT_COOKIE, 'false');
- });
-
- it('shows when cookie is set to false', function () {
- expect(Cookie.get(USER_CALLOUT_COOKIE)).toBeDefined();
- expect(this.userCalloutContainer.is(':visible')).toBe(true);
- });
-
- it('hides when user clicks on the dismiss-icon', function () {
- this.closeButton.click();
- expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
- });
-
- it('hides when user clicks on the "check it out" button', function () {
- this.userCalloutBtn.click();
- expect(Cookie.get(USER_CALLOUT_COOKIE)).toBe('true');
- });
-});
diff --git a/spec/javascripts/version_check_image_spec.js.es6 b/spec/javascripts/version_check_image_spec.js
index 464c1fce210..464c1fce210 100644
--- a/spec/javascripts/version_check_image_spec.js.es6
+++ b/spec/javascripts/version_check_image_spec.js
diff --git a/spec/javascripts/visibility_select_spec.js.es6 b/spec/javascripts/visibility_select_spec.js
index 9727c03c91e..9727c03c91e 100644
--- a/spec/javascripts/visibility_select_spec.js.es6
+++ b/spec/javascripts/visibility_select_spec.js
diff --git a/spec/javascripts/vue_shared/components/commit_spec.js.es6 b/spec/javascripts/vue_shared/components/commit_spec.js
index 15ab10b9b69..15ab10b9b69 100644
--- a/spec/javascripts/vue_shared/components/commit_spec.js.es6
+++ b/spec/javascripts/vue_shared/components/commit_spec.js
diff --git a/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js.es6 b/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js
index 412abfd5e41..412abfd5e41 100644
--- a/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js.es6
+++ b/spec/javascripts/vue_shared/components/pipelines_table_row_spec.js
diff --git a/spec/javascripts/vue_shared/components/pipelines_table_spec.js.es6 b/spec/javascripts/vue_shared/components/pipelines_table_spec.js
index 54d81e2ea7d..54d81e2ea7d 100644
--- a/spec/javascripts/vue_shared/components/pipelines_table_spec.js.es6
+++ b/spec/javascripts/vue_shared/components/pipelines_table_spec.js
diff --git a/spec/javascripts/vue_shared/components/table_pagination_spec.js.es6 b/spec/javascripts/vue_shared/components/table_pagination_spec.js
index 9cb067921a7..9cb067921a7 100644
--- a/spec/javascripts/vue_shared/components/table_pagination_spec.js.es6
+++ b/spec/javascripts/vue_shared/components/table_pagination_spec.js