diff options
Diffstat (limited to 'spec/frontend')
-rw-r--r-- | spec/frontend/loading_icon_for_legacy_js_spec.js | 4 | ||||
-rw-r--r-- | spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js | 7 |
2 files changed, 9 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', () => { diff --git a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js index 09e2c35d449..9f3431ef5a5 100644 --- a/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js +++ b/spec/frontend/packages_and_registries/container_registry/explorer/components/details_page/tags_list_row_spec.js @@ -342,6 +342,13 @@ describe('tags list row', () => { expect(findDetailsRows().length).toBe(3); }); + it('has 2 details rows when revision is empty', async () => { + mountComponent({ tag: { ...tag, revision: '' } }); + await nextTick(); + + expect(findDetailsRows().length).toBe(2); + }); + describe.each` name | finderFunction | text | icon | clipboard ${'published date detail'} | ${findPublishedDateDetail} | ${'Published to the gitlab-org/gitlab-test/rails-12009 image repository at 13:29:38 UTC on 2020-11-03'} | ${'clock'} | ${false} |