diff options
Diffstat (limited to 'spec/frontend/loading_icon_for_legacy_js_spec.js')
-rw-r--r-- | spec/frontend/loading_icon_for_legacy_js_spec.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/frontend/loading_icon_for_legacy_js_spec.js b/spec/frontend/loading_icon_for_legacy_js_spec.js index 46deee555ba..1e4acffdfd0 100644 --- a/spec/frontend/loading_icon_for_legacy_js_spec.js +++ b/spec/frontend/loading_icon_for_legacy_js_spec.js @@ -8,7 +8,7 @@ describe('loadingIconForLegacyJS', () => { expect(el.className).toBe('gl-spinner-container'); expect(el.querySelector('.gl-spinner-sm')).toEqual(expect.any(HTMLElement)); expect(el.querySelector('.gl-spinner-dark')).toEqual(expect.any(HTMLElement)); - expect(el.querySelector('[aria-label="Loading"]')).toEqual(expect.any(HTMLElement)); + expect(el.getAttribute('aria-label')).toEqual('Loading'); expect(el.getAttribute('role')).toBe('status'); }); @@ -31,7 +31,7 @@ describe('loadingIconForLegacyJS', () => { it('can render a different aria-label', () => { const el = loadingIconForLegacyJS({ label: 'Foo' }); - expect(el.querySelector('[aria-label="Foo"]')).toEqual(expect.any(HTMLElement)); + expect(el.getAttribute('aria-label')).toEqual('Foo'); }); it('can render additional classes', () => { |