Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 03:06:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-25 03:06:12 +0300
commit504ab1e32cbd3a529fe61f6c9a30823febce796c (patch)
tree3f5b7548465cf85bc41b13d36fbd008a271f23e7 /spec
parent150effab274651b3a8d2041e64ced734d1f3a349 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js37
-rw-r--r--spec/javascripts/frequent_items/components/app_spec.js7
2 files changed, 0 insertions, 44 deletions
diff --git a/spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js b/spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js
deleted file mode 100644
index 89e8459d594..00000000000
--- a/spec/frontend/lib/utils/suppress_ajax_errors_during_navigation_spec.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import suppressAjaxErrorsDuringNavigation from '~/lib/utils/suppress_ajax_errors_during_navigation';
-import waitForPromises from 'helpers/wait_for_promises';
-
-describe('suppressAjaxErrorsDuringNavigation', () => {
- const OTHER_ERR_CODE = 'foo';
- const NAV_ERR_CODE = 'ECONNABORTED';
-
- it.each`
- isFeatureFlagEnabled | isUserNavigating | code
- ${false} | ${false} | ${OTHER_ERR_CODE}
- ${false} | ${false} | ${NAV_ERR_CODE}
- ${false} | ${true} | ${OTHER_ERR_CODE}
- ${false} | ${true} | ${NAV_ERR_CODE}
- ${true} | ${false} | ${OTHER_ERR_CODE}
- ${true} | ${false} | ${NAV_ERR_CODE}
- ${true} | ${true} | ${OTHER_ERR_CODE}
- `('should return a rejected Promise', ({ isFeatureFlagEnabled, isUserNavigating, code }) => {
- const err = { code };
- const actual = suppressAjaxErrorsDuringNavigation(err, isUserNavigating, isFeatureFlagEnabled);
-
- return expect(actual).rejects.toBe(err);
- });
-
- it('should return a Promise that never resolves', () => {
- const err = { code: NAV_ERR_CODE };
- const actual = suppressAjaxErrorsDuringNavigation(err, true, true);
-
- const thenCallback = jest.fn();
- const catchCallback = jest.fn();
- actual.then(thenCallback).catch(catchCallback);
-
- return waitForPromises().then(() => {
- expect(thenCallback).not.toHaveBeenCalled();
- expect(catchCallback).not.toHaveBeenCalled();
- });
- });
-});
diff --git a/spec/javascripts/frequent_items/components/app_spec.js b/spec/javascripts/frequent_items/components/app_spec.js
index 36dd8604d08..6814f656f5d 100644
--- a/spec/javascripts/frequent_items/components/app_spec.js
+++ b/spec/javascripts/frequent_items/components/app_spec.js
@@ -236,15 +236,8 @@ describe('Frequent Items App Component', () => {
.then(() => {
expect(vm.$el.querySelector('.loading-animation')).toBeDefined();
})
-
- // This test waits for multiple ticks in order to allow the responses to
- // propagate through each interceptor installed on the Axios instance.
- // This shouldn't be necessary; this test should be refactored to avoid this.
- // https://gitlab.com/gitlab-org/gitlab/issues/32479
- .then(vm.$nextTick)
.then(vm.$nextTick)
.then(vm.$nextTick)
-
.then(() => {
expect(vm.$el.querySelectorAll('.frequent-items-list-container li').length).toBe(
mockSearchedProjects.length,