Commit a3859bf5 authored by Valery Sizov's avatar Valery Sizov

Resolved conflicts

parent fd0fd602
......@@ -16,32 +16,6 @@ const defaults = {
class BlobForkSuggestion {
constructor(options) {
this.elementMap = Object.assign({}, defaults, options);
<<<<<<< HEAD
this.onClickWrapper = this.onClick.bind(this);
document.addEventListener('click', this.onClickWrapper);
}
showSuggestionSection(forkPath, action = 'edit') {
[].forEach.call(this.elementMap.suggestionSections, (suggestionSection) => {
suggestionSection.classList.remove('hidden');
});
[].forEach.call(this.elementMap.forkButtons, (forkButton) => {
forkButton.setAttribute('href', forkPath);
});
[].forEach.call(this.elementMap.actionTextPieces, (actionTextPiece) => {
// eslint-disable-next-line no-param-reassign
actionTextPiece.textContent = action;
});
}
hideSuggestionSection() {
[].forEach.call(this.elementMap.suggestionSections, (suggestionSection) => {
suggestionSection.classList.add('hidden');
});
=======
this.onOpenButtonClick = this.onOpenButtonClick.bind(this);
this.onCancelButtonClick = this.onCancelButtonClick.bind(this);
}
......@@ -80,7 +54,6 @@ class BlobForkSuggestion {
destroy() {
$(this.elementMap.openButtons).off('click', this.onOpenButtonClick);
$(this.elementMap.cancelButtons).off('click', this.onCancelButtonClick);
>>>>>>> 847790478f8d85607eacedcdb693cfcd25c415af
}
onClick(e) {
......
......@@ -103,12 +103,8 @@ const ShortcutsBlob = require('./shortcuts_blob');
cancelButtons: document.querySelectorAll('.js-cancel-fork-suggestion-button'),
suggestionSections: document.querySelectorAll('.js-file-fork-suggestion-section'),
actionTextPieces: document.querySelectorAll('.js-file-fork-suggestion-section-action'),
<<<<<<< HEAD
});
=======
})
.init();
>>>>>>> 847790478f8d85607eacedcdb693cfcd25c415af
}
switch (page) {
......
......@@ -18,13 +18,8 @@ feature 'Groups > Audit Events', js: true, feature: true do
group_member = group.members.find_by(user_id: pete)
page.within "#group_member_#{group_member.id}" do
<<<<<<< HEAD:spec/features/groups/audit_events.rb
click_button('Developer')
click_link('Master')
=======
click_button 'Developer'
click_link 'Master'
>>>>>>> 847790478f8d85607eacedcdb693cfcd25c415af:spec/features/groups/audit_events_spec.rb
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
......
......@@ -46,13 +46,8 @@ feature 'Projects > Audit Events', js: true, feature: true do
project_member = project.project_member(pete)
page.within "#project_member_#{project_member.id}" do
<<<<<<< HEAD:spec/features/projects/audit_events.rb
click_button('Developer')
click_link('Reporter')
=======
click_button 'Developer'
click_link 'Master'
>>>>>>> 847790478f8d85607eacedcdb693cfcd25c415af:spec/features/projects/audit_events_spec.rb
end
# This is to avoid a Capybara::Poltergeist::MouseEventFailed error
......
......@@ -3,22 +3,6 @@ import BlobForkSuggestion from '~/blob/blob_fork_suggestion';
describe('BlobForkSuggestion', () => {
let blobForkSuggestion;
<<<<<<< HEAD
const openButtons = [document.createElement('div')];
const forkButtons = [document.createElement('a')];
const cancelButtons = [document.createElement('div')];
const suggestionSections = [document.createElement('div')];
const actionTextPieces = [document.createElement('div')];
beforeEach(() => {
blobForkSuggestion = new BlobForkSuggestion({
openButtons,
forkButtons,
cancelButtons,
suggestionSections,
actionTextPieces,
});
=======
const openButton = document.createElement('div');
const forkButton = document.createElement('a');
const cancelButton = document.createElement('div');
......@@ -34,7 +18,6 @@ describe('BlobForkSuggestion', () => {
actionTextPieces: actionTextPiece,
})
.init();
>>>>>>> 847790478f8d85607eacedcdb693cfcd25c415af
});
afterEach(() => {
......@@ -43,23 +26,13 @@ describe('BlobForkSuggestion', () => {
it('showSuggestionSection', () => {
blobForkSuggestion.showSuggestionSection('/foo', 'foo');
<<<<<<< HEAD
expect(suggestionSections[0].classList.contains('hidden')).toEqual(false);
expect(forkButtons[0].getAttribute('href')).toEqual('/foo');
expect(actionTextPieces[0].textContent).toEqual('foo');
=======
expect(suggestionSection.classList.contains('hidden')).toEqual(false);
expect(forkButton.getAttribute('href')).toEqual('/foo');
expect(actionTextPiece.textContent).toEqual('foo');
>>>>>>> 847790478f8d85607eacedcdb693cfcd25c415af
});
it('hideSuggestionSection', () => {
blobForkSuggestion.hideSuggestionSection();
<<<<<<< HEAD
expect(suggestionSections[0].classList.contains('hidden')).toEqual(true);
=======
expect(suggestionSection.classList.contains('hidden')).toEqual(true);
>>>>>>> 847790478f8d85607eacedcdb693cfcd25c415af
});
});
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