Commit 7f658331 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'fl-fix-label-feature-flags' into 'master'

Fixes bad wording in FF loading state

Closes #9190

See merge request gitlab-org/gitlab-ee!9153
parents 025d1de3 64f30ea0
......@@ -142,9 +142,9 @@ export default {
<gl-loading-icon
v-if="isLoading"
:label="s__('Pipelines|Loading Pipelines')"
:label="s__('FeatureFlags|Loading Feature Flags')"
:size="3"
class="prepend-top-20"
class="js-loading-state prepend-top-20"
/>
<template v-else-if="shouldRenderErrorState">
......
......@@ -30,6 +30,35 @@ describe('Feature Flags', () => {
mock.restore();
});
describe('loading state', () => {
it('renders a loading icon', done => {
mock.onGet(mockData.endpoint).reply(200, {
feature_flags: [],
count: {
all: 0,
enabled: 0,
disabled: 0,
},
});
component = mountComponentWithStore(FeatureFlagsComponent, {
store,
props: mockData,
});
const loadingElement = component.$el.querySelector('.js-loading-state');
expect(loadingElement).not.toBeNull();
expect(loadingElement.querySelector('i').getAttribute('aria-label')).toEqual(
'Loading Feature Flags',
);
setTimeout(() => {
done();
}, 0);
});
});
describe('successful request', () => {
describe('without feature flags', () => {
beforeEach(done => {
......
......@@ -3770,6 +3770,9 @@ msgstr ""
msgid "FeatureFlags|Instance ID"
msgstr ""
msgid "FeatureFlags|Loading Feature Flags"
msgstr ""
msgid "FeatureFlags|More Information"
msgstr ""
......
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