diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 19:00:14 +0000 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/frontend/pages/projects/learn_gitlab/components | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) | |
download | gitlab-ce-1f5bd14001245a518cecb87d251dddcde78b9bfb.tar.gz |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/frontend/pages/projects/learn_gitlab/components')
-rw-r--r-- | spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_section_link_spec.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_section_link_spec.js b/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_section_link_spec.js index 897cbf5eaa4..29335308370 100644 --- a/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_section_link_spec.js +++ b/spec/frontend/pages/projects/learn_gitlab/components/learn_gitlab_section_link_spec.js @@ -85,6 +85,9 @@ describe('Learn GitLab Section Link', () => { it('renders a popover trigger with question icon', () => { expect(findPopoverTrigger().exists()).toBe(true); expect(findPopoverTrigger().props('icon')).toBe('question-o'); + expect(findPopoverTrigger().attributes('aria-label')).toBe( + LearnGitlabSectionLink.i18n.contactAdmin, + ); }); it('renders a popover', () => { @@ -95,6 +98,15 @@ describe('Learn GitLab Section Link', () => { }); }); + it('renders default disabled message', () => { + expect(findPopover().text()).toContain(LearnGitlabSectionLink.i18n.contactAdmin); + }); + + it('renders custom disabled message if provided', () => { + createWrapper('trialStarted', { enabled: false, message: 'Custom message' }); + expect(findPopover().text()).toContain('Custom message'); + }); + it('renders a link inside the popover', () => { expect(findPopoverLink().exists()).toBe(true); expect(findPopoverLink().attributes('href')).toBe(defaultProps.url); |