Commit 5cad9710 authored by Gilang Gumilar's avatar Gilang Gumilar Committed by Rémy Coutable

Migrate '.fa-spinner' to '.spinner' for 'ajax_loading_spinner.js'

parent 4fe0a254
...@@ -28,7 +28,8 @@ export default class AjaxLoadingSpinner { ...@@ -28,7 +28,8 @@ export default class AjaxLoadingSpinner {
static toggleLoadingIcon(iconElement) { static toggleLoadingIcon(iconElement) {
const { classList } = iconElement; const { classList } = iconElement;
classList.toggle(iconElement.dataset.icon); classList.toggle(iconElement.dataset.icon);
classList.toggle('fa-spinner'); classList.toggle('gl-spinner');
classList.toggle('fa-spin'); classList.toggle('gl-spinner-orange');
classList.toggle('gl-spinner-sm');
} }
} }
---
title: Migrate '.fa-spinner' to '.spinner' for 'app/assets/javascripts/ajax_loading_spinner.js'
merge_request: 41147
author: Gilang Gumilar
type: changed
...@@ -19,8 +19,9 @@ describe('Ajax Loading Spinner', () => { ...@@ -19,8 +19,9 @@ describe('Ajax Loading Spinner', () => {
req.beforeSend(xhr, { dataType: 'text/html' }); req.beforeSend(xhr, { dataType: 'text/html' });
expect(icon).not.toHaveClass('fa-trash-o'); expect(icon).not.toHaveClass('fa-trash-o');
expect(icon).toHaveClass('fa-spinner'); expect(icon).toHaveClass('gl-spinner');
expect(icon).toHaveClass('fa-spin'); expect(icon).toHaveClass('gl-spinner-orange');
expect(icon).toHaveClass('gl-spinner-sm');
expect(icon.dataset.icon).toEqual('fa-trash-o'); expect(icon.dataset.icon).toEqual('fa-trash-o');
expect(ajaxLoadingSpinner.getAttribute('disabled')).toEqual(''); expect(ajaxLoadingSpinner.getAttribute('disabled')).toEqual('');
...@@ -44,8 +45,9 @@ describe('Ajax Loading Spinner', () => { ...@@ -44,8 +45,9 @@ describe('Ajax Loading Spinner', () => {
const icon = ajaxLoadingSpinner.querySelector('i'); const icon = ajaxLoadingSpinner.querySelector('i');
expect(icon).toHaveClass('fa-trash-o'); expect(icon).toHaveClass('fa-trash-o');
expect(icon).not.toHaveClass('fa-spinner'); expect(icon).not.toHaveClass('gl-spinner');
expect(icon).not.toHaveClass('fa-spin'); expect(icon).not.toHaveClass('gl-spinner-orange');
expect(icon).not.toHaveClass('gl-spinner-sm');
expect(ajaxLoadingSpinner.getAttribute('disabled')).toEqual(null); expect(ajaxLoadingSpinner.getAttribute('disabled')).toEqual(null);
done(); done();
......
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