Commit 728a207e authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent ea20020f
...@@ -3,7 +3,7 @@ import Sortable from 'sortablejs'; ...@@ -3,7 +3,7 @@ import Sortable from 'sortablejs';
import Vue from 'vue'; import Vue from 'vue';
import { GlButtonGroup, GlButton, GlTooltip } from '@gitlab/ui'; import { GlButtonGroup, GlButton, GlTooltip } from '@gitlab/ui';
import isWipLimitsOn from 'ee_else_ce/boards/mixins/is_wip_limits'; import isWipLimitsOn from 'ee_else_ce/boards/mixins/is_wip_limits';
import { n__, s__ } from '~/locale'; import { s__, __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import Tooltip from '~/vue_shared/directives/tooltip'; import Tooltip from '~/vue_shared/directives/tooltip';
import AccessorUtilities from '../../lib/utils/accessor'; import AccessorUtilities from '../../lib/utils/accessor';
...@@ -67,10 +67,13 @@ export default Vue.extend({ ...@@ -67,10 +67,13 @@ export default Vue.extend({
!this.disabled && this.list.type !== ListType.closed && this.list.type !== ListType.blank !this.disabled && this.list.type !== ListType.closed && this.list.type !== ListType.blank
); );
}, },
counterTooltip() { issuesTooltip() {
const { issuesSize } = this.list; const { issuesSize } = this.list;
return `${n__('%d issue', '%d issues', issuesSize)}`;
return sprintf(__('%{issuesSize} issues'), { issuesSize });
}, },
// Only needed to make karma pass.
weightCountToolTip() {}, // eslint-disable-line vue/return-in-computed-property
caretTooltip() { caretTooltip() {
return this.list.isExpanded ? s__('Boards|Collapse') : s__('Boards|Expand'); return this.list.isExpanded ? s__('Boards|Collapse') : s__('Boards|Expand');
}, },
......
...@@ -82,7 +82,7 @@ export default { ...@@ -82,7 +82,7 @@ export default {
}; };
</script> </script>
<template> <template>
<form name="service-credentials-form" @submit.prevent="createRole({ roleArn, externalId })"> <form name="service-credentials-form">
<h2>{{ s__('ClusterIntegration|Authenticate with Amazon Web Services') }}</h2> <h2>{{ s__('ClusterIntegration|Authenticate with Amazon Web Services') }}</h2>
<p> <p>
{{ {{
...@@ -136,6 +136,7 @@ export default { ...@@ -136,6 +136,7 @@ export default {
:disabled="submitButtonDisabled" :disabled="submitButtonDisabled"
:loading="isCreatingRole" :loading="isCreatingRole"
:label="submitButtonLabel" :label="submitButtonLabel"
@click.prevent="createRole({ roleArn, externalId })"
/> />
</form> </form>
</template> </template>
...@@ -235,18 +235,23 @@ export default { ...@@ -235,18 +235,23 @@ export default {
>{{ error.tags.logger }} >{{ error.tags.logger }}
</gl-badge> </gl-badge>
</template> </template>
<h3>{{ __('Error details') }}</h3>
<ul> <ul>
<li v-if="GQLerror.gitlabCommit">
<strong class="bold">{{ __('GitLab commit') }}:</strong>
<gl-link :href="GQLerror.gitlabCommitPath">
<span>{{ GQLerror.gitlabCommit.substr(0, 10) }}</span>
</gl-link>
</li>
<li v-if="error.gitlab_issue"> <li v-if="error.gitlab_issue">
<span class="bold">{{ __('GitLab Issue') }}:</span> <strong class="bold">{{ __('GitLab Issue') }}:</strong>
<gl-link :href="error.gitlab_issue"> <gl-link :href="error.gitlab_issue">
<span>{{ error.gitlab_issue }}</span> <span>{{ error.gitlab_issue }}</span>
</gl-link> </gl-link>
</li> </li>
<li> <li>
<span class="bold">{{ __('Sentry event') }}:</span> <strong class="bold">{{ __('Sentry event') }}:</strong>
<gl-link <gl-link
class="d-inline-flex align-items-center"
v-track-event="trackClickErrorLinkToSentryOptions(GQLerror.externalUrl)" v-track-event="trackClickErrorLinkToSentryOptions(GQLerror.externalUrl)"
:href="GQLerror.externalUrl" :href="GQLerror.externalUrl"
target="_blank" target="_blank"
...@@ -256,25 +261,25 @@ export default { ...@@ -256,25 +261,25 @@ export default {
</gl-link> </gl-link>
</li> </li>
<li v-if="GQLerror.firstReleaseShortVersion"> <li v-if="GQLerror.firstReleaseShortVersion">
<span class="bold">{{ __('First seen') }}:</span> <strong class="bold">{{ __('First seen') }}:</strong>
{{ formatDate(GQLerror.firstSeen) }} {{ formatDate(GQLerror.firstSeen) }}
<gl-link :href="firstReleaseLink" target="_blank"> <gl-link :href="firstReleaseLink" target="_blank">
<span>{{ __('Release') }}: {{ GQLerror.firstReleaseShortVersion }}</span> <span>{{ __('Release') }}: {{ GQLerror.firstReleaseShortVersion.substr(0, 10) }}</span>
</gl-link> </gl-link>
</li> </li>
<li v-if="GQLerror.lastReleaseShortVersion"> <li v-if="GQLerror.lastReleaseShortVersion">
<span class="bold">{{ __('Last seen') }}:</span> <strong class="bold">{{ __('Last seen') }}:</strong>
{{ formatDate(GQLerror.lastSeen) }} {{ formatDate(GQLerror.lastSeen) }}
<gl-link :href="lastReleaseLink" target="_blank"> <gl-link :href="lastReleaseLink" target="_blank">
<span>{{ __('Release') }}: {{ GQLerror.lastReleaseShortVersion }}</span> <span>{{ __('Release') }}: {{ GQLerror.lastReleaseShortVersion.substr(0, 10) }}</span>
</gl-link> </gl-link>
</li> </li>
<li> <li>
<span class="bold">{{ __('Events') }}:</span> <strong class="bold">{{ __('Events') }}:</strong>
<span>{{ GQLerror.count }}</span> <span>{{ GQLerror.count }}</span>
</li> </li>
<li> <li>
<span class="bold">{{ __('Users') }}:</span> <strong class="bold">{{ __('Users') }}:</strong>
<span>{{ GQLerror.userCount }}</span> <span>{{ GQLerror.userCount }}</span>
</li> </li>
</ul> </ul>
......
...@@ -13,6 +13,8 @@ query errorDetails($fullPath: ID!, $errorId: ID!) { ...@@ -13,6 +13,8 @@ query errorDetails($fullPath: ID!, $errorId: ID!) {
externalUrl externalUrl
firstReleaseShortVersion firstReleaseShortVersion
lastReleaseShortVersion lastReleaseShortVersion
gitlabCommit
gitlabCommitPath
} }
} }
} }
...@@ -60,6 +60,11 @@ export default { ...@@ -60,6 +60,11 @@ export default {
); );
} }
}, },
lastCommitMsg() {
this.isCompact =
this.currentActivityView !== activityBarViews.commit && this.lastCommitMsg === '';
},
}, },
methods: { methods: {
...mapActions(['updateActivityBarView']), ...mapActions(['updateActivityBarView']),
......
...@@ -60,7 +60,7 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -60,7 +60,7 @@ class RegistrationsController < Devise::RegistrationsController
end end
def update_registration def update_registration
user_params = params.require(:user).permit(:name, :role, :setup_for_company) user_params = params.require(:user).permit(:role, :setup_for_company)
result = ::Users::SignupService.new(current_user, user_params).execute result = ::Users::SignupService.new(current_user, user_params).execute
if result[:status] == :success if result[:status] == :success
...@@ -152,13 +152,7 @@ class RegistrationsController < Devise::RegistrationsController ...@@ -152,13 +152,7 @@ class RegistrationsController < Devise::RegistrationsController
end end
def sign_up_params def sign_up_params
clean_params = params.require(:user).permit(:username, :email, :email_confirmation, :name, :password) params.require(:user).permit(:username, :email, :email_confirmation, :name, :first_name, :last_name, :password)
if experiment_enabled?(:signup_flow)
clean_params[:name] = clean_params[:username]
end
clean_params
end end
def resource_name def resource_name
......
...@@ -164,9 +164,9 @@ class User < ApplicationRecord ...@@ -164,9 +164,9 @@ class User < ApplicationRecord
# Validations # Validations
# #
# Note: devise :validatable above adds validations for :email and :password # Note: devise :validatable above adds validations for :email and :password
validates :name, presence: true, length: { maximum: 128 } validates :name, presence: true, length: { maximum: 255 }
validates :first_name, length: { maximum: 255 } validates :first_name, length: { maximum: 127 }
validates :last_name, length: { maximum: 255 } validates :last_name, length: { maximum: 127 }
validates :email, confirmation: true validates :email, confirmation: true
validates :notification_email, presence: true validates :notification_email, presence: true
validates :notification_email, devise_email: true, if: ->(user) { user.notification_email != user.email } validates :notification_email, devise_email: true, if: ->(user) { user.notification_email != user.email }
......
...@@ -24,7 +24,8 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ...@@ -24,7 +24,8 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
commits_anchor_data, commits_anchor_data,
branches_anchor_data, branches_anchor_data,
tags_anchor_data, tags_anchor_data,
files_anchor_data files_anchor_data,
releases_anchor_data
].compact.select(&:is_link) ].compact.select(&:is_link)
end end
...@@ -153,6 +154,22 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated ...@@ -153,6 +154,22 @@ class ProjectPresenter < Gitlab::View::Presenter::Delegated
empty_repo? ? nil : project_tree_path(project)) empty_repo? ? nil : project_tree_path(project))
end end
def releases_anchor_data
return unless can?(current_user, :read_release, project)
releases_count = project.releases.count
return if releases_count < 1
AnchorData.new(true,
statistic_icon('rocket') +
n_('%{strong_start}%{release_count}%{strong_end} Release', '%{strong_start}%{release_count}%{strong_end} Releases', releases_count).html_safe % {
release_count: number_with_delimiter(releases_count),
strong_start: '<strong class="project-stat-value">'.html_safe,
strong_end: '</strong>'.html_safe
},
project_releases_path(project))
end
def commits_anchor_data def commits_anchor_data
AnchorData.new(true, AnchorData.new(true,
statistic_icon('commit') + statistic_icon('commit') +
......
...@@ -86,6 +86,8 @@ module Users ...@@ -86,6 +86,8 @@ module Users
:email_confirmation, :email_confirmation,
:password_automatically_set, :password_automatically_set,
:name, :name,
:first_name,
:last_name,
:password, :password,
:username :username
] ]
...@@ -107,6 +109,12 @@ module Users ...@@ -107,6 +109,12 @@ module Users
if user_params[:skip_confirmation].nil? if user_params[:skip_confirmation].nil?
user_params[:skip_confirmation] = skip_user_confirmation_email_from_setting user_params[:skip_confirmation] = skip_user_confirmation_email_from_setting
end end
fallback_name = "#{user_params[:first_name]} #{user_params[:last_name]}"
if user_params[:name].blank? && fallback_name.present?
user_params = user_params.merge(name: fallback_name)
end
end end
if user_default_internal_regex_enabled? && !user_params.key?(:external) if user_default_internal_regex_enabled? && !user_params.key?(:external)
......
- content_for(:page_title, _('Register for GitLab')) - content_for(:page_title, _('Register for GitLab'))
- max_first_name_length = max_last_name_length = 127
- max_username_length = 255 - max_username_length = 255
.signup-box.p-3.mb-2 .signup-box.p-3.mb-2
.signup-body .signup-body
...@@ -7,9 +8,16 @@ ...@@ -7,9 +8,16 @@
= render "devise/shared/error_messages", resource: resource = render "devise/shared/error_messages", resource: resource
- if Feature.enabled?(:invisible_captcha) - if Feature.enabled?(:invisible_captcha)
= invisible_captcha = invisible_captcha
.name.form-row
.col.form-group
= f.label :first_name, _('First name'), for: 'new_user_first_name', class: 'label-bold'
= f.text_field :first_name, class: 'form-control top js-block-emoji js-validate-length', :data => { :max_length => max_first_name_length, :max_length_message => _("First Name is too long (maximum is %{max_length} characters).") % { max_length: max_first_name_length }, :qa_selector => 'new_user_firstname_field' }, required: true, title: _("This field is required.")
.col.form-group
= f.label :last_name, _('Last name'), for: 'new_user_last_name', class: 'label-bold'
= f.text_field :last_name, class: "form-control top js-block-emoji js-validate-length", :data => { :max_length => max_last_name_length, :max_length_message => _("Last Name is too long (maximum is %{max_length} characters).") % { max_length: max_last_name_length }, :qa_selector => 'new_user_lastname_field' }, required: true, title: _("This field is required.")
.username.form-group .username.form-group
= f.label :username, class: 'label-bold' = f.label :username, class: 'label-bold'
= f.text_field :username, class: "form-control middle js-block-emoji js-validate-length js-validate-username", :data => { :max_length => max_username_length, :max_length_message => s_("SignUp|Username is too long (maximum is %{max_length} characters).") % { max_length: max_username_length }, :qa_selector => 'new_user_username_field' }, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, required: true, title: _("Please create a username with only alphanumeric characters.") = f.text_field :username, class: "form-control middle js-block-emoji js-validate-length js-validate-username", :data => { :max_length => max_username_length, :max_length_message => _("Username is too long (maximum is %{max_length} characters).") % { max_length: max_username_length }, :qa_selector => 'new_user_username_field' }, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, required: true, title: _("Please create a username with only alphanumeric characters.")
%p.validation-error.gl-field-error-ignore.field-validation.mt-1.hide.cred= _('Username is already taken.') %p.validation-error.gl-field-error-ignore.field-validation.mt-1.hide.cred= _('Username is already taken.')
%p.validation-success.gl-field-error-ignore.field-validation.mt-1.hide.cgreen= _('Username is available.') %p.validation-success.gl-field-error-ignore.field-validation.mt-1.hide.cgreen= _('Username is available.')
%p.validation-pending.gl-field-error-ignore.field-validation.mt-1.hide= _('Checking username availability...') %p.validation-pending.gl-field-error-ignore.field-validation.mt-1.hide= _('Checking username availability...')
......
- max_name_length = 128 - max_name_length = 255
- max_username_length = 255 - max_username_length = 255
#register-pane.tab-pane.login-box{ role: 'tabpanel' } #register-pane.tab-pane.login-box{ role: 'tabpanel' }
.login-body .login-body
......
- content_for(:page_title, _('Welcome to GitLab @%{username}!') % { username: current_user.username }) - content_for(:page_title, _('Welcome to GitLab %{name}!') % { name: current_user.name })
- max_name_length = 128
.text-center.mb-3 .text-center.mb-3
= _('In order to tailor your experience with GitLab we<br>would like to know a bit more about you.').html_safe = _('In order to tailor your experience with GitLab we<br>would like to know a bit more about you.').html_safe
.signup-box.p-3.mb-2 .signup-box.p-3.mb-2
...@@ -7,9 +6,6 @@ ...@@ -7,9 +6,6 @@
= form_for(current_user, url: users_sign_up_update_registration_path, html: { class: 'new_new_user gl-show-field-errors', 'aria-live' => 'assertive' }) do |f| = form_for(current_user, url: users_sign_up_update_registration_path, html: { class: 'new_new_user gl-show-field-errors', 'aria-live' => 'assertive' }) do |f|
.devise-errors.mt-0 .devise-errors.mt-0
= render 'devise/shared/error_messages', resource: current_user = render 'devise/shared/error_messages', resource: current_user
.name.form-group
= f.label :name, _('Full name'), class: 'label-bold'
= f.text_field :name, class: 'form-control top js-block-emoji js-validate-length', :data => { :max_length => max_name_length, :max_length_message => s_('Name is too long (maximum is %{max_length} characters).') % { max_length: max_name_length }, :qa_selector => 'new_user_name_field' }, required: true, title: _('This field is required.')
.form-group .form-group
= f.label :role, _('Role'), class: 'label-bold' = f.label :role, _('Role'), class: 'label-bold'
= f.select :role, ::User.roles.keys.map { |role| [role.titleize, role] }, {}, class: 'form-control' = f.select :role, ::User.roles.keys.map { |role| [role.titleize, role] }, {}, class: 'form-control'
......
...@@ -42,9 +42,10 @@ ...@@ -42,9 +42,10 @@
%button.board-delete.no-drag.p-0.border-0.has-tooltip.float-right{ type: "button", title: _("Delete list"), ":class": "{ 'd-none': !list.isExpanded }", "aria-label" => _("Delete list"), data: { placement: "bottom" }, "@click.stop" => "deleteBoard" } %button.board-delete.no-drag.p-0.border-0.has-tooltip.float-right{ type: "button", title: _("Delete list"), ":class": "{ 'd-none': !list.isExpanded }", "aria-label" => _("Delete list"), data: { placement: "bottom" }, "@click.stop" => "deleteBoard" }
= icon("trash") = icon("trash")
.issue-count-badge.pr-0.no-drag.text-secondary{ "v-if" => "showBoardListAndBoardInfo", ":title": "counterTooltip", "v-tooltip": true, data: { placement: "top" } } .issue-count-badge.pr-0.no-drag.text-secondary{ "v-if" => "showBoardListAndBoardInfo" }
%span.d-inline-flex %span.d-inline-flex
%span.issue-count-badge-count %gl-tooltip{ ":target" => "() => $refs.issueCount", ":title" => "issuesTooltip" }
%span.issue-count-badge-count{ "ref" => "issueCount" }
%icon.mr-1{ name: "issues" } %icon.mr-1{ name: "issues" }
%issue-count{ ":maxIssueCount" => "list.maxIssueCount", %issue-count{ ":maxIssueCount" => "list.maxIssueCount",
":issuesSize" => "list.issuesSize" } ":issuesSize" => "list.issuesSize" }
......
---
title: Fix unexpected behaviour of the commit form after committing in Web IDE
merge_request: 23238
author:
type: fixed
---
title: Add release count to project homepage
merge_request: 21350
author:
type: added
---
title: 'fix: EKS credentials form does not reset after error'
merge_request: 21958
author:
type: other
---
title: Link to GitLab commit in Sentry error details page
merge_request: 22431
author:
type: added
---
title: Update name max length
merge_request: 22840
author:
type: changed
# GitLab instance administration project # GitLab instance administration project
NOTE: **Note:** NOTE: **Note:**
This feature is not yet available and is [planned for 12.6](https://gitlab.com/gitlab-org/gitlab/issues/32351). This feature is available behind a feature flag called `self_monitoring_project`
since [12.7](https://gitlab.com/gitlab-org/gitlab/issues/32351). The feature flag
will be removed once we [add dashboards to display metrics](https://gitlab.com/groups/gitlab-org/-/epics/2367).
GitLab has been adding the ability for administrators to see insights into the health of GitLab has been adding the ability for administrators to see insights into the health of
their GitLab instance. In order to surface this experience in a native way, similar to how their GitLab instance. In order to surface this experience in a native way, similar to how
......
...@@ -305,7 +305,7 @@ the report JSON unless stated otherwise. Presence of optional fields depends on ...@@ -305,7 +305,7 @@ the report JSON unless stated otherwise. Presence of optional fields depends on
| `vulnerabilities[].location.dependency.package.name` | Name of the package where the vulnerability is located. | | `vulnerabilities[].location.dependency.package.name` | Name of the package where the vulnerability is located. |
| `vulnerabilities[].location.dependency.version` | Version of the vulnerable package. Optional. | | `vulnerabilities[].location.dependency.version` | Version of the vulnerable package. Optional. |
| `vulnerabilities[].location.operating_system` | The operating system that contains the vulnerable package. | | `vulnerabilities[].location.operating_system` | The operating system that contains the vulnerable package. |
| `vulnerabilities[].location.image` | The Docker image that was analyzed. Optional. | | `vulnerabilities[].location.image` | The Docker image that was analyzed. |
| `vulnerabilities[].identifiers` | An ordered array of references that identify a vulnerability on internal or external DBs. | | `vulnerabilities[].identifiers` | An ordered array of references that identify a vulnerability on internal or external DBs. |
| `vulnerabilities[].identifiers[].type` | Type of the identifier. Possible values: common identifier types (among `cve`, `cwe`, `osvdb`, and `usn`). | | `vulnerabilities[].identifiers[].type` | Type of the identifier. Possible values: common identifier types (among `cve`, `cwe`, `osvdb`, and `usn`). |
| `vulnerabilities[].identifiers[].name` | Name of the identifier for display purpose. | | `vulnerabilities[].identifiers[].name` | Name of the identifier for display purpose. |
......
...@@ -13,7 +13,7 @@ The Packages feature allows GitLab to act as a repository for the following: ...@@ -13,7 +13,7 @@ The Packages feature allows GitLab to act as a repository for the following:
| [Conan Repository](conan_repository/index.md) **(PREMIUM)** | The GitLab Conan Repository enables every project in GitLab to have its own space to store [Conan](https://conan.io/) packages. | 12.6+ | | [Conan Repository](conan_repository/index.md) **(PREMIUM)** | The GitLab Conan Repository enables every project in GitLab to have its own space to store [Conan](https://conan.io/) packages. | 12.6+ |
| [Maven Repository](maven_repository/index.md) **(PREMIUM)** | The GitLab Maven Repository enables every project in GitLab to have its own space to store [Maven](https://maven.apache.org/) packages. | 11.3+ | | [Maven Repository](maven_repository/index.md) **(PREMIUM)** | The GitLab Maven Repository enables every project in GitLab to have its own space to store [Maven](https://maven.apache.org/) packages. | 11.3+ |
| [NPM Registry](npm_registry/index.md) **(PREMIUM)** | The GitLab NPM Registry enables every project in GitLab to have its own space to store [NPM](https://www.npmjs.com/) packages. | 11.7+ | | [NPM Registry](npm_registry/index.md) **(PREMIUM)** | The GitLab NPM Registry enables every project in GitLab to have its own space to store [NPM](https://www.npmjs.com/) packages. | 11.7+ |
| [NuGet Repository](nuget_repository/index.md) **(PREMIUM)** | *COMING SOON* The GitLab NuGet Repository will enable every project in GitLab to have its own space to store [NuGet](https://www.nuget.org/) packages. | 12.8+ | | [NuGet Repository](nuget_repository/index.md) **(PREMIUM)** | *PLANNED* The GitLab NuGet Repository will enable every project in GitLab to have its own space to store [NuGet](https://www.nuget.org/) packages. | 12.8+ |
TIP: **Tip:** TIP: **Tip:**
Don't you see your package management system supported yet? Consider contributing Don't you see your package management system supported yet? Consider contributing
......
...@@ -55,13 +55,13 @@ This page has: ...@@ -55,13 +55,13 @@ This page has:
- A link to the Sentry issue. - A link to the Sentry issue.
- Other details about the issue, including a full stack trace. - Other details about the issue, including a full stack trace.
If the error has not been linked to an existing GitLab issue, a 'Create Issue' button will be visible: If the error has not been linked to an existing GitLab issue, a 'Create issue' button will be visible:
![Error Details without Issue Link](img/error_details_v12_6.png) ![Error Details without Issue Link](img/error_details_v12_6.png)
If a link does exist, it will be shown in the details and the 'Create Issue' button will be hidden: If a link does exist, it will be shown in the details and the 'Create issue' button will change to a 'View issue' button:
![Error Details with Issue Link](img/error_details_with_issue_v12_6.png) ![Error Details with Issue Link](img/error_details_with_issue_v12_7.png)
## Taking Action on errors ## Taking Action on errors
...@@ -74,3 +74,9 @@ You can take action on Sentry Errors from within the GitLab UI. ...@@ -74,3 +74,9 @@ You can take action on Sentry Errors from within the GitLab UI.
From within the [Error Details](#error-details) page you can ignore a Sentry error by simply clicking the **Ignore** button near the top of the page. From within the [Error Details](#error-details) page you can ignore a Sentry error by simply clicking the **Ignore** button near the top of the page.
Ignoring an error will prevent it from appearing in the [Error Tracking List](#error-tracking-list), and will silence notifications that were set up within Sentry. Ignoring an error will prevent it from appearing in the [Error Tracking List](#error-tracking-list), and will silence notifications that were set up within Sentry.
### Resolving errors
From within the [Error Details](#error-details) page you can resolve a Sentry error by simply clicking the **Resolve** button near the top of the page.
Marking an error as resolved indicates that the error has stopped firing events. If another event occurs, the error reverts to unresolved.
...@@ -284,6 +284,12 @@ msgstr "" ...@@ -284,6 +284,12 @@ msgstr ""
msgid "%{issuableType} will be removed! Are you sure?" msgid "%{issuableType} will be removed! Are you sure?"
msgstr "" msgstr ""
msgid "%{issuesSize} issues"
msgstr ""
msgid "%{issuesSize} issues with a limit of %{maxIssueCount}"
msgstr ""
msgid "%{label_for_message} unavailable" msgid "%{label_for_message} unavailable"
msgstr "" msgstr ""
...@@ -401,6 +407,11 @@ msgstr[1] "" ...@@ -401,6 +407,11 @@ msgstr[1] ""
msgid "%{strong_start}%{human_size}%{strong_end} Files" msgid "%{strong_start}%{human_size}%{strong_end} Files"
msgstr "" msgstr ""
msgid "%{strong_start}%{release_count}%{strong_end} Release"
msgid_plural "%{strong_start}%{release_count}%{strong_end} Releases"
msgstr[0] ""
msgstr[1] ""
msgid "%{strong_start}%{tag_count}%{strong_end} Tag" msgid "%{strong_start}%{tag_count}%{strong_end} Tag"
msgid_plural "%{strong_start}%{tag_count}%{strong_end} Tags" msgid_plural "%{strong_start}%{tag_count}%{strong_end} Tags"
msgstr[0] "" msgstr[0] ""
...@@ -435,6 +446,9 @@ msgstr "" ...@@ -435,6 +446,9 @@ msgstr ""
msgid "%{title} changes" msgid "%{title} changes"
msgstr "" msgstr ""
msgid "%{totalWeight} total weight"
msgstr ""
msgid "%{total} open issue weight" msgid "%{total} open issue weight"
msgstr "" msgstr ""
...@@ -3299,9 +3313,21 @@ msgstr "" ...@@ -3299,9 +3313,21 @@ msgstr ""
msgid "Checkout" msgid "Checkout"
msgstr "" msgstr ""
msgid "Checkout|$%{selectedPlanPrice} per user per year"
msgstr ""
msgid "Checkout|%{name}'s GitLab subscription"
msgstr ""
msgid "Checkout|%{selectedPlanText} plan" msgid "Checkout|%{selectedPlanText} plan"
msgstr "" msgstr ""
msgid "Checkout|%{startDate} - %{endDate}"
msgstr ""
msgid "Checkout|(x%{numberOfUsers})"
msgstr ""
msgid "Checkout|1. Your profile" msgid "Checkout|1. Your profile"
msgstr "" msgstr ""
...@@ -3338,9 +3364,21 @@ msgstr "" ...@@ -3338,9 +3364,21 @@ msgstr ""
msgid "Checkout|Subscription details" msgid "Checkout|Subscription details"
msgstr "" msgstr ""
msgid "Checkout|Subtotal"
msgstr ""
msgid "Checkout|Tax"
msgstr ""
msgid "Checkout|Total"
msgstr ""
msgid "Checkout|Users" msgid "Checkout|Users"
msgstr "" msgstr ""
msgid "Checkout|Your organization"
msgstr ""
msgid "Checkout|company or team" msgid "Checkout|company or team"
msgstr "" msgstr ""
...@@ -7275,9 +7313,6 @@ msgstr "" ...@@ -7275,9 +7313,6 @@ msgstr ""
msgid "Error deleting project. Check logs for error details." msgid "Error deleting project. Check logs for error details."
msgstr "" msgstr ""
msgid "Error details"
msgstr ""
msgid "Error fetching diverging counts for branches. Please try again." msgid "Error fetching diverging counts for branches. Please try again."
msgstr "" msgstr ""
...@@ -8139,6 +8174,9 @@ msgstr "" ...@@ -8139,6 +8174,9 @@ msgstr ""
msgid "Finished" msgid "Finished"
msgstr "" msgstr ""
msgid "First Name is too long (maximum is %{max_length} characters)."
msgstr ""
msgid "First Seen" msgid "First Seen"
msgstr "" msgstr ""
...@@ -8838,6 +8876,9 @@ msgstr "" ...@@ -8838,6 +8876,9 @@ 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." 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 "" msgstr ""
msgid "GitLab commit"
msgstr ""
msgid "GitLab for Slack" msgid "GitLab for Slack"
msgstr "" msgstr ""
...@@ -10668,6 +10709,9 @@ msgstr "" ...@@ -10668,6 +10709,9 @@ msgstr ""
msgid "Last Accessed On" msgid "Last Accessed On"
msgstr "" msgstr ""
msgid "Last Name is too long (maximum is %{max_length} characters)."
msgstr ""
msgid "Last Pipeline" msgid "Last Pipeline"
msgstr "" msgstr ""
...@@ -11991,9 +12035,6 @@ msgstr "" ...@@ -11991,9 +12035,6 @@ msgstr ""
msgid "Name has already been taken" msgid "Name has already been taken"
msgstr "" msgstr ""
msgid "Name is too long (maximum is %{max_length} characters)."
msgstr ""
msgid "Name new label" msgid "Name new label"
msgstr "" msgstr ""
...@@ -20461,6 +20502,9 @@ msgstr "" ...@@ -20461,6 +20502,9 @@ msgstr ""
msgid "Username is available." msgid "Username is available."
msgstr "" msgstr ""
msgid "Username is too long (maximum is %{max_length} characters)."
msgstr ""
msgid "Username or email" msgid "Username or email"
msgstr "" msgstr ""
...@@ -20835,7 +20879,7 @@ msgstr "" ...@@ -20835,7 +20879,7 @@ msgstr ""
msgid "Welcome to GitLab" msgid "Welcome to GitLab"
msgstr "" msgstr ""
msgid "Welcome to GitLab @%{username}!" msgid "Welcome to GitLab %{name}!"
msgstr "" msgstr ""
msgid "Welcome to the Guided GitLab Tour" msgid "Welcome to the Guided GitLab Tour"
......
...@@ -306,6 +306,23 @@ describe RegistrationsController do ...@@ -306,6 +306,23 @@ describe RegistrationsController do
expect(subject.current_user).not_to be_nil expect(subject.current_user).not_to be_nil
end end
context 'with the experimental signup flow enabled and the user is part of the experimental group' do
before do
stub_experiment(signup_flow: true)
stub_experiment_for_user(signup_flow: true)
end
let(:base_user_params) { { first_name: 'First', last_name: 'Last', username: 'new_username', email: 'new@user.com', password: 'Any_password' } }
it 'sets name from first and last name' do
post :create, params: { new_user: base_user_params }
expect(User.last.first_name).to eq(base_user_params[:first_name])
expect(User.last.last_name).to eq(base_user_params[:last_name])
expect(User.last.name).to eq("#{base_user_params[:first_name]} #{base_user_params[:last_name]}")
end
end
end end
describe '#destroy' do describe '#destroy' do
...@@ -395,7 +412,7 @@ describe RegistrationsController do ...@@ -395,7 +412,7 @@ describe RegistrationsController do
label: anything, label: anything,
property: 'experimental_group' property: 'experimental_group'
) )
patch :update_registration, params: { user: { name: 'New name', role: 'software_developer', setup_for_company: 'false' } } patch :update_registration, params: { user: { role: 'software_developer', setup_for_company: 'false' } }
end end
end end
end end
...@@ -123,50 +123,6 @@ shared_examples 'Signup' do ...@@ -123,50 +123,6 @@ shared_examples 'Signup' do
end end
end end
describe 'user\'s full name validation', :js do
before do
if Gitlab::Experimentation.enabled?(:signup_flow)
user = create(:user, role: nil)
sign_in(user)
visit users_sign_up_welcome_path
@user_name_field = 'user_name'
else
visit new_user_registration_path
@user_name_field = 'new_user_name'
end
end
it 'does not show an error border if the user\'s fullname length is not longer than 128 characters' do
fill_in @user_name_field, with: 'u' * 128
expect(find('.name')).not_to have_css '.gl-field-error-outline'
end
it 'shows an error border if the user\'s fullname contains an emoji' do
simulate_input("##{@user_name_field}", 'Ehsan 🦋')
expect(find('.name')).to have_css '.gl-field-error-outline'
end
it 'shows an error border if the user\'s fullname is longer than 128 characters' do
fill_in @user_name_field, with: 'n' * 129
expect(find('.name')).to have_css '.gl-field-error-outline'
end
it 'shows an error message if the user\'s fullname is longer than 128 characters' do
fill_in @user_name_field, with: 'n' * 129
expect(page).to have_content("Name is too long (maximum is 128 characters).")
end
it 'shows an error message if the username contains emojis' do
simulate_input("##{@user_name_field}", 'Ehsan 🦋')
expect(page).to have_content("Invalid input, please avoid emojis")
end
end
context 'with no errors' do context 'with no errors' do
context 'when sending confirmation email' do context 'when sending confirmation email' do
before do before do
...@@ -184,7 +140,10 @@ shared_examples 'Signup' do ...@@ -184,7 +140,10 @@ shared_examples 'Signup' do
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email fill_in 'new_user_email_confirmation', with: new_user.email
end end
...@@ -209,7 +168,10 @@ shared_examples 'Signup' do ...@@ -209,7 +168,10 @@ shared_examples 'Signup' do
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email fill_in 'new_user_email_confirmation', with: new_user.email
end end
...@@ -235,7 +197,10 @@ shared_examples 'Signup' do ...@@ -235,7 +197,10 @@ shared_examples 'Signup' do
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email.capitalize fill_in 'new_user_email_confirmation', with: new_user.email.capitalize
end end
...@@ -263,7 +228,10 @@ shared_examples 'Signup' do ...@@ -263,7 +228,10 @@ shared_examples 'Signup' do
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email fill_in 'new_user_email_confirmation', with: new_user.email
end end
...@@ -287,7 +255,10 @@ shared_examples 'Signup' do ...@@ -287,7 +255,10 @@ shared_examples 'Signup' do
visit new_user_registration_path visit new_user_registration_path
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
end end
...@@ -313,7 +284,10 @@ shared_examples 'Signup' do ...@@ -313,7 +284,10 @@ shared_examples 'Signup' do
visit new_user_registration_path visit new_user_registration_path
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
end end
...@@ -338,7 +312,10 @@ shared_examples 'Signup' do ...@@ -338,7 +312,10 @@ shared_examples 'Signup' do
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email fill_in 'new_user_email_confirmation', with: new_user.email
end end
...@@ -357,7 +334,10 @@ shared_examples 'Signup' do ...@@ -357,7 +334,10 @@ shared_examples 'Signup' do
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email fill_in 'new_user_email_confirmation', with: new_user.email
end end
...@@ -394,7 +374,10 @@ shared_examples 'Signup' do ...@@ -394,7 +374,10 @@ shared_examples 'Signup' do
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
unless Gitlab::Experimentation.enabled?(:signup_flow) if Gitlab::Experimentation.enabled?(:signup_flow)
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
else
fill_in 'new_user_name', with: new_user.name fill_in 'new_user_name', with: new_user.name
fill_in 'new_user_email_confirmation', with: new_user.email fill_in 'new_user_email_confirmation', with: new_user.email
end end
...@@ -412,6 +395,44 @@ shared_examples 'Signup' do ...@@ -412,6 +395,44 @@ shared_examples 'Signup' do
end end
end end
shared_examples 'Signup name validation' do |field, max_length|
before do
visit new_user_registration_path
end
describe "#{field} validation", :js do
it "does not show an error border if the user's fullname length is not longer than #{max_length} characters" do
fill_in field, with: 'u' * max_length
expect(find('.name')).not_to have_css '.gl-field-error-outline'
end
it 'shows an error border if the user\'s fullname contains an emoji' do
simulate_input("##{field}", 'Ehsan 🦋')
expect(find('.name')).to have_css '.gl-field-error-outline'
end
it "shows an error border if the user\'s fullname is longer than #{max_length} characters" do
fill_in field, with: 'n' * (max_length + 1)
expect(find('.name')).to have_css '.gl-field-error-outline'
end
it "shows an error message if the user\'s fullname is longer than #{max_length} characters" do
fill_in field, with: 'n' * (max_length + 1)
expect(page).to have_content("Name is too long (maximum is #{max_length} characters).")
end
it 'shows an error message if the username contains emojis' do
simulate_input("##{field}", 'Ehsan 🦋')
expect(page).to have_content("Invalid input, please avoid emojis")
end
end
end
describe 'With original flow' do describe 'With original flow' do
before do before do
stub_experiment(signup_flow: false) stub_experiment(signup_flow: false)
...@@ -419,6 +440,7 @@ describe 'With original flow' do ...@@ -419,6 +440,7 @@ describe 'With original flow' do
end end
it_behaves_like 'Signup' it_behaves_like 'Signup'
it_behaves_like 'Signup name validation', 'new_user_name', 255
end end
describe 'With experimental flow' do describe 'With experimental flow' do
...@@ -428,11 +450,15 @@ describe 'With experimental flow' do ...@@ -428,11 +450,15 @@ describe 'With experimental flow' do
end end
it_behaves_like 'Signup' it_behaves_like 'Signup'
it_behaves_like 'Signup name validation', 'new_user_first_name', 127
it_behaves_like 'Signup name validation', 'new_user_last_name', 127
describe 'when role is required' do describe 'when role is required' do
it 'after registering, it redirects to step 2 of the signup process, sets the name and role and then redirects to the original requested url' do it 'after registering, it redirects to step 2 of the signup process, sets the name and role and then redirects to the original requested url' do
new_user = build_stubbed(:user) new_user = build_stubbed(:user)
visit new_user_registration_path visit new_user_registration_path
fill_in 'new_user_first_name', with: new_user.first_name
fill_in 'new_user_last_name', with: new_user.last_name
fill_in 'new_user_username', with: new_user.username fill_in 'new_user_username', with: new_user.username
fill_in 'new_user_email', with: new_user.email fill_in 'new_user_email', with: new_user.email
fill_in 'new_user_password', with: new_user.password fill_in 'new_user_password', with: new_user.password
...@@ -441,13 +467,11 @@ describe 'With experimental flow' do ...@@ -441,13 +467,11 @@ describe 'With experimental flow' do
expect(page).to have_current_path(users_sign_up_welcome_path) expect(page).to have_current_path(users_sign_up_welcome_path)
fill_in 'user_name', with: 'New name'
select 'Software Developer', from: 'user_role' select 'Software Developer', from: 'user_role'
choose 'user_setup_for_company_true' choose 'user_setup_for_company_true'
click_button 'Get started!' click_button 'Get started!'
new_user = User.find_by_username(new_user.username) new_user = User.find_by_username(new_user.username)
expect(new_user.name).to eq 'New name'
expect(new_user.software_developer_role?).to be_truthy expect(new_user.software_developer_role?).to be_truthy
expect(new_user.setup_for_company).to be_truthy expect(new_user.setup_for_company).to be_truthy
expect(page).to have_current_path(new_project_path) expect(page).to have_current_path(new_project_path)
......
...@@ -50,7 +50,6 @@ describe('Issue card component', () => { ...@@ -50,7 +50,6 @@ describe('Issue card component', () => {
rootPath: '/', rootPath: '/',
}, },
store, store,
attachToDocument: true,
}); });
}); });
......
...@@ -47,7 +47,6 @@ describe('ServiceCredentialsForm', () => { ...@@ -47,7 +47,6 @@ describe('ServiceCredentialsForm', () => {
const findCopyExternalIdButton = () => vm.find('.js-copy-external-id-button'); const findCopyExternalIdButton = () => vm.find('.js-copy-external-id-button');
const findInvalidCredentials = () => vm.find('.js-invalid-credentials'); const findInvalidCredentials = () => vm.find('.js-invalid-credentials');
const findSubmitButton = () => vm.find(LoadingButton); const findSubmitButton = () => vm.find(LoadingButton);
const findForm = () => vm.find('form[name="service-credentials-form"]');
it('displays provided account id', () => { it('displays provided account id', () => {
expect(findAccountIdInput().attributes('value')).toBe(accountId); expect(findAccountIdInput().attributes('value')).toBe(accountId);
...@@ -77,8 +76,10 @@ describe('ServiceCredentialsForm', () => { ...@@ -77,8 +76,10 @@ describe('ServiceCredentialsForm', () => {
}); });
}); });
it('dispatches createRole action when form is submitted', () => { it('dispatches createRole action when submit button is clicked', () => {
findForm().trigger('submit'); vm.setData({ roleArn: '123' }); // set role ARN to enable button
findSubmitButton().vm.$emit('click', new Event('click'));
expect(createRoleAction).toHaveBeenCalled(); expect(createRoleAction).toHaveBeenCalled();
}); });
......
...@@ -10,7 +10,6 @@ const createComponent = props => ...@@ -10,7 +10,6 @@ const createComponent = props =>
propsData: { propsData: {
...props, ...props,
}, },
attachToDocument: true,
}); });
describe('Limit warning component', () => { describe('Limit warning component', () => {
......
...@@ -246,5 +246,37 @@ describe('ErrorDetails', () => { ...@@ -246,5 +246,37 @@ describe('ErrorDetails', () => {
}); });
}); });
}); });
describe('GitLab commit link', () => {
const gitlabCommit = '7975be0116940bf2ad4321f79d02a55c5f7779aa';
const gitlabCommitPath =
'/gitlab-org/gitlab-test/commit/7975be0116940bf2ad4321f79d02a55c5f7779aa';
const findGitLabCommitLink = () => wrapper.find(`[href$="${gitlabCommitPath}"]`);
it('should display a link', () => {
mocks.$apollo.queries.GQLerror.loading = false;
wrapper.setData({
GQLerror: {
gitlabCommit,
gitlabCommitPath,
},
});
return wrapper.vm.$nextTick().then(() => {
expect(findGitLabCommitLink().exists()).toBe(true);
});
});
it('should display a link', () => {
mocks.$apollo.queries.GQLerror.loading = false;
wrapper.setData({
GQLerror: {
gitlabCommit: null,
},
});
return wrapper.vm.$nextTick().then(() => {
expect(findGitLabCommitLink().exists()).toBe(false);
});
});
});
}); });
}); });
...@@ -13,7 +13,6 @@ describe('Erased block', () => { ...@@ -13,7 +13,6 @@ describe('Erased block', () => {
const createComponent = props => { const createComponent = props => {
wrapper = mount(ErasedBlock, { wrapper = mount(ErasedBlock, {
propsData: props, propsData: props,
attachToDocument: true,
}); });
}; };
......
...@@ -35,7 +35,6 @@ describe('DiscussionActions', () => { ...@@ -35,7 +35,6 @@ describe('DiscussionActions', () => {
shouldShowJumpToNextDiscussion: true, shouldShowJumpToNextDiscussion: true,
...props, ...props,
}, },
attachToDocument: true,
}); });
}; };
......
...@@ -31,7 +31,6 @@ describe('Release detail component', () => { ...@@ -31,7 +31,6 @@ describe('Release detail component', () => {
wrapper = mount(ReleaseDetailApp, { wrapper = mount(ReleaseDetailApp, {
store, store,
attachToDocument: true,
}); });
return wrapper.vm.$nextTick(); return wrapper.vm.$nextTick();
......
...@@ -76,6 +76,25 @@ describe('IDE commit form', () => { ...@@ -76,6 +76,25 @@ describe('IDE commit form', () => {
done(); done();
}); });
}); });
it('collapses if lastCommitMsg is set to empty and current view is not commit view', done => {
store.state.lastCommitMsg = 'abc';
store.state.currentActivityView = activityBarViews.edit;
vm.$nextTick(() => {
// if commit message is set, form is uncollapsed
expect(vm.isCompact).toBe(false);
store.state.lastCommitMsg = '';
vm.$nextTick(() => {
// collapsed when set to empty
expect(vm.isCompact).toBe(true);
done();
});
});
});
}); });
describe('full', () => { describe('full', () => {
......
...@@ -147,15 +147,15 @@ describe User, :do_not_mock_admin_mode do ...@@ -147,15 +147,15 @@ describe User, :do_not_mock_admin_mode do
describe 'name' do describe 'name' do
it { is_expected.to validate_presence_of(:name) } it { is_expected.to validate_presence_of(:name) }
it { is_expected.to validate_length_of(:name).is_at_most(128) } it { is_expected.to validate_length_of(:name).is_at_most(255) }
end end
describe 'first name' do describe 'first name' do
it { is_expected.to validate_length_of(:first_name).is_at_most(255) } it { is_expected.to validate_length_of(:first_name).is_at_most(127) }
end end
describe 'last name' do describe 'last name' do
it { is_expected.to validate_length_of(:last_name).is_at_most(255) } it { is_expected.to validate_length_of(:last_name).is_at_most(127) }
end end
describe 'username' do describe 'username' do
......
This diff is collapsed.
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