Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 18:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-24 18:09:00 +0300
commitc282dba898a4cb0645f88579339502a4e3778727 (patch)
tree94a6457ce4438e085c9ae43bc51a2b5a29787bf2 /spec/javascripts/groups
parent2c2dd5e36c4ed5f09f488be288882d98f9124d12 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/javascripts/groups')
-rw-r--r--spec/javascripts/groups/components/group_item_spec.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/javascripts/groups/components/group_item_spec.js b/spec/javascripts/groups/components/group_item_spec.js
index 39575ee9f97..2889d7ae4ff 100644
--- a/spec/javascripts/groups/components/group_item_spec.js
+++ b/spec/javascripts/groups/components/group_item_spec.js
@@ -155,6 +155,35 @@ describe('GroupItemComponent', () => {
});
describe('template', () => {
+ let group = null;
+
+ describe('for a group pending deletion', () => {
+ beforeEach(() => {
+ group = { ...mockParentGroupItem, pendingRemoval: true };
+ vm = createComponent(group);
+ });
+
+ it('renders the group pending removal badge', () => {
+ const badgeEl = vm.$el.querySelector('.badge-warning');
+
+ expect(badgeEl).toBeDefined();
+ expect(badgeEl).toContainText('pending removal');
+ });
+ });
+
+ describe('for a group not scheduled for deletion', () => {
+ beforeEach(() => {
+ group = { ...mockParentGroupItem, pendingRemoval: false };
+ vm = createComponent(group);
+ });
+
+ it('does not render the group pending removal badge', () => {
+ const groupTextContainer = vm.$el.querySelector('.group-text-container');
+
+ expect(groupTextContainer).not.toContainText('pending removal');
+ });
+ });
+
it('should render component template correctly', () => {
const visibilityIconEl = vm.$el.querySelector('.item-visibility');