diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 22:00:14 +0300 |
commit | 05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch) | |
tree | 11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/frontend/invite_members/components/user_limit_notification_spec.js | |
parent | ec73467c23693d0db63a797d10194da9e72a74af (diff) |
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/frontend/invite_members/components/user_limit_notification_spec.js')
-rw-r--r-- | spec/frontend/invite_members/components/user_limit_notification_spec.js | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/spec/frontend/invite_members/components/user_limit_notification_spec.js b/spec/frontend/invite_members/components/user_limit_notification_spec.js index 2a780490468..490b2e8bc7c 100644 --- a/spec/frontend/invite_members/components/user_limit_notification_spec.js +++ b/spec/frontend/invite_members/components/user_limit_notification_spec.js @@ -1,9 +1,14 @@ import { GlAlert, GlSprintf } from '@gitlab/ui'; import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; import UserLimitNotification from '~/invite_members/components/user_limit_notification.vue'; -import { REACHED_LIMIT_VARIANT, CLOSE_TO_LIMIT_VARIANT } from '~/invite_members/constants'; +import { + NOTIFICATION_LIMIT_VARIANT, + REACHED_LIMIT_VARIANT, + CLOSE_TO_LIMIT_VARIANT, +} from '~/invite_members/constants'; import { freeUsersLimit, remainingSeats } from '../mock_data/member_modal'; +const INFO_ALERT_TITLE = 'Your top-level group name is over the 5 user limit.'; const WARNING_ALERT_TITLE = 'You only have space for 2 more members in name'; describe('UserLimitNotification', () => { @@ -31,6 +36,17 @@ describe('UserLimitNotification', () => { }); }; + describe('when previewing free user cap', () => { + it("renders user's preview limit notification", () => { + createComponent(NOTIFICATION_LIMIT_VARIANT); + + const alert = findAlert(); + + expect(alert.attributes('title')).toEqual(INFO_ALERT_TITLE); + expect(alert.text()).toContain('GitLab will enforce this limit in the future.'); + }); + }); + describe('when close to limit within a group', () => { it("renders user's limit notification", () => { createComponent(CLOSE_TO_LIMIT_VARIANT); @@ -51,7 +67,7 @@ describe('UserLimitNotification', () => { expect(alert.attributes('title')).toEqual("You've reached your 5 members limit for name"); expect(alert.text()).toContain( - 'To invite new users to this namespace, you must remove existing users.', + 'To invite new users to this top-level group, you must remove existing users.', ); }); }); |