Skip to content
Snippets Groups Projects
Commit d1d63b17 authored by Nicolò Mezzopera's avatar Nicolò Mezzopera
Browse files

Merge branch '238607-remove-feature-flag-licenses_app-and-code-that-is-enabled-by-it' into 'master'

Remove feature flag licenses_app and code that is enabled by it

Closes #238607

See merge request gitlab-org/gitlab!42520
parents 9c4ea521 5434772f
No related branches found
No related tags found
No related merge requests found
Showing
with 2 additions and 373 deletions
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`SkeletonHeaderCell renders a skeleton cell with a single title loading bar 1`] = `
<cell-stub
class="license-header-cell"
>
<gl-skeleton-loading-stub
class="w-75 skeleton-bar"
lines="1"
/>
</cell-stub>
`;
import { shallowMount } from '@vue/test-utils';
import { Cell } from 'ee/licenses/components/cells';
describe('Cell', () => {
let wrapper;
const defaultProps = {
title: 'title',
value: 'value',
};
function createComponent(props, slots) {
const propsData = { ...defaultProps, ...props };
wrapper = shallowMount(Cell, {
propsData,
slots,
});
}
afterEach(() => {
if (wrapper) wrapper.destroy();
});
it('renders a string value and title through props', () => {
createComponent();
expect(wrapper.element).toMatchSnapshot();
});
it('renders a number value and title through props', () => {
createComponent({ value: 100 });
expect(wrapper.element).toMatchSnapshot();
});
it('renders value and title slots that override props', () => {
createComponent(null, { title: '<h1>tanuki</h1>', value: '<marquee>party</marquee>' });
expect(wrapper.element).toMatchSnapshot();
});
it('renders an inflexible variant', () => {
createComponent({ isFlexible: false });
expect(wrapper.element).toMatchSnapshot();
});
});
import { shallowMount } from '@vue/test-utils';
import { DateCell } from 'ee/licenses/components/cells';
describe('DateCell', () => {
let wrapper;
const defaultProps = {
title: 'title',
value: '2018/10/24',
};
function createComponent(props) {
const propsData = { ...defaultProps, ...props };
wrapper = shallowMount(DateCell, {
propsData,
});
}
afterEach(() => {
if (wrapper) wrapper.destroy();
});
it('renders a string value that represents a date in words and title through props', () => {
createComponent();
expect(wrapper.element).toMatchSnapshot();
});
it('renders a date value that represents a date in words and title through props', () => {
createComponent({ value: new Date('2018/03/06') });
expect(wrapper.element).toMatchSnapshot();
});
it('renders an expired warning if isExpirable and date value is before now', () => {
createComponent({ isExpirable: true });
expect(wrapper.element).toMatchSnapshot();
});
it('renders date value with no warning if isExpirable and date value is after now', () => {
createComponent({ isExpirable: true, dateNow: new Date('2017/10/10') });
expect(wrapper.element).toMatchSnapshot();
});
it('renders a fallback value if isExpirable and no value', () => {
createComponent({ isExpirable: true, value: undefined });
expect(wrapper.element).toMatchSnapshot();
});
});
import { shallowMount } from '@vue/test-utils';
import { GlIcon } from '@gitlab/ui';
import Cell from 'ee/licenses/components/cells/cell.vue';
import { HeaderCell } from 'ee/licenses/components/cells';
describe('HeaderCell', () => {
let wrapper;
function createComponent() {
wrapper = shallowMount(HeaderCell, {
propsData: {
title: 'title',
icon: 'retry',
},
stubs: {
Cell,
},
});
}
beforeEach(() => {
createComponent();
});
afterEach(() => {
if (wrapper) wrapper.destroy();
});
it('renders a cell with the correct "inflexible" value', () => {
expect(wrapper.find(Cell).props('isFlexible')).toBe(false);
});
it('renders an icon and title', () => {
expect(wrapper.find(GlIcon).props('name')).toBe('retry');
expect(wrapper.find(Cell).text()).toContain('title');
});
});
import { shallowMount } from '@vue/test-utils';
import { InfoCell } from 'ee/licenses/components/cells';
describe('InfoCell', () => {
let wrapper;
const defaultProps = {
title: 'title',
value: 'value',
popoverContent: 'popoverContent',
};
function createComponent(props, slots) {
const propsData = { ...defaultProps, ...props };
wrapper = shallowMount(InfoCell, {
propsData,
slots,
});
}
afterEach(() => {
if (wrapper) wrapper.destroy();
});
it('renders a title and string value with an info popover through props', () => {
createComponent();
expect(wrapper.element).toMatchSnapshot();
});
it('renders a number value', () => {
createComponent({ value: 100 });
expect(wrapper.element).toMatchSnapshot();
});
});
import { shallowMount } from '@vue/test-utils';
import { SkeletonCell } from 'ee/licenses/components/cells';
describe('SkeletonCell', () => {
let wrapper;
function createComponent() {
wrapper = shallowMount(SkeletonCell);
}
afterEach(() => {
if (wrapper) wrapper.destroy();
});
it('renders a skeleton cell with a title and value loading bar', () => {
createComponent();
expect(wrapper.element).toMatchSnapshot();
});
});
import { shallowMount } from '@vue/test-utils';
import { SkeletonHeaderCell } from 'ee/licenses/components/cells';
describe('SkeletonHeaderCell', () => {
let wrapper;
function createComponent() {
wrapper = shallowMount(SkeletonHeaderCell);
}
afterEach(() => {
if (wrapper) wrapper.destroy();
});
it('renders a skeleton cell with a single title loading bar', () => {
createComponent();
expect(wrapper.element).toMatchSnapshot();
});
});
import { shallowMount, createLocalVue } from '@vue/test-utils';
import Vuex from 'vuex';
import InstanceCardsList from 'ee/licenses/components/license_cards_list.vue';
import * as getters from 'ee/licenses/store/getters';
import createState from 'ee/licenses/store/state';
describe('InstanceCardsList', () => {
const newLicensePath = '/newLicensePath';
let wrapper;
const localVue = createLocalVue();
localVue.use(Vuex);
function createStore(store) {
const state = Object.assign(createState(), store, {
newLicensePath,
});
return new Vuex.Store({ state, getters });
}
function createComponent(store) {
wrapper = shallowMount(InstanceCardsList, {
store: createStore(store),
localVue,
});
}
afterEach(() => {
if (wrapper) wrapper.destroy();
});
it('renders a list of license cards', () => {
createComponent({ licenses: [{ id: 1 }, { id: 2 }], isLoadingLicenses: false });
expect(wrapper.element).toMatchSnapshot();
});
it('renders a skeleton loading card if loading licenses', () => {
createComponent({ isLoadingLicenses: true });
expect(wrapper.element).toMatchSnapshot();
});
it('renders a message when there are no licenses', () => {
createComponent({ licenses: [], isLoadingLicenses: false });
expect(wrapper.element).toMatchSnapshot();
});
});
Loading
Loading
@@ -8,20 +8,6 @@ RSpec.describe LicenseHelper do
allow(Rails.application.routes).to receive(:default_url_options).and_return(url_options)
end
 
describe '#api_license_url' do
it 'returns license API url' do
stub_default_url_options
expect(api_license_url(id: 1)).to eq('http://localhost/api/v4/license/1')
end
it 'returns license API url with relative url' do
stub_default_url_options(script_name: '/gitlab')
expect(api_license_url(id: 1)).to eq('http://localhost/gitlab/api/v4/license/1')
end
end
describe '#current_active_user_count' do
let(:license) { create(:license) }
 
Loading
Loading
@@ -43,12 +29,6 @@ RSpec.describe LicenseHelper do
end
end
 
describe '#guest_user_count' do
it 'returns the number of active guest users' do
expect(guest_user_count).to eq(User.active.count - User.active.excluding_guests.count)
end
end
describe '#maximum_user_count' do
context 'when current license is set' do
it 'returns the maximum_user_count for the current license' do
Loading
Loading
Loading
Loading
@@ -5,10 +5,6 @@ require 'spec_helper'
RSpec.describe 'admin/licenses/show.html.haml' do
let_it_be(:license) { create(:license) }
 
before do
stub_feature_flags(licenses_app: false)
end
context 'when trial license is present' do
before do
trial_license = create(:license, trial: true)
Loading
Loading
Loading
Loading
@@ -8,6 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gitlab 1.0.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-09-17 11:26-0400\n"
"PO-Revision-Date: 2020-09-17 11:26-0400\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
Loading
Loading
@@ -1617,9 +1619,6 @@ msgstr ""
msgid "Add label(s)"
msgstr ""
 
msgid "Add license"
msgstr ""
msgid "Add list"
msgstr ""
 
Loading
Loading
@@ -3363,9 +3362,6 @@ msgstr ""
msgid "Are you sure you want to merge immediately?"
msgstr ""
 
msgid "Are you sure you want to permanently delete this license?"
msgstr ""
msgid "Are you sure you want to re-deploy this environment?"
msgstr ""
 
Loading
Loading
@@ -6456,9 +6452,6 @@ msgstr ""
msgid "Community forum"
msgstr ""
 
msgid "Company"
msgstr ""
msgid "Company name"
msgstr ""
 
Loading
Loading
@@ -8224,9 +8217,6 @@ msgstr ""
msgid "Delete label: %{label_name} ?"
msgstr ""
 
msgid "Delete license"
msgstr ""
msgid "Delete list"
msgstr ""
 
Loading
Loading
@@ -8302,15 +8292,6 @@ msgstr ""
msgid "Deleting a project places it into a read-only state until %{date}, at which point the project will be permanently deleted. Are you ABSOLUTELY sure?"
msgstr ""
 
msgid "Deleting the license failed."
msgstr ""
msgid "Deleting the license failed. The license was not found."
msgstr ""
msgid "Deleting the license failed. You are not permitted to perform this action."
msgstr ""
msgid "Deleting the project will delete its repository and all related resources including issues, merge requests etc."
msgstr ""
 
Loading
Loading
@@ -9324,9 +9305,6 @@ msgstr ""
msgid "Email Notification"
msgstr ""
 
msgid "Email address"
msgstr ""
msgid "Email could not be sent"
msgstr ""
 
Loading
Loading
@@ -9564,9 +9542,6 @@ msgstr ""
msgid "Encountered an error while rendering: %{err}"
msgstr ""
 
msgid "End date"
msgstr ""
msgid "Ends at (UTC)"
msgstr ""
 
Loading
Loading
@@ -10985,15 +10960,6 @@ msgstr ""
msgid "Fetching incoming email"
msgstr ""
 
msgid "Fetching licenses failed."
msgstr ""
msgid "Fetching licenses failed. The request endpoint was not found."
msgstr ""
msgid "Fetching licenses failed. You are not permitted to perform this action."
msgstr ""
msgid "File"
msgstr ""
 
Loading
Loading
@@ -11819,9 +11785,6 @@ msgstr ""
msgid "GitLab API"
msgstr ""
 
msgid "GitLab Enterprise Edition %{plan}"
msgstr ""
msgid "GitLab Group Runners can execute code for all the projects in this group."
msgstr ""
 
Loading
Loading
@@ -11855,9 +11818,6 @@ msgstr ""
msgid "GitLab Workhorse"
msgstr ""
 
msgid "GitLab allows you to continue using your license even if you exceed the number of seats you purchased. You will be required to pay for these seats when you renew your license."
msgstr ""
msgid "GitLab commit"
msgstr ""
 
Loading
Loading
@@ -13623,9 +13583,6 @@ msgstr ""
msgid "Instance administrators group already exists"
msgstr ""
 
msgid "Instance license"
msgstr ""
msgid "Integration"
msgstr ""
 
Loading
Loading
@@ -15403,9 +15360,6 @@ msgstr ""
msgid "Max access level"
msgstr ""
 
msgid "Max seats used"
msgstr ""
msgid "Max size 15 MB"
msgstr ""
 
Loading
Loading
@@ -17152,9 +17106,6 @@ msgstr ""
msgid "No license. All rights reserved"
msgstr ""
 
msgid "No licenses found."
msgstr ""
msgid "No matches found"
msgstr ""
 
Loading
Loading
@@ -20900,9 +20851,6 @@ msgstr ""
msgid "Register with two-factor app"
msgstr ""
 
msgid "Registration"
msgstr ""
msgid "Registration|Checkout"
msgstr ""
 
Loading
Loading
@@ -21229,9 +21177,6 @@ msgstr ""
msgid "Removes time estimate."
msgstr ""
 
msgid "Removing license…"
msgstr ""
msgid "Removing this group also removes all child projects, including archived projects, and their resources."
msgstr ""
 
Loading
Loading
@@ -22337,12 +22282,6 @@ msgstr ""
msgid "Seat Link is disabled, and cannot be configured through this form."
msgstr ""
 
msgid "Seats currently in use"
msgstr ""
msgid "Seats in license"
msgstr ""
msgid "Secondary"
msgstr ""
 
Loading
Loading
@@ -25954,9 +25893,6 @@ msgstr ""
msgid "This is the highest peak of users on your installation since the license started."
msgstr ""
 
msgid "This is the maximum number of users that have existed at the same time since the license started. This is the minimum number of seats you will need to buy when you renew your license."
msgstr ""
msgid "This is the number of currently active users on your installation, and this is the minimum number you need to purchase when you renew your license."
msgstr ""
 
Loading
Loading
@@ -27869,9 +27805,6 @@ msgstr ""
msgid "Users or groups set as approvers in the project's or merge request's settings."
msgstr ""
 
msgid "Users outside of license"
msgstr ""
msgid "Users over License:"
msgstr ""
 
Loading
Loading
@@ -27887,9 +27820,6 @@ msgstr ""
msgid "Users with a Guest role or those who don't belong to a Project or Group will not use a seat from your license."
msgstr ""
 
msgid "Users with a Guest role or those who don't belong to any projects or groups don't count towards seats in use."
msgstr ""
msgid "UsersSelect|%{name} + %{length} more"
msgstr ""
 
Loading
Loading
@@ -27929,9 +27859,6 @@ msgstr ""
msgid "Validations failed."
msgstr ""
 
msgid "Validity"
msgstr ""
msgid "Value"
msgstr ""
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment