diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-14 18:08:55 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-14 18:08:55 +0000 |
commit | 3828d19ab2d68dd6cafa6f08221e1eee572671e7 (patch) | |
tree | afd36fcf20499d876493bf24bd9f0ee926454547 /spec/frontend/super_sidebar | |
parent | 3e764061b3209d4deee2a55851d5d564a9f19d8b (diff) | |
download | gitlab-ce-3828d19ab2d68dd6cafa6f08221e1eee572671e7.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/super_sidebar')
-rw-r--r-- | spec/frontend/super_sidebar/components/user_bar_spec.js | 6 | ||||
-rw-r--r-- | spec/frontend/super_sidebar/mock_data.js | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/spec/frontend/super_sidebar/components/user_bar_spec.js b/spec/frontend/super_sidebar/components/user_bar_spec.js index a5faad967fc..ae15dd55644 100644 --- a/spec/frontend/super_sidebar/components/user_bar_spec.js +++ b/spec/frontend/super_sidebar/components/user_bar_spec.js @@ -13,6 +13,7 @@ describe('UserBar component', () => { const findCreateMenu = () => wrapper.findComponent(CreateMenu); const findCounter = (at) => wrapper.findAllComponents(Counter).at(at); const findMergeRequestMenu = () => wrapper.findComponent(MergeRequestMenu); + const findBrandLogo = () => wrapper.findByTestId('brand-header-custom-logo'); const createWrapper = (extraSidebarData = {}) => { wrapper = shallowMountExtended(UserBar, { @@ -55,6 +56,11 @@ describe('UserBar component', () => { expect(findCounter(2).props('href')).toBe('/dashboard/todos'); expect(findCounter(2).props('label')).toBe(__('To-Do list')); }); + + it('renders branding logo', () => { + expect(findBrandLogo().exists()).toBe(true); + expect(findBrandLogo().attributes('src')).toBe(sidebarData.logo_url); + }); }); describe('GitLab Next badge', () => { diff --git a/spec/frontend/super_sidebar/mock_data.js b/spec/frontend/super_sidebar/mock_data.js index 2cd055e6d07..32f56e5c107 100644 --- a/spec/frontend/super_sidebar/mock_data.js +++ b/spec/frontend/super_sidebar/mock_data.js @@ -68,6 +68,7 @@ export const sidebarData = { name: 'Administrator', username: 'root', avatar_url: 'path/to/img_administrator', + logo_url: 'path/to/logo', assigned_open_issues_count: 1, todos_pending_count: 3, issues_dashboard_path: 'path/to/issues', |