Commit f58e30c2 authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab master

parents 147a78bb e54e741d
......@@ -17,7 +17,7 @@ stages:
# in cases where jobs require Docker-in-Docker, the job
# definition must be extended with `.use-docker-in-docker`
default:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
tags:
- gitlab-org
# All jobs are interruptible by default
......
......@@ -87,7 +87,7 @@
policy: pull
.use-pg11:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -96,7 +96,7 @@
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg12:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36"
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -105,7 +105,7 @@
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg11-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36"
services:
- name: postgres:11.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......@@ -116,7 +116,7 @@
POSTGRES_HOST_AUTH_METHOD: trust
.use-pg12-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-87-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.34"
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.2.patched-golang-1.14-git-2.29-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-12-graphicsmagick-1.3.36"
services:
- name: postgres:12
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
......
......@@ -62,6 +62,7 @@ Before you push your changes, Lefthook automatically runs the following checks:
- SCSS lint: Run `yarn lint:stylelint` checks (with the [`.stylelintrc`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.stylelintrc) configuration) on the modified `*.scss{,.css}` files. Tags: `stylesheet`, `css`, `style`.
- RuboCop: Run `bundle exec rubocop` checks (with the [`.rubocop.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.rubocop.yml) configuration) on the modified `*.rb` files. Tags: `backend`, `style`.
- Vale: Run `vale` checks (with the [`.vale.ini`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.vale.ini) configuration) on the modified `*.md` files. Tags: `documentation`, `style`.
- Documentation metadata: Run checks for the absence of [documentation metadata](../documentation/index.md#metadata).
In addition to the default configuration, you can define a [local configuration](https://github.com/Arkweid/lefthook/blob/master/docs/full_guide.md#local-config).
......
......@@ -59,15 +59,15 @@ export default {
compareAllButtonTitle: s__('Trials|Compare all plans'),
popoverTitle: s__('Trials|Hey there'),
popoverContent: s__(`Trials|Your trial ends on
%{boldStart}%{trialEndDate}%{boldEnd}. We hope you are enjoying GitLab
%{planName}. To continue using GitLab %{planName} after your trial ends,
you will need to buy a subscription. You can also choose GitLab Premium
if its features are sufficient for your needs.`),
%{boldStart}%{trialEndDate}%{boldEnd}. We hope you’re enjoying the
features of GitLab %{planName}. To keep those features after your trial
ends, you’ll need to buy a subscription. (You can also choose GitLab
Premium if it meets your needs.)`),
upgradeButtonTitle: s__('Trials|Upgrade %{groupName} to %{planName}'),
},
computed: {
formattedTrialEndDate() {
return formatDate(this.trialEndDate, 'yyyy-mm-dd');
return formatDate(this.trialEndDate, 'mmmm d');
},
},
created() {
......
......@@ -25,7 +25,8 @@ export default {
<template>
<div class="report-block-info license-item">
<gl-link :href="issue.url" target="_blank">{{ issue.name }}</gl-link>
<gl-link v-if="issue.url" :href="issue.url" target="_blank">{{ issue.name }}</gl-link>
<span v-else data-testid="license-copy">{{ issue.name }}</span>
<license-packages v-if="hasPackages" :packages="issue.packages" class="text-secondary" />
</div>
</template>
---
title: Fix for licenses without an url in license issue body
merge_request: 56534
author:
type: changed
......@@ -11,7 +11,7 @@ exports[`TrialStatusPopover component matches the snapshot 1`] = `
>
<gl-sprintf-stub
message="Your trial ends on %{boldStart}%{trialEndDate}%{boldEnd}. We hope you are enjoying GitLab %{planName}. To continue using GitLab %{planName} after your trial ends, you will need to buy a subscription. You can also choose GitLab Premium if its features are sufficient for your needs."
message="Your trial ends on %{boldStart}%{trialEndDate}%{boldEnd}. We hope you’re enjoying the features of GitLab %{planName}. To keep those features after your trial ends, you’ll need to buy a subscription. (You can also choose GitLab Premium if it meets your needs.)"
/>
<div
......
......@@ -3,7 +3,7 @@
exports[`License Report MR Widget report section report body should render correctly 1`] = `
<smart-virtual-list-stub
class="report-block-container"
length="1"
length="2"
remain="20"
rtag="div"
size="26"
......
import Vue from 'vue';
import { GlLink } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
import LicenseIssueBody from 'ee/vue_shared/license_compliance/components/license_issue_body.vue';
import createStore from 'ee/vue_shared/license_compliance/store';
import { trimText } from 'helpers/text_helper';
import { mountComponentWithStore } from 'helpers/vue_mount_component_helper';
import LicensePackages from 'ee/vue_shared/license_compliance/components/license_packages.vue';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import { licenseReport } from '../mock_data';
describe('LicenseIssueBody', () => {
const issue = licenseReport[0];
const Component = Vue.extend(LicenseIssueBody);
let vm;
let store;
let wrapper;
const findLicenseIssueBody = () => wrapper.findComponent(LicenseIssueBody);
const findLicensePackages = () => wrapper.findComponent(LicensePackages);
const findGlLink = () => wrapper.find(GlLink);
const findText = () => wrapper.find('[data-testid="license-copy"]');
const createComponent = (props = {}) => {
wrapper = extendedWrapper(
shallowMount(LicenseIssueBody, {
propsData: {
...props,
},
}),
);
};
beforeEach(() => {
store = createStore();
createComponent({ issue: licenseReport[0] });
});
afterEach(() => {
vm.$destroy();
wrapper.destroy();
});
describe('template', () => {
beforeEach(() => {
vm = mountComponentWithStore(Component, { props: { issue }, store });
describe('on load', () => {
it('renders license issue body', () => {
expect(findLicenseIssueBody().exists()).toBe(true);
});
it('renders component container element with class `license-item`', () => {
expect(vm.$el.classList.contains('license-item')).toBe(true);
it('renders packages list', () => {
expect(findLicensePackages().exists()).toBe(true);
});
});
describe('when issue url is defined', () => {
it('renders link to view license', () => {
const linkEl = vm.$el.querySelector('.license-item > a');
const link = findGlLink();
const text = findText();
expect(linkEl).not.toBeNull();
expect(linkEl.innerText.trim()).toBe(issue.name);
expect(link.text()).toBe(licenseReport[0].name);
expect(link.attributes('href')).toBe(licenseReport[0].url);
expect(text.exists()).toBe(false);
});
});
it('renders packages list', () => {
const packagesEl = vm.$el.querySelector('.license-packages');
describe('when issue url is undefined', () => {
beforeEach(() => {
createComponent({ issue: licenseReport[1] });
});
it('renders text to view license', () => {
const link = findGlLink();
const text = findText();
expect(packagesEl).not.toBeNull();
expect(trimText(packagesEl.innerText)).toBe('Used by pg, puma, foo, and 2 more');
expect(text.text()).toBe(licenseReport[1].name);
expect(link.exists()).toBe(false);
});
});
......@@ -49,14 +71,12 @@ describe('LicenseIssueBody', () => {
const issueWithoutPackages = licenseReport[0];
issueWithoutPackages.packages = [];
vm = mountComponentWithStore(Component, { props: { issue: issueWithoutPackages }, store });
createComponent({ issue: issueWithoutPackages });
});
it('does not render packages list', () => {
const packagesEl = vm.$el.querySelector('.license-packages');
expect(packagesEl).toBeNull();
vm.$destroy();
const packages = findLicensePackages();
expect(packages.exists()).toBe(false);
});
});
});
......@@ -56,6 +56,47 @@ export const licenseReport = [
},
],
},
{
name: 'another New BSD',
count: 5,
packages: [
{
name: 'pg',
url: 'https://bitbucket.org/ged/ruby-pg',
description:
'Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]',
paths: ['.'],
},
{
name: 'puma',
url: 'http://puma.io',
description:
'Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications',
paths: ['.'],
},
{
name: 'foo',
url: 'https://bitbucket.org/ged/ruby-pg',
description:
'Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]',
paths: ['.'],
},
{
name: 'bar',
url: 'http://puma.io',
description:
'Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications',
paths: ['.'],
},
{
name: 'baz',
url: 'https://bitbucket.org/ged/ruby-pg',
description:
'Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]',
paths: ['.'],
},
],
},
];
export const generateReportGroup = ({ status = 'some-status', numberOfLicenses = 0 } = {}) => ({
......
......@@ -7,7 +7,7 @@ RSpec.describe Iterations::Cadences::UpdateService do
let_it_be(:group, refind: true) { create(:group) }
let_it_be(:user) { create(:user) }
let_it_be(:iteration_cadence, refind: true) { create(:iterations_cadence, group: group, duration_in_weeks: 1, iterations_in_advance: 2) }
let_it_be(:iteration_cadence, refind: true) { create(:iterations_cadence, group: group, start_date: Date.today, duration_in_weeks: 1, iterations_in_advance: 2) }
let(:params) do
{
......
......@@ -38,3 +38,7 @@ pre-push:
files: git diff --name-only --diff-filter=d $(git merge-base origin/master HEAD)..HEAD
glob: 'doc/*.md'
run: if command -v vale 2> /dev/null; then vale --config .vale.ini --minAlertLevel error {files}; else echo "Vale not found. Install Vale"; fi
docs-metadata: # https://docs.gitlab.com/ee/development/documentation/#metadata
tags: documentation style
files: git diff --name-only $(git merge-base origin/master HEAD)..HEAD | grep '.md'
run: if [[ $(head -n1 {files} | grep -v --count -- '---') -ge 1 ]]; then echo "$(tput setaf 1)Documentation metadata missing in changed Markdown files.$(tput sgr0) For more information, see https://docs.gitlab.com/ee/development/documentation/#metadata."; false; else echo "$(tput sgr0)Metadata found in {files}."; fi;
......@@ -31923,7 +31923,7 @@ msgstr ""
msgid "Trials|You won't get a free trial right now but you can always resume this process by clicking on your avatar and choosing 'Start a free trial'"
msgstr ""
msgid "Trials|Your trial ends on %{boldStart}%{trialEndDate}%{boldEnd}. We hope you are enjoying GitLab %{planName}. To continue using GitLab %{planName} after your trial ends, you will need to buy a subscription. You can also choose GitLab Premium if its features are sufficient for your needs."
msgid "Trials|Your trial ends on %{boldStart}%{trialEndDate}%{boldEnd}. We hope you’re enjoying the features of GitLab %{planName}. To keep those features after your trial ends, you’ll need to buy a subscription. (You can also choose GitLab Premium if it meets your needs.)"
msgstr ""
msgid "Trial|Company name"
......
# frozen_string_literal: true
module QA
RSpec.describe 'Manage', quarantine: { only: :production, issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/290717', type: :bug } do
# This test is disabled on staging due to `top_level_group_creation_enabled` set to false.
# See: https://gitlab.com/gitlab-org/gitlab/-/issues/324808#note_531060031
# The bug issue link in the rspec metadata below is for production only.
# When unquarantining on staging, it should continue to remain in quarantine in production until the bug is resolved.
RSpec.describe 'Manage', quarantine: { only: [:staging, :production], issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/324808', type: :bug } do
describe 'prevent forking outside group' do
let!(:group_for_fork) do
Resource::Sandbox.fabricate_via_api! do |sandbox_group|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment