Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5cad9710
Commit
5cad9710
authored
Sep 03, 2020
by
Gilang Gumilar
Committed by
Rémy Coutable
Sep 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Migrate '.fa-spinner' to '.spinner' for 'ajax_loading_spinner.js'
parent
4fe0a254
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
app/assets/javascripts/ajax_loading_spinner.js
app/assets/javascripts/ajax_loading_spinner.js
+3
-2
changelogs/unreleased/202261-migrate-spinner-for-app-assets-javascripts-ajax_loading_spinner-js.yml
...er-for-app-assets-javascripts-ajax_loading_spinner-js.yml
+5
-0
spec/frontend/ajax_loading_spinner_spec.js
spec/frontend/ajax_loading_spinner_spec.js
+6
-4
No files found.
app/assets/javascripts/ajax_loading_spinner.js
View file @
5cad9710
...
...
@@ -28,7 +28,8 @@ export default class AjaxLoadingSpinner {
static
toggleLoadingIcon
(
iconElement
)
{
const
{
classList
}
=
iconElement
;
classList
.
toggle
(
iconElement
.
dataset
.
icon
);
classList
.
toggle
(
'
fa-spinner
'
);
classList
.
toggle
(
'
fa-spin
'
);
classList
.
toggle
(
'
gl-spinner
'
);
classList
.
toggle
(
'
gl-spinner-orange
'
);
classList
.
toggle
(
'
gl-spinner-sm
'
);
}
}
changelogs/unreleased/202261-migrate-spinner-for-app-assets-javascripts-ajax_loading_spinner-js.yml
0 → 100644
View file @
5cad9710
---
title
:
Migrate '.fa-spinner' to '.spinner' for 'app/assets/javascripts/ajax_loading_spinner.js'
merge_request
:
41147
author
:
Gilang Gumilar
type
:
changed
spec/frontend/ajax_loading_spinner_spec.js
View file @
5cad9710
...
...
@@ -19,8 +19,9 @@ describe('Ajax Loading Spinner', () => {
req
.
beforeSend
(
xhr
,
{
dataType
:
'
text/html
'
});
expect
(
icon
).
not
.
toHaveClass
(
'
fa-trash-o
'
);
expect
(
icon
).
toHaveClass
(
'
fa-spinner
'
);
expect
(
icon
).
toHaveClass
(
'
fa-spin
'
);
expect
(
icon
).
toHaveClass
(
'
gl-spinner
'
);
expect
(
icon
).
toHaveClass
(
'
gl-spinner-orange
'
);
expect
(
icon
).
toHaveClass
(
'
gl-spinner-sm
'
);
expect
(
icon
.
dataset
.
icon
).
toEqual
(
'
fa-trash-o
'
);
expect
(
ajaxLoadingSpinner
.
getAttribute
(
'
disabled
'
)).
toEqual
(
''
);
...
...
@@ -44,8 +45,9 @@ describe('Ajax Loading Spinner', () => {
const
icon
=
ajaxLoadingSpinner
.
querySelector
(
'
i
'
);
expect
(
icon
).
toHaveClass
(
'
fa-trash-o
'
);
expect
(
icon
).
not
.
toHaveClass
(
'
fa-spinner
'
);
expect
(
icon
).
not
.
toHaveClass
(
'
fa-spin
'
);
expect
(
icon
).
not
.
toHaveClass
(
'
gl-spinner
'
);
expect
(
icon
).
not
.
toHaveClass
(
'
gl-spinner-orange
'
);
expect
(
icon
).
not
.
toHaveClass
(
'
gl-spinner-sm
'
);
expect
(
ajaxLoadingSpinner
.
getAttribute
(
'
disabled
'
)).
toEqual
(
null
);
done
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment