Commit f4a98ea9 authored by Clement Ho's avatar Clement Ho

Fix issue create new branch

parent 006b477f
...@@ -61,8 +61,8 @@ export default class CreateMergeRequestDropdown { ...@@ -61,8 +61,8 @@ export default class CreateMergeRequestDropdown {
} }
available() { available() {
this.availableButton.classList.remove('hide'); this.availableButton.classList.remove('hidden');
this.unavailableButton.classList.add('hide'); this.unavailableButton.classList.add('hidden');
} }
bindEvents() { bindEvents() {
...@@ -231,7 +231,7 @@ export default class CreateMergeRequestDropdown { ...@@ -231,7 +231,7 @@ export default class CreateMergeRequestDropdown {
} }
hide() { hide() {
this.wrapperEl.classList.add('hide'); this.wrapperEl.classList.add('hidden');
} }
init() { init() {
...@@ -405,8 +405,8 @@ export default class CreateMergeRequestDropdown { ...@@ -405,8 +405,8 @@ export default class CreateMergeRequestDropdown {
} }
unavailable() { unavailable() {
this.availableButton.classList.add('hide'); this.availableButton.classList.add('hidden');
this.unavailableButton.classList.remove('hide'); this.unavailableButton.classList.remove('hidden');
} }
updateInputState(target, ref, result) { updateInputState(target, ref, result) {
......
...@@ -205,7 +205,7 @@ ul.related-merge-requests > li { ...@@ -205,7 +205,7 @@ ul.related-merge-requests > li {
} }
} }
.btn-group:not(.hide) { .btn-group:not(.hidden) {
display: flex; display: flex;
} }
...@@ -258,8 +258,8 @@ ul.related-merge-requests > li { ...@@ -258,8 +258,8 @@ ul.related-merge-requests > li {
} }
.create-mr-dropdown-wrap { .create-mr-dropdown-wrap {
.btn-group:not(.hide) { .btn-group:not(.hidden) {
display: inline-block; display: inline-flex;
} }
} }
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
= icon('spinner', class: 'fa-spin') = icon('spinner', class: 'fa-spin')
%span.text %span.text
Checking branch availability… Checking branch availability…
.btn-group.available.d-none .btn-group.available.hidden
%button.btn.js-create-merge-request.btn-success.btn-inverted{ type: 'button', data: { action: data_action } } %button.btn.js-create-merge-request.btn-success.btn-inverted{ type: 'button', data: { action: data_action } }
= value = value
......
...@@ -139,8 +139,8 @@ describe 'User creates branch and merge request on issue page', :js do ...@@ -139,8 +139,8 @@ describe 'User creates branch and merge request on issue page', :js do
end end
it 'disables the create branch button' do it 'disables the create branch button' do
expect(page).to have_css('.create-mr-dropdown-wrap .unavailable:not(.hide)') expect(page).to have_css('.create-mr-dropdown-wrap .unavailable:not(.hidden)')
expect(page).to have_css('.create-mr-dropdown-wrap .available.hide', visible: false) expect(page).to have_css('.create-mr-dropdown-wrap .available.hidden', visible: false)
expect(page).to have_content /1 Related Merge Request/ expect(page).to have_content /1 Related Merge Request/
end end
end end
......
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