diff options
-rw-r--r-- | app/views/admin/application_settings/_repository_mirrors_form.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/application_settings/repository.html.haml | 4 | ||||
-rw-r--r-- | changelogs/unreleased/7104-show-timeframe-dates-in-epics-list.yml | 5 | ||||
-rw-r--r-- | changelogs/unreleased/jramsay-admin-mirror-helptext.yml | 5 | ||||
-rw-r--r-- | doc/api/settings.md | 2 | ||||
-rw-r--r-- | doc/development/changelog.md | 5 | ||||
-rw-r--r-- | doc/development/feature_flags/development.md | 3 | ||||
-rw-r--r-- | doc/development/testing_guide/frontend_testing.md | 44 | ||||
-rw-r--r-- | doc/user/group/epics/img/epics_list_view_v12.3.png | bin | 39450 -> 0 bytes | |||
-rw-r--r-- | doc/user/group/epics/img/epics_list_view_v12.5.png | bin | 0 -> 442541 bytes | |||
-rw-r--r-- | doc/user/group/epics/index.md | 2 | ||||
-rw-r--r-- | doc/user/group/index.md | 5 | ||||
-rw-r--r-- | doc/workflow/notifications.md | 6 | ||||
-rw-r--r-- | locale/gitlab.pot | 12 | ||||
-rw-r--r-- | spec/features/projects/members/user_requests_access_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/experimentation_spec.rb | 6 |
16 files changed, 82 insertions, 23 deletions
diff --git a/app/views/admin/application_settings/_repository_mirrors_form.html.haml b/app/views/admin/application_settings/_repository_mirrors_form.html.haml index 362f4a42464..6e5fa6eb62c 100644 --- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml +++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml @@ -7,9 +7,9 @@ .form-check = f.check_box :mirror_available, class: 'form-check-input' = f.label :mirror_available, class: 'form-check-label' do - = _('Allow mirrors to be set up for projects') + = _('Allow repository mirroring to be configured by project maintainers') %span.form-text.text-muted - = _('If disabled, only admins will be able to set up mirrors in projects.') + = _('If disabled, only admins will be able to configure repository mirroring.') = link_to icon('question-circle'), help_page_path('workflow/repository_mirroring') = render_if_exists 'admin/application_settings/mirror_settings', form: f diff --git a/app/views/admin/application_settings/repository.html.haml b/app/views/admin/application_settings/repository.html.haml index 25f8b6541b5..b0934a9d9fb 100644 --- a/app/views/admin/application_settings/repository.html.haml +++ b/app/views/admin/application_settings/repository.html.haml @@ -5,11 +5,11 @@ %section.settings.as-mirror.no-animate#js-mirror-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4 - = _('Repository mirror') + = _('Repository mirroring') %button.btn.js-settings-toggle{ type: 'button' } = expanded_by_default? ? 'Collapse' : 'Expand' %p - = _('Configure push mirrors.') + = _('Configure repository mirroring.') .settings-content = render partial: 'repository_mirrors_form' diff --git a/changelogs/unreleased/7104-show-timeframe-dates-in-epics-list.yml b/changelogs/unreleased/7104-show-timeframe-dates-in-epics-list.yml new file mode 100644 index 00000000000..529c3858fad --- /dev/null +++ b/changelogs/unreleased/7104-show-timeframe-dates-in-epics-list.yml @@ -0,0 +1,5 @@ +--- +title: Show start and end dates in Epics list page +merge_request: 19006 +author: +type: added diff --git a/changelogs/unreleased/jramsay-admin-mirror-helptext.yml b/changelogs/unreleased/jramsay-admin-mirror-helptext.yml new file mode 100644 index 00000000000..56e1f6ca45b --- /dev/null +++ b/changelogs/unreleased/jramsay-admin-mirror-helptext.yml @@ -0,0 +1,5 @@ +--- +title: Improve instance mirroring help text +merge_request: 19047 +author: +type: other diff --git a/doc/api/settings.md b/doc/api/settings.md index c650c31eb41..36419ae8ec4 100644 --- a/doc/api/settings.md +++ b/doc/api/settings.md @@ -270,7 +270,7 @@ are listed in the descriptions of the relevant settings. | `metrics_port` | integer | required by: `metrics_enabled` | The UDP port to use for connecting to InfluxDB. | | `metrics_sample_interval` | integer | required by: `metrics_enabled` | The sampling interval in seconds. | | `metrics_timeout` | integer | required by: `metrics_enabled` | The amount of seconds after which InfluxDB will time out. | -| `mirror_available` | boolean | no | Allow mirrors to be set up for projects. If disabled, only admins will be able to set up mirrors in projects. | +| `mirror_available` | boolean | no | Allow repository mirroring to configured by project Maintainers. If disabled, only Admins will be able to configure repository mirroring. | | `mirror_capacity_threshold` | integer | no | **(PREMIUM)** Minimum capacity to be available before scheduling more mirrors preemptively | | `mirror_max_capacity` | integer | no | **(PREMIUM)** Maximum number of mirrors that can be synchronizing at the same time. | | `mirror_max_delay` | integer | no | **(PREMIUM)** Maximum time (in minutes) between updates that a mirror can have when scheduled to synchronize. | diff --git a/doc/development/changelog.md b/doc/development/changelog.md index 8ded3f393ee..af2c540cca5 100644 --- a/doc/development/changelog.md +++ b/doc/development/changelog.md @@ -41,7 +41,10 @@ the `author` field. GitLab team members **should not**. a changelog entry regardless of these guidelines if the contributor wants one. Example: "Fixed a typo on the search results page." - Any docs-only changes **should not** have a changelog entry. -- Any change behind a feature flag **should not** have a changelog entry. The entry should be added [in the merge request removing the feature flags](feature_flags/development.md). +- Any change behind a feature flag **should not** have a changelog entry. The + entry should be added [in the merge request removing the feature flags](feature_flags/development.md). + If the change includes a database migration, there should be a changelog entry + for the migration change. - A fix for a regression introduced and then fixed in the same release (i.e., fixing a bug introduced during a monthly release candidate) **should not** have a changelog entry. diff --git a/doc/development/feature_flags/development.md b/doc/development/feature_flags/development.md index 929c9b1c71c..de8098434c2 100644 --- a/doc/development/feature_flags/development.md +++ b/doc/development/feature_flags/development.md @@ -25,7 +25,8 @@ end Features that are developed and are intended to be merged behind a feature flag should not include a changelog entry. The entry should be added in the merge -request removing the feature flags. +request removing the feature flag. If the feature contains any DB migration it +should include a changelog entry for DB changes. In the rare case that you need the feature flag to be on automatically, use `default_enabled: true` when checking: diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index 314995ca9b3..d0669c5ebd4 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -119,6 +119,50 @@ Global mocks introduce magic and can affect how modules are imported in your tes When in doubt, construct mocks in your test file using [`jest.mock()`](https://jestjs.io/docs/en/jest-object#jestmockmodulename-factory-options), [`jest.spyOn()`](https://jestjs.io/docs/en/jest-object#jestspyonobject-methodname), etc. +### Data-driven tests + +Similar to [RSpec's parameterized tests](best_practices.md#table-based--parameterized-tests), +Jest supports data-driven tests for: + +- Individual tests using [`test.each`](https://jestjs.io/docs/en/api#testeachtable-name-fn-timeout) (aliased to `it.each`). +- Groups of tests using [`describe.each`](https://jestjs.io/docs/en/api#describeeachtable-name-fn-timeout). + +These can be useful for reducing repetition within tests. Each option can take an array of +data values or a tagged template literal. + +For example: + +```javascript +// function to test +const icon = status => status ? 'pipeline-passed' : 'pipeline-failed' +const message = status => status ? 'pipeline-passed' : 'pipeline-failed' + +// test with array block +it.each([ + [false, 'pipeline-failed'], + [true, 'pipeline-passed'] +])('icon with %s will return %s', + (status, icon) => { + expect(renderPipeline(status)).toEqual(icon) + } +); + +// test suite with tagged template literal block +describe.each` + status | icon | message + ${false} | ${'pipeline-failed'} | ${'Pipeline failed - boo-urns'} + ${true} | ${'pipeline-passed'} | ${'Pipeline succeeded - win!'} +`('pipeline component', ({ status, icon, message }) => { + it(`returns icon ${icon} with status ${status}`, () => { + expect(icon(status)).toEqual(message) + }) + + it(`returns message ${message} with status ${status}`, () => { + expect(message(status)).toEqual(message) + }) +}); +``` + ## Karma test suite GitLab uses the [Karma][karma] test runner with [Jasmine] as its test diff --git a/doc/user/group/epics/img/epics_list_view_v12.3.png b/doc/user/group/epics/img/epics_list_view_v12.3.png Binary files differdeleted file mode 100644 index c6817a503e7..00000000000 --- a/doc/user/group/epics/img/epics_list_view_v12.3.png +++ /dev/null diff --git a/doc/user/group/epics/img/epics_list_view_v12.5.png b/doc/user/group/epics/img/epics_list_view_v12.5.png Binary files differnew file mode 100644 index 00000000000..2520ee67abc --- /dev/null +++ b/doc/user/group/epics/img/epics_list_view_v12.5.png diff --git a/doc/user/group/epics/index.md b/doc/user/group/epics/index.md index 55f337f982d..6f8cc04adf8 100644 --- a/doc/user/group/epics/index.md +++ b/doc/user/group/epics/index.md @@ -10,7 +10,7 @@ Epics let you manage your portfolio of projects more efficiently and with less effort by tracking groups of issues that share a theme, across projects and milestones. -![epics list view](img/epics_list_view_v12.3.png) +![epics list view](img/epics_list_view_v12.5.png) ## Use cases diff --git a/doc/user/group/index.md b/doc/user/group/index.md index c4be08c842b..b7f6cec3866 100644 --- a/doc/user/group/index.md +++ b/doc/user/group/index.md @@ -421,8 +421,9 @@ Define project templates at a group level by setting a group as the template sou #### Disabling email notifications -You can disable all email notifications related to the group, which also includes -it's subgroups and projects. +> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/23585) in GitLab 12.2. + +You can disable all email notifications related to the group, which includes its subgroups and projects. To enable this feature: diff --git a/doc/workflow/notifications.md b/doc/workflow/notifications.md index d619c870c5e..814accf3670 100644 --- a/doc/workflow/notifications.md +++ b/doc/workflow/notifications.md @@ -51,8 +51,8 @@ Organization like this is suitable for users that belong to different groups but same need for being notified for every group they are member of. These settings can be configured on group page under the name of the group. It will be the dropdown with the bell icon. They can also be configured on the user profile notifications dropdown. -The group owner can disable email notifications for a group, which also includes -it's subgroups and projects. If this is the case, you will not receive any corresponding notifications, +The group owner can disable email notifications for a group, which includes +its subgroups and projects. If this is the case, you will not receive any corresponding notifications, and the notification button will be disabled with an explanatory tooltip. ### Project Settings @@ -64,7 +64,7 @@ other setting. This is suitable for users that have different needs for notifications per project basis. These settings can be configured on project page under the name of the project. It will be the dropdown with the bell icon. They can also be configured on the user profile notifications dropdown. -The project owner (or it's group owner) can disable email notifications for the project. +The project owner (or its group owner) can disable email notifications for the project. If this is the case, you will not receive any corresponding notifications, and the notification button will be disabled with an explanatory tooltip. diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 5506b8ab805..7eb6d211cb7 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -1404,9 +1404,6 @@ msgstr "" msgid "Allow group owners to manage LDAP-related settings" msgstr "" -msgid "Allow mirrors to be set up for projects" -msgstr "" - msgid "Allow only the selected protocols to be used for Git access." msgstr "" @@ -1419,6 +1416,9 @@ msgstr "" msgid "Allow rendering of PlantUML diagrams in Asciidoc documents." msgstr "" +msgid "Allow repository mirroring to be configured by project maintainers" +msgstr "" + msgid "Allow requests to the local network from hooks and services." msgstr "" @@ -4328,7 +4328,7 @@ msgstr "" msgid "Configure paths to be protected by Rack Attack. A web server restart is required after changing these settings." msgstr "" -msgid "Configure push mirrors." +msgid "Configure repository mirroring." msgstr "" msgid "Configure storage path settings." @@ -8794,7 +8794,7 @@ msgstr "" msgid "If disabled, a diverged local branch will not be automatically updated with commits from its remote counterpart, to prevent local data loss. If the default branch (%{default_branch}) has diverged and cannot be updated, mirroring will fail. Other diverged branches are silently ignored." msgstr "" -msgid "If disabled, only admins will be able to set up mirrors in projects." +msgid "If disabled, only admins will be able to configure repository mirroring." msgstr "" msgid "If disabled, the access level will depend on the user's permissions in the project." @@ -13948,7 +13948,7 @@ msgstr "" msgid "Repository maintenance" msgstr "" -msgid "Repository mirror" +msgid "Repository mirroring" msgstr "" msgid "Repository static objects" diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index a77f0bdcbe9..7e7faca9741 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -26,7 +26,6 @@ describe 'Projects > Members > User requests access', :js do expect(ActionMailer::Base.deliveries.last.subject).to eq "Request to join the #{project.full_name} project" expect(project.requesters.exists?(user_id: user)).to be_truthy - expect(page).to have_content 'Your request for access has been queued for review.' expect(page).to have_content 'Withdraw Access Request' expect(page).not_to have_content 'Leave Project' @@ -64,7 +63,6 @@ describe 'Projects > Members > User requests access', :js do accept_confirm { click_link 'Withdraw Access Request' } - expect(page).to have_content 'Your access request to the project has been withdrawn.' expect(page).not_to have_content 'Withdraw Access Request' expect(page).to have_content 'Request Access' end diff --git a/spec/lib/gitlab/experimentation_spec.rb b/spec/lib/gitlab/experimentation_spec.rb index 725c23e913c..cceeb15b05d 100644 --- a/spec/lib/gitlab/experimentation_spec.rb +++ b/spec/lib/gitlab/experimentation_spec.rb @@ -74,7 +74,8 @@ describe Gitlab::Experimentation do describe 'URL parameter to force enable experiment' do context 'is not present' do - it 'returns false' do + # Disabled until https://gitlab.com/gitlab-org/gitlab/issues/34942 is solved properly + xit 'returns false' do get :index, params: { force_experiment: :test_experiment2 } expect(controller.experiment_enabled?(:test_experiment)).to be_falsey @@ -82,7 +83,8 @@ describe Gitlab::Experimentation do end context 'is present' do - it 'returns true' do + # Disabled until https://gitlab.com/gitlab-org/gitlab/issues/34942 is solved properly + xit 'returns true' do get :index, params: { force_experiment: :test_experiment } expect(controller.experiment_enabled?(:test_experiment)).to be_truthy |