Commit 37565656 authored by Clement Ho's avatar Clement Ho

Resolve FE conflicts

parent 824c1875
...@@ -35,11 +35,8 @@ Object.assign(DropDown.prototype, { ...@@ -35,11 +35,8 @@ Object.assign(DropDown.prototype, {
}, },
clickEvent: function(e) { clickEvent: function(e) {
<<<<<<< HEAD
=======
if (e.target.tagName === 'UL') return; if (e.target.tagName === 'UL') return;
>>>>>>> origin/master
var selected = utils.closest(e.target, 'LI'); var selected = utils.closest(e.target, 'LI');
if (!selected) return; if (!selected) return;
......
...@@ -35,11 +35,6 @@ const InputSetter = { ...@@ -35,11 +35,6 @@ const InputSetter = {
const newValue = selectedItem.getAttribute(config.valueAttribute); const newValue = selectedItem.getAttribute(config.valueAttribute);
const inputAttribute = config.inputAttribute; const inputAttribute = config.inputAttribute;
<<<<<<< HEAD
if (!newValue) return;
=======
>>>>>>> origin/master
if (input.hasAttribute(inputAttribute)) return input.setAttribute(inputAttribute, newValue); if (input.hasAttribute(inputAttribute)) return input.setAttribute(inputAttribute, newValue);
if (input.tagName === 'INPUT') return input.value = newValue; if (input.tagName === 'INPUT') return input.value = newValue;
return input.textContent = newValue; return input.textContent = newValue;
......
...@@ -446,15 +446,8 @@ ...@@ -446,15 +446,8 @@
} }
} }
<<<<<<< HEAD
.filter-dropdown-item.droplab-item-active .btn { .filter-dropdown-item.droplab-item-active .btn {
@extend %filter-dropdown-item-btn-hover; @extend %filter-dropdown-item-btn-hover;
=======
.filter-dropdown-item.droplab-item-active {
.btn {
@extend %filter-dropdown-item-btn-hover;
}
>>>>>>> origin/master
} }
.filter-dropdown-loading { .filter-dropdown-loading {
......
...@@ -44,11 +44,7 @@ describe 'Dropdown hint', :js, :feature do ...@@ -44,11 +44,7 @@ describe 'Dropdown hint', :js, :feature do
hint_dropdown = find(js_dropdown_hint) hint_dropdown = find(js_dropdown_hint)
<<<<<<< HEAD
expect(hint_dropdown).to have_content('Press Enter or click to search') expect(hint_dropdown).to have_content('Press Enter or click to search')
=======
expect(page).to have_css(js_dropdown_hint, text: 'Press Enter or click to search')
>>>>>>> origin/master
expect(hint_dropdown).to have_selector('.filter-dropdown .filter-dropdown-item', count: 0) expect(hint_dropdown).to have_selector('.filter-dropdown .filter-dropdown-item', count: 0)
end end
......
...@@ -101,11 +101,7 @@ describe 'Search bar', js: true, feature: true do ...@@ -101,11 +101,7 @@ describe 'Search bar', js: true, feature: true do
find('.filtered-search-box .clear-search').click find('.filtered-search-box .clear-search').click
filtered_search.click filtered_search.click
<<<<<<< HEAD
expect(find('#js-dropdown-hint')).to have_selector('.filter-dropdown .filter-dropdown-item', count: 4) expect(find('#js-dropdown-hint')).to have_selector('.filter-dropdown .filter-dropdown-item', count: 4)
=======
expect(find('#js-dropdown-hint')).to have_selector('.filter-dropdown .filter-dropdown-item', count: 5)
>>>>>>> origin/master
expect(get_left_style(find('#js-dropdown-hint')['style'])).to eq(hint_offset) expect(get_left_style(find('#js-dropdown-hint')['style'])).to eq(hint_offset)
end end
end end
......
...@@ -64,38 +64,6 @@ describe('Build', () => { ...@@ -64,38 +64,6 @@ describe('Build', () => {
}); });
}); });
<<<<<<< HEAD
=======
describe('initial build trace', () => {
beforeEach(() => {
new Build();
});
it('displays the initial build trace', () => {
expect($.ajax.calls.count()).toBe(1);
const [{ url, dataType, success, context }] = $.ajax.calls.argsFor(0);
expect(url).toBe(
`${BUILD_URL}/trace.json`,
);
expect(dataType).toBe('json');
expect(success).toEqual(jasmine.any(Function));
spyOn(gl.utils, 'setCiStatusFavicon').and.callFake(() => {});
success.call(context, { html: '<span>Example</span>', status: 'running' });
expect($('#build-trace .js-build-output').text()).toMatch(/Example/);
});
it('removes the spinner', () => {
const [{ success, context }] = $.ajax.calls.argsFor(0);
spyOn(gl.utils, 'setCiStatusFavicon').and.callFake(() => {});
success.call(context, { trace_html: '<span>Example</span>', status: 'success' });
expect($('.js-build-refresh').length).toBe(0);
});
});
>>>>>>> origin/master
describe('running build', () => { describe('running build', () => {
beforeEach(function () { beforeEach(function () {
this.build = new Build(); this.build = new Build();
......
...@@ -130,11 +130,7 @@ describe('DropDown', function () { ...@@ -130,11 +130,7 @@ describe('DropDown', function () {
beforeEach(function () { beforeEach(function () {
this.list = { dispatchEvent: () => {} }; this.list = { dispatchEvent: () => {} };
this.dropdown = { hide: () => {}, list: this.list, addSelectedClass: () => {} }; this.dropdown = { hide: () => {}, list: this.list, addSelectedClass: () => {} };
<<<<<<< HEAD
this.event = { preventDefault: () => {}, target: 'target' }; this.event = { preventDefault: () => {}, target: 'target' };
=======
this.event = { preventDefault: () => {}, target: {} };
>>>>>>> origin/master
this.customEvent = {}; this.customEvent = {};
this.closestElement = {}; this.closestElement = {};
...@@ -172,8 +168,6 @@ describe('DropDown', function () { ...@@ -172,8 +168,6 @@ describe('DropDown', function () {
expect(this.list.dispatchEvent).toHaveBeenCalledWith(this.customEvent); expect(this.list.dispatchEvent).toHaveBeenCalledWith(this.customEvent);
}); });
<<<<<<< HEAD
=======
describe('if the target is a UL element', function () { describe('if the target is a UL element', function () {
beforeEach(function () { beforeEach(function () {
this.event = { preventDefault: () => {}, target: { tagName: 'UL' } }; this.event = { preventDefault: () => {}, target: { tagName: 'UL' } };
...@@ -189,7 +183,6 @@ describe('DropDown', function () { ...@@ -189,7 +183,6 @@ describe('DropDown', function () {
}); });
}); });
>>>>>>> origin/master
describe('if no selected element exists', function () { describe('if no selected element exists', function () {
beforeEach(function () { beforeEach(function () {
this.event.preventDefault.calls.reset(); this.event.preventDefault.calls.reset();
......
...@@ -140,25 +140,6 @@ describe('InputSetter', function () { ...@@ -140,25 +140,6 @@ describe('InputSetter', function () {
expect(this.input.value).toBe(this.newValue); expect(this.input.value).toBe(this.newValue);
}); });
<<<<<<< HEAD
describe('if there is no newValue', function () {
beforeEach(function () {
this.newValue = '';
this.inputSetter = { hook: { trigger: {} } };
this.config = { valueAttribute: {}, input: this.input };
this.input = { value: 'oldValue', tagName: 'INPUT' };
this.selectedItem = { getAttribute: () => {} };
InputSetter.setInput.call(this.inputSetter, this.config, this.selectedItem);
});
it('should not set the value of the input', function () {
expect(this.input.value).toBe('oldValue');
})
});
=======
>>>>>>> origin/master
describe('if no config.input is provided', function () { describe('if no config.input is provided', function () {
beforeEach(function () { beforeEach(function () {
this.config = { valueAttribute: {} }; this.config = { valueAttribute: {} };
...@@ -184,27 +165,6 @@ describe('InputSetter', function () { ...@@ -184,27 +165,6 @@ describe('InputSetter', function () {
it('should set the textContent of the input', function () { it('should set the textContent of the input', function () {
expect(this.input.textContent).toBe(this.newValue); expect(this.input.textContent).toBe(this.newValue);
}); });
<<<<<<< HEAD
describe('if there is no new value', function () {
beforeEach(function () {
this.selectedItem = { getAttribute: () => {} };
this.input = { textContent: 'oldValue', tagName: 'INPUT', hasAttribute: () => {} };
this.config = { valueAttribute: {}, input: this.input };
this.inputSetter = { hook: { trigger: {} } };
this.newValue = 'newValue';
spyOn(this.selectedItem, 'getAttribute').and.returnValue(this.newValue);
InputSetter.setInput.call(this.inputSetter, this.config, this.selectedItem);
});
it('should not set the value of the input', function () {
expect(this.input.textContent).toBe('oldValue');
});
});
=======
>>>>>>> origin/master
}); });
describe('if there is an inputAttribute', function () { describe('if there is an inputAttribute', function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment