Commit e89fad52 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix broken specs

Don't add disabled class to loading button
parent 9e0ce26c
......@@ -13,7 +13,6 @@ const toggleLoadingButton = (button) => {
button.setAttribute('disabled', true);
}
button.classList.toggle('is-disabled');
button.classList.toggle('is-loading');
};
......
......@@ -177,7 +177,7 @@ describe 'Edit Project Settings' do
click_button "Save changes"
end
expect(find(".sharing-permissions")).to have_selector(".project-feature-toggle.disabled", count: 2)
expect(find(".sharing-permissions")).to have_selector(".project-feature-toggle.is-disabled", count: 2)
end
it "shows empty features project homepage" do
......@@ -272,10 +272,10 @@ describe 'Edit Project Settings' do
end
def toggle_feature_off(feature_name)
find(".project-feature-controls[data-for=\"#{feature_name}\"] .project-feature-toggle.checked").click
find(".project-feature-controls[data-for=\"#{feature_name}\"] .project-feature-toggle.is-checked").click
end
def toggle_feature_on(feature_name)
find(".project-feature-controls[data-for=\"#{feature_name}\"] .project-feature-toggle:not(.checked)").click
find(".project-feature-controls[data-for=\"#{feature_name}\"] .project-feature-toggle:not(.is-checked)").click
end
end
......@@ -20,7 +20,7 @@ describe('Clusters table', () => {
button.click();
expect(button.classList).toContain('is-loading');
expect(button.classList).toContain('is-disabled');
expect(button.getAttribute('disabled')).toEqual('true');
});
afterEach(() => {
......
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