From 6b3bc1ad3535002bdc8c9ba6fd7be2aaee7a520a Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 24 Aug 2022 03:11:32 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../components/cells/runner_summary_cell.vue | 4 +- .../work_item_links/work_item_links.vue | 14 ++-- ...43209_i_quickactions_attention_monthly.yml | 4 +- ..._quickactions_remove_attention_monthly.yml | 4 +- ...143201_i_quickactions_attention_weekly.yml | 4 +- ...i_quickactions_remove_attention_weekly.yml | 4 +- .../testing_guide/frontend_testing.md | 2 +- doc/user/tasks.md | 10 +-- .../known_events/quickactions.yml | 8 --- locale/gitlab.pot | 16 ++--- .../ci_variable/prefill_variables_spec.rb | 72 +++++++++++++++++++ .../issues/user_interacts_with_awards_spec.rb | 4 ++ .../work_items/work_item_children_spec.rb | 12 ++-- 13 files changed, 115 insertions(+), 43 deletions(-) create mode 100644 qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb diff --git a/app/assets/javascripts/runner/components/cells/runner_summary_cell.vue b/app/assets/javascripts/runner/components/cells/runner_summary_cell.vue index 28e8838c937..a81bcbf1af9 100644 --- a/app/assets/javascripts/runner/components/cells/runner_summary_cell.vue +++ b/app/assets/javascripts/runner/components/cells/runner_summary_cell.vue @@ -53,11 +53,11 @@ export default { - + {{ description }} diff --git a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue index 695010dae20..b13162a81d5 100644 --- a/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue +++ b/app/assets/javascripts/work_items/components/work_item_links/work_item_links.vue @@ -108,9 +108,7 @@ export default { return this.isOpen ? 'chevron-lg-up' : 'chevron-lg-down'; }, toggleLabel() { - return this.isOpen - ? s__('WorkItem|Collapse child items') - : s__('WorkItem|Expand child items'); + return this.isOpen ? s__('WorkItem|Collapse tasks') : s__('WorkItem|Expand tasks'); }, issuableGid() { return this.issuableId ? convertToGraphQLId(TYPE_WORK_ITEM, this.issuableId) : null; @@ -246,14 +244,12 @@ export default { }, }, i18n: { - title: s__('WorkItem|Child items'), - fetchError: s__( - 'WorkItem|Something went wrong when fetching the items list. Please refresh this page.', - ), + title: s__('WorkItem|Tasks'), + fetchError: s__('WorkItem|Something went wrong when fetching tasks. Please refresh this page.'), emptyStateMessage: s__( - 'WorkItem|No child items are currently assigned. Use child items to prioritize tasks that your team should complete in order to accomplish your goals!', + 'WorkItem|No tasks are currently assigned. Use tasks to break down this issue into smaller parts.', ), - addChildButtonLabel: s__('WorkItem|Add a task'), + addChildButtonLabel: s__('WorkItem|Add'), }, WIDGET_TYPE_TASK_ICON: WIDGET_ICONS.TASK, WORK_ITEM_STATUS_TEXT, diff --git a/config/metrics/counts_28d/20220131143209_i_quickactions_attention_monthly.yml b/config/metrics/counts_28d/20220131143209_i_quickactions_attention_monthly.yml index f3fa80b4f25..7be45e79f51 100644 --- a/config/metrics/counts_28d/20220131143209_i_quickactions_attention_monthly.yml +++ b/config/metrics/counts_28d/20220131143209_i_quickactions_attention_monthly.yml @@ -6,7 +6,9 @@ product_stage: create product_group: code_review product_category: code_review value_type: number -status: active +status: removed +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95241/ +milestone_removed: '15.4' milestone: '14.8' introduced_by_url: time_frame: 28d diff --git a/config/metrics/counts_28d/20220131153230_i_quickactions_remove_attention_monthly.yml b/config/metrics/counts_28d/20220131153230_i_quickactions_remove_attention_monthly.yml index 773fc5564bb..2b002bc3790 100644 --- a/config/metrics/counts_28d/20220131153230_i_quickactions_remove_attention_monthly.yml +++ b/config/metrics/counts_28d/20220131153230_i_quickactions_remove_attention_monthly.yml @@ -6,7 +6,9 @@ product_stage: create product_group: code_review product_category: code_review value_type: number -status: active +status: removed +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95241/ +milestone_removed: '15.4' milestone: '14.8' introduced_by_url: time_frame: 28d diff --git a/config/metrics/counts_7d/20220131143201_i_quickactions_attention_weekly.yml b/config/metrics/counts_7d/20220131143201_i_quickactions_attention_weekly.yml index 3e47fca1265..ec725e331e9 100644 --- a/config/metrics/counts_7d/20220131143201_i_quickactions_attention_weekly.yml +++ b/config/metrics/counts_7d/20220131143201_i_quickactions_attention_weekly.yml @@ -6,7 +6,9 @@ product_stage: create product_group: code_review product_category: code_review value_type: number -status: active +status: removed +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95241/ +milestone_removed: '15.4' milestone: '14.8' introduced_by_url: time_frame: 7d diff --git a/config/metrics/counts_7d/20220131153223_i_quickactions_remove_attention_weekly.yml b/config/metrics/counts_7d/20220131153223_i_quickactions_remove_attention_weekly.yml index 315cac183d1..275776eb793 100644 --- a/config/metrics/counts_7d/20220131153223_i_quickactions_remove_attention_weekly.yml +++ b/config/metrics/counts_7d/20220131153223_i_quickactions_remove_attention_weekly.yml @@ -6,7 +6,9 @@ product_stage: create product_group: code_review product_category: code_review value_type: number -status: active +status: removed +removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/95241/ +milestone_removed: '15.4' milestone: '14.8' introduced_by_url: time_frame: 7d diff --git a/doc/development/testing_guide/frontend_testing.md b/doc/development/testing_guide/frontend_testing.md index 2845dde9a24..4ad4209865a 100644 --- a/doc/development/testing_guide/frontend_testing.md +++ b/doc/development/testing_guide/frontend_testing.md @@ -872,7 +872,7 @@ This will create a new fixture located at `tmp/tests/frontend/fixtures-ee/graphql/releases/graphql/queries/all_releases.query.graphql.json`. You can import the JSON fixture in a Jest test using the `test_fixtures` alias -[as described below](#use-fixtures). +[as described previously](#use-fixtures). ## Data-driven tests diff --git a/doc/user/tasks.md b/doc/user/tasks.md index 16e5c85a354..6bf194d34b5 100644 --- a/doc/user/tasks.md +++ b/doc/user/tasks.md @@ -40,7 +40,7 @@ to work items and adding custom work item types, visit ## View tasks -View tasks in issues, in the **Child items** section. +View tasks in issues, in the **Tasks** section. You can also [filter the list of issues](project/issues/managing_issues.md#filter-the-list-of-issues) for `Type = task`. @@ -53,7 +53,7 @@ Prerequisites: To create a task: -1. In an issue description, in the **Child items** section, select **Add a task**. +1. In an issue description, in the **Tasks** section, select **Add**. 1. Enter the task title. 1. Select **Create task**. @@ -65,7 +65,7 @@ Prerequisites: To edit a task: -1. In the issue description, in the **Child items** section, select the task you want to edit. +1. In the issue description, in the **Tasks** section, select the task you want to edit. The task window opens. 1. Optional. To edit the title, select it and make your changes. 1. Optional. To edit the description, select the edit icon (**{pencil}**), make your changes, and @@ -83,7 +83,7 @@ It's not possible to connect them again. To remove a task from an issue: -1. In the issue description, in the **Child items** section, next to the task you want to remove, select the options menu (**{ellipsis_v}**). +1. In the issue description, in the **Tasks** section, next to the task you want to remove, select the options menu (**{ellipsis_v}**). 1. Select **Remove task**. ## Delete a task @@ -96,6 +96,6 @@ Prerequisites: To delete a task: -1. In the issue description, in the **Child items** section, select the task you want to edit. +1. In the issue description, in the **Tasks** section, select the task you want to edit. 1. In the task window, in the options menu (**{ellipsis_v}**), select **Delete task**. 1. Select **OK**. diff --git a/lib/gitlab/usage_data_counters/known_events/quickactions.yml b/lib/gitlab/usage_data_counters/known_events/quickactions.yml index f980503b4bf..007401ecd44 100644 --- a/lib/gitlab/usage_data_counters/known_events/quickactions.yml +++ b/lib/gitlab/usage_data_counters/known_events/quickactions.yml @@ -303,11 +303,3 @@ category: quickactions redis_slot: quickactions aggregation: weekly -- name: i_quickactions_attention - category: quickactions - redis_slot: quickactions - aggregation: weekly -- name: i_quickactions_remove_attention - category: quickactions - redis_slot: quickactions - aggregation: weekly diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 7dfa44ec153..7c4480b8a48 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -44417,7 +44417,7 @@ msgstr "" msgid "WorkItem|A task provides the ability to break down your work into smaller pieces tied to an issue. Tasks are the first items using our new %{workItemsLink} objects. Additional work item types will be coming soon." msgstr "" -msgid "WorkItem|Add a task" +msgid "WorkItem|Add" msgstr "" msgid "WorkItem|Add a title" @@ -44446,16 +44446,13 @@ msgstr[1] "" msgid "WorkItem|Cancel" msgstr "" -msgid "WorkItem|Child items" -msgstr "" - msgid "WorkItem|Child removed" msgstr "" msgid "WorkItem|Closed" msgstr "" -msgid "WorkItem|Collapse child items" +msgid "WorkItem|Collapse tasks" msgstr "" msgid "WorkItem|Create task" @@ -44467,7 +44464,7 @@ msgstr "" msgid "WorkItem|Delete task" msgstr "" -msgid "WorkItem|Expand child items" +msgid "WorkItem|Expand tasks" msgstr "" msgid "WorkItem|Incident" @@ -44482,7 +44479,7 @@ msgstr "" msgid "WorkItem|Learn about tasks" msgstr "" -msgid "WorkItem|No child items are currently assigned. Use child items to prioritize tasks that your team should complete in order to accomplish your goals!" +msgid "WorkItem|No tasks are currently assigned. Use tasks to break down this issue into smaller parts." msgstr "" msgid "WorkItem|None" @@ -44515,7 +44512,7 @@ msgstr "" msgid "WorkItem|Something went wrong when deleting the work item. Please try again." msgstr "" -msgid "WorkItem|Something went wrong when fetching the items list. Please refresh this page." +msgid "WorkItem|Something went wrong when fetching tasks. Please refresh this page." msgstr "" msgid "WorkItem|Something went wrong when fetching the work item. Please try again." @@ -44539,6 +44536,9 @@ msgstr "" msgid "WorkItem|Task deleted" msgstr "" +msgid "WorkItem|Tasks" +msgstr "" + msgid "WorkItem|Test case" msgstr "" diff --git a/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb new file mode 100644 index 00000000000..8352ad6aa33 --- /dev/null +++ b/qa/qa/specs/features/browser_ui/4_verify/ci_variable/prefill_variables_spec.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Verify' do + describe 'Pipeline with prefill variables' do + let(:prefill_variable_description1) { Faker::Lorem.sentence } + let(:prefill_variable_value1) { Faker::Lorem.word } + let(:prefill_variable_description2) { Faker::Lorem.sentence } + let(:project) do + Resource::Project.fabricate_via_api! do |project| + project.name = 'project-with-prefill-variables' + end + end + + let!(:commit) do + Resource::Repository::Commit.fabricate_via_api! do |commit| + commit.project = project + commit.commit_message = 'Add .gitlab-ci.yml' + commit.add_files( + [ + { + file_path: '.gitlab-ci.yml', + content: <<~YAML + variables: + TEST1: + value: #{prefill_variable_value1} + description: #{prefill_variable_description1} + TEST2: + description: #{prefill_variable_description2} + TEST3: + value: test 3 value + TEST4: test 4 value + + test: + script: echo "$FOO" + YAML + } + ] + ) + end + end + + before do + Flow::Login.sign_in + project.visit! + + # Navigate to Run Pipeline page + Page::Project::Menu.perform(&:click_ci_cd_pipelines) + Page::Project::Pipeline::Index.perform(&:click_run_pipeline_button) + end + + it( + 'shows only variables with description as prefill variables on the run pipeline page', + testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/371204' + ) do + Page::Project::Pipeline::New.perform do |new| + aggregate_failures do + expect(new).to have_field('Input variable key', with: 'TEST1') + expect(new).to have_field('Input variable value', with: prefill_variable_value1) + expect(new).to have_content(prefill_variable_description1) + + expect(new).to have_field('Input variable key', with: 'TEST2') + expect(new).to have_content(prefill_variable_description2) + + expect(new).not_to have_field('Input variable key', with: 'TEST3') + expect(new).not_to have_field('Input variable key', with: 'TEST4') + end + end + end + end + end +end diff --git a/spec/features/issues/user_interacts_with_awards_spec.rb b/spec/features/issues/user_interacts_with_awards_spec.rb index c86a2c32e2d..8ed56108f00 100644 --- a/spec/features/issues/user_interacts_with_awards_spec.rb +++ b/spec/features/issues/user_interacts_with_awards_spec.rb @@ -3,6 +3,8 @@ require 'spec_helper' RSpec.describe 'User interacts with awards' do + include MobileHelpers + let(:user) { create(:user) } describe 'User interacts with awards in an issue', :js do @@ -130,6 +132,7 @@ RSpec.describe 'User interacts with awards' do end it 'allows adding a new emoji' do + resize_window(1200, 800) page.within('.note-actions') do find('.note-emoji-button').click end @@ -140,6 +143,7 @@ RSpec.describe 'User interacts with awards' do expect(page).to have_emoji('8ball') end expect(note.reload.award_emoji.size).to eq(2) + restore_window_size end context 'when the project is archived' do diff --git a/spec/features/work_items/work_item_children_spec.rb b/spec/features/work_items/work_item_children_spec.rb index c50d3b64dc0..95774680a2b 100644 --- a/spec/features/work_items/work_item_children_spec.rb +++ b/spec/features/work_items/work_item_children_spec.rb @@ -24,7 +24,7 @@ RSpec.describe 'Work item children', :js do it 'are not displayed when issue does not have work item children', :aggregate_failures do page.within('[data-testid="work-item-links"]') do - expect(find('[data-testid="links-empty"]')).to have_content(_('No child items are currently assigned.')) + expect(find('[data-testid="links-empty"]')).to have_content(_('No tasks are currently assigned.')) expect(page).not_to have_selector('[data-testid="add-links-form"]') expect(page).not_to have_selector('[data-testid="links-child"]') end @@ -34,11 +34,11 @@ RSpec.describe 'Work item children', :js do page.within('[data-testid="work-item-links"]') do expect(page).to have_selector('[data-testid="links-body"]') - click_button 'Collapse child items' + click_button 'Collapse tasks' expect(page).not_to have_selector('[data-testid="links-body"]') - click_button 'Expand child items' + click_button 'Expand tasks' expect(page).to have_selector('[data-testid="links-body"]') end @@ -48,7 +48,7 @@ RSpec.describe 'Work item children', :js do page.within('[data-testid="work-item-links"]') do expect(page).not_to have_selector('[data-testid="add-links-form"]') - click_button 'Add a task' + click_button 'Add' expect(page).to have_selector('[data-testid="add-links-form"]') @@ -60,7 +60,7 @@ RSpec.describe 'Work item children', :js do it 'addss a child task', :aggregate_failures do page.within('[data-testid="work-item-links"]') do - click_button 'Add a task' + click_button 'Add' expect(page).to have_button('Create task', disabled: true) fill_in 'Add a title', with: 'Task 1' @@ -77,7 +77,7 @@ RSpec.describe 'Work item children', :js do it 'removes a child task and undoing', :aggregate_failures do page.within('[data-testid="work-item-links"]') do - click_button 'Add a task' + click_button 'Add' fill_in 'Add a title', with: 'Task 1' click_button 'Create task' wait_for_all_requests