diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-06-27 16:15:06 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-06-27 16:15:06 +0800 |
commit | 849f9995d97c85d88b36a40ee563f7dd51fdc3f1 (patch) | |
tree | 3523089d253b001f7e3b029266399e497407441b /spec/javascripts/projects_dropdown | |
parent | ef6b3e0271d226462bed5f899f3964cf5652978c (diff) | |
parent | 87f7597a4fb7852fc81f830158cdfd5fdec8fac4 (diff) | |
download | gitlab-ce-849f9995d97c85d88b36a40ee563f7dd51fdc3f1.tar.gz |
Merge remote-tracking branch 'upstream/master' into 14995-custom_wiki_sidebar
* upstream/master: (4180 commits)
Enable frozen string literals for app/workers/*.rb
Resolve "Search dropdown hides & shows when typing"
Revert merge request widget button max height
Update CHANGELOG.md for 11.0.2
Update external link icon in header user dropdown
Added Diff Viewer to new VUE based MR page
Fixed eslint failure in IDE spec helpers
Use refs instead of querySelector.
Show file in tree on WebIDE open
Resolve "Remove unused bootstrap component CSS"
Resolve "Explain what Groups are in the New Group page"
[QA] Make sure we wait for the deploy key list to load
Update _scopes_form.html.haml to remove duplicate information
Use the branch instead of the tag to install
port the EE changes
Add index on deployable_type/id for deployments
Add a helper to rename a column using a background migration
Fix performance bottleneck when rendering large wiki pages
Port Namespace#root_ancestor to CE
Remove duplicate spec
...
Diffstat (limited to 'spec/javascripts/projects_dropdown')
-rw-r--r-- | spec/javascripts/projects_dropdown/components/app_spec.js | 41 | ||||
-rw-r--r-- | spec/javascripts/projects_dropdown/components/search_spec.js | 1 |
2 files changed, 21 insertions, 21 deletions
diff --git a/spec/javascripts/projects_dropdown/components/app_spec.js b/spec/javascripts/projects_dropdown/components/app_spec.js index 2054fef790b..38b31c3d727 100644 --- a/spec/javascripts/projects_dropdown/components/app_spec.js +++ b/spec/javascripts/projects_dropdown/components/app_spec.js @@ -23,17 +23,18 @@ const createComponent = () => { }); }; -const returnServicePromise = (data, failed) => new Promise((resolve, reject) => { - if (failed) { - reject(data); - } else { - resolve({ - json() { - return data; - }, - }); - } -}); +const returnServicePromise = (data, failed) => + new Promise((resolve, reject) => { + if (failed) { + reject(data); + } else { + resolve({ + json() { + return data; + }, + }); + } + }); describe('AppComponent', () => { describe('computed', () => { @@ -185,7 +186,7 @@ describe('AppComponent', () => { describe('fetchSearchedProjects', () => { const searchQuery = 'test'; - it('should perform search with provided search query', (done) => { + it('should perform search with provided search query', done => { const mockData = [mockRawProject]; spyOn(vm, 'toggleLoader'); spyOn(vm, 'toggleSearchProjectsList'); @@ -203,7 +204,7 @@ describe('AppComponent', () => { }, 0); }); - it('should update props for showing search failure', (done) => { + it('should update props for showing search failure', done => { spyOn(vm, 'toggleSearchProjectsList'); spyOn(vm.service, 'getSearchedProjects').and.returnValue(returnServicePromise({}, true)); @@ -219,7 +220,7 @@ describe('AppComponent', () => { }); describe('logCurrentProjectAccess', () => { - it('should log current project access via service', (done) => { + it('should log current project access via service', done => { spyOn(vm.service, 'logProjectAccess'); vm.currentProject = mockProject; @@ -257,7 +258,7 @@ describe('AppComponent', () => { }); describe('created', () => { - it('should bind event listeners on eventHub', (done) => { + it('should bind event listeners on eventHub', done => { spyOn(eventHub, '$on'); createComponent().$mount(); @@ -273,7 +274,7 @@ describe('AppComponent', () => { }); describe('beforeDestroy', () => { - it('should unbind event listeners on eventHub', (done) => { + it('should unbind event listeners on eventHub', done => { const vm = createComponent(); spyOn(eventHub, '$off'); @@ -305,7 +306,7 @@ describe('AppComponent', () => { expect(vm.$el.querySelector('.search-input-container')).toBeDefined(); }); - it('should render loading animation', (done) => { + it('should render loading animation', done => { vm.toggleLoader(true); Vue.nextTick(() => { const loadingEl = vm.$el.querySelector('.loading-animation'); @@ -317,7 +318,7 @@ describe('AppComponent', () => { }); }); - it('should render frequent projects list header', (done) => { + it('should render frequent projects list header', done => { vm.toggleFrequentProjectsList(true); Vue.nextTick(() => { const sectionHeaderEl = vm.$el.querySelector('.section-header'); @@ -328,7 +329,7 @@ describe('AppComponent', () => { }); }); - it('should render frequent projects list', (done) => { + it('should render frequent projects list', done => { vm.toggleFrequentProjectsList(true); Vue.nextTick(() => { expect(vm.$el.querySelector('.projects-list-frequent-container')).toBeDefined(); @@ -336,7 +337,7 @@ describe('AppComponent', () => { }); }); - it('should render searched projects list', (done) => { + it('should render searched projects list', done => { vm.toggleSearchProjectsList(true); Vue.nextTick(() => { expect(vm.$el.querySelector('.section-header')).toBe(null); diff --git a/spec/javascripts/projects_dropdown/components/search_spec.js b/spec/javascripts/projects_dropdown/components/search_spec.js index 601264258c2..427f5024e3a 100644 --- a/spec/javascripts/projects_dropdown/components/search_spec.js +++ b/spec/javascripts/projects_dropdown/components/search_spec.js @@ -92,7 +92,6 @@ describe('SearchComponent', () => { const inputEl = vm.$el.querySelector('input.form-control'); expect(vm.$el.classList.contains('search-input-container')).toBeTruthy(); - expect(vm.$el.classList.contains('hidden-xs')).toBeTruthy(); expect(inputEl).not.toBe(null); expect(inputEl.getAttribute('placeholder')).toBe('Search your projects'); expect(vm.$el.querySelector('.search-icon')).toBeDefined(); |