diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-14 12:09:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-14 12:09:44 +0000 |
commit | 95671fac6e66cd23da4669706a619c1139eb1f14 (patch) | |
tree | ff2259013a8143f9f6ee64b85f8d4d4d10bc3e58 | |
parent | 181c5927ae0b7e7e18dbbe48b58915de922adcb9 (diff) | |
download | gitlab-ce-95671fac6e66cd23da4669706a619c1139eb1f14.tar.gz |
Add latest changes from gitlab-org/gitlab@master
73 files changed, 650 insertions, 136 deletions
diff --git a/.gitlab/ci/rails.gitlab-ci.yml b/.gitlab/ci/rails.gitlab-ci.yml index 9073bb231cc..752ba3c65a8 100644 --- a/.gitlab/ci/rails.gitlab-ci.yml +++ b/.gitlab/ci/rails.gitlab-ci.yml @@ -14,6 +14,10 @@ - run_timed_command "scripts/gitaly-test-spawn" - source ./scripts/rspec_helpers.sh +.minimal-rspec-tests: + variables: + RSPEC_TESTS_MAPPING_ENABLED: "true" + .rspec-base: extends: .rails-job-base stage: test @@ -240,24 +244,48 @@ rspec migration pg11: - .rspec-base-migration - .rspec-migration-parallel +rspec migration pg11 minimal: + extends: + - rspec migration pg11 + - .minimal-rspec-tests + - .rails:rules:ee-and-foss-migration:minimal + rspec unit pg11: extends: - .rspec-base-pg11 - .rails:rules:ee-and-foss-unit - .rspec-unit-parallel +rspec unit pg11 minimal: + extends: + - rspec unit pg11 + - .minimal-rspec-tests + - .rails:rules:ee-and-foss-unit:minimal + rspec integration pg11: extends: - .rspec-base-pg11 - .rails:rules:ee-and-foss-integration - .rspec-integration-parallel +rspec integration pg11 minimal: + extends: + - rspec integration pg11 + - .minimal-rspec-tests + - .rails:rules:ee-and-foss-integration:minimal + rspec system pg11: extends: - .rspec-base-pg11 - .rails:rules:ee-and-foss-system - .rspec-system-parallel +rspec system pg11 minimal: + extends: + - rspec system pg11 + - .minimal-rspec-tests + - .rails:rules:ee-and-foss-system:minimal + rspec fast_spec_helper: extends: - .rspec-base-pg11 @@ -265,6 +293,12 @@ rspec fast_spec_helper: script: - bin/rspec spec/fast_spec_helper.rb +rspec fast_spec_helper minimal: + extends: + - rspec fast_spec_helper + - .minimal-rspec-tests + - .rails:rules:ee-and-foss-fast_spec_helper:minimal + db:migrate:reset: extends: .db-job-base script: @@ -418,24 +452,48 @@ rspec migration pg11-as-if-foss: - .rails:rules:as-if-foss-migration - .rspec-migration-parallel +rspec migration pg11-as-if-foss minimal: + extends: + - rspec migration pg11-as-if-foss + - .minimal-rspec-tests + - .rails:rules:as-if-foss-migration:minimal + rspec unit pg11-as-if-foss: extends: - .rspec-base-pg11-as-if-foss - .rails:rules:as-if-foss-unit - .rspec-unit-parallel +rspec unit pg11-as-if-foss minimal: + extends: + - rspec unit pg11-as-if-foss + - .minimal-rspec-tests + - .rails:rules:as-if-foss-unit:minimal + rspec integration pg11-as-if-foss: extends: - .rspec-base-pg11-as-if-foss - .rails:rules:as-if-foss-integration - .rspec-integration-parallel +rspec integration pg11-as-if-foss minimal: + extends: + - rspec integration pg11-as-if-foss + - .minimal-rspec-tests + - .rails:rules:as-if-foss-integration:minimal + rspec system pg11-as-if-foss: extends: - .rspec-base-pg11-as-if-foss - .rails:rules:as-if-foss-system - .rspec-system-parallel +rspec system pg11-as-if-foss minimal: + extends: + - rspec system pg11-as-if-foss + - .minimal-rspec-tests + - .rails:rules:as-if-foss-system:minimal + rspec-ee migration pg11: extends: - .rspec-ee-base-pg11 @@ -443,40 +501,82 @@ rspec-ee migration pg11: - .rails:rules:ee-only-migration - .rspec-ee-migration-parallel +rspec-ee migration pg11 minimal: + extends: + - rspec-ee migration pg11 + - .minimal-rspec-tests + - .rails:rules:ee-only-migration:minimal + rspec-ee unit pg11: extends: - .rspec-ee-base-pg11 - .rails:rules:ee-only-unit - .rspec-ee-unit-parallel +rspec-ee unit pg11 minimal: + extends: + - rspec-ee unit pg11 + - .minimal-rspec-tests + - .rails:rules:ee-only-unit:minimal + rspec-ee integration pg11: extends: - .rspec-ee-base-pg11 - .rails:rules:ee-only-integration - .rspec-ee-integration-parallel +rspec-ee integration pg11 minimal: + extends: + - rspec-ee integration pg11 + - .minimal-rspec-tests + - .rails:rules:ee-only-integration:minimal + rspec-ee system pg11: extends: - .rspec-ee-base-pg11 - .rails:rules:ee-only-system - .rspec-ee-system-parallel +rspec-ee system pg11 minimal: + extends: + - rspec-ee system pg11 + - .minimal-rspec-tests + - .rails:rules:ee-only-system:minimal + rspec-ee unit pg11 geo: extends: - .rspec-ee-base-geo-pg11 - .rails:rules:ee-only-unit - .rspec-ee-unit-geo-parallel +rspec-ee unit pg11 geo minimal: + extends: + - rspec-ee unit pg11 geo + - .minimal-rspec-tests + - .rails:rules:ee-only-unit:minimal + rspec-ee integration pg11 geo: extends: - .rspec-ee-base-geo-pg11 - .rails:rules:ee-only-integration +rspec-ee integration pg11 geo minimal: + extends: + - rspec-ee integration pg11 geo + - .minimal-rspec-tests + - .rails:rules:ee-only-integration:minimal + rspec-ee system pg11 geo: extends: - .rspec-ee-base-geo-pg11 - .rails:rules:ee-only-system +rspec-ee system pg11 geo minimal: + extends: + - rspec-ee system pg11 geo + - .minimal-rspec-tests + - .rails:rules:ee-only-system:minimal + db:rollback geo: extends: - db:rollback diff --git a/.gitlab/ci/rules.gitlab-ci.yml b/.gitlab/ci/rules.gitlab-ci.yml index 271eec1b997..159defc83c3 100644 --- a/.gitlab/ci/rules.gitlab-ci.yml +++ b/.gitlab/ci/rules.gitlab-ci.yml @@ -70,6 +70,9 @@ .if-cache-credentials-schedule: &if-cache-credentials-schedule if: '$CI_REPO_CACHE_CREDENTIALS && $CI_PIPELINE_SOURCE == "schedule"' +.if-merge-request-rspec-minimal-disabled: &if-merge-request-rspec-minimal-disabled + if: '$CI_MERGE_REQUEST_IID && $RSPEC_MINIMAL_ENABLED != "true"' + .if-rspec-fail-fast-disabled: &if-rspec-fail-fast-disabled if: '$RSPEC_FAIL_FAST_ENABLED != "true"' @@ -492,26 +495,86 @@ - changes: *db-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-and-foss-migration:minimal: + rules: + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *db-patterns + .rails:rules:ee-and-foss-unit: rules: - changes: *backend-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-and-foss-unit:minimal: + rules: + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *backend-patterns + .rails:rules:ee-and-foss-integration: rules: - changes: *backend-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-and-foss-integration:minimal: + rules: + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *backend-patterns + .rails:rules:ee-and-foss-system: rules: - changes: *code-backstage-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-and-foss-system:minimal: + rules: + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *code-backstage-patterns + .rails:rules:ee-and-foss-fast_spec_helper: rules: - changes: ["config/**/*"] - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-and-foss-fast_spec_helper:minimal: + rules: + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: ["config/**/*"] + .rails:rules:default-refs-code-backstage-qa: rules: - <<: *if-default-refs @@ -525,6 +588,20 @@ - changes: *db-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-only-migration:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *db-patterns + .rails:rules:ee-only-unit: rules: - <<: *if-not-ee @@ -532,6 +609,20 @@ - changes: *backend-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-only-unit:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *backend-patterns + .rails:rules:ee-only-integration: rules: - <<: *if-not-ee @@ -539,6 +630,20 @@ - changes: *backend-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-only-integration:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *backend-patterns + .rails:rules:ee-only-system: rules: - <<: *if-not-ee @@ -546,6 +651,20 @@ - changes: *code-backstage-patterns - <<: *if-merge-request-title-run-all-rspec +.rails:rules:ee-only-system:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request-title-run-all-rspec + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-merge-request + changes: *code-backstage-patterns + .rails:rules:as-if-foss-migration: rules: - <<: *if-not-ee @@ -557,6 +676,20 @@ - <<: *if-merge-request changes: *ci-patterns +.rails:rules:as-if-foss-migration:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-security-merge-request + changes: *db-patterns + - <<: *if-merge-request-title-as-if-foss + changes: *db-patterns + .rails:rules:as-if-foss-unit: rules: - <<: *if-not-ee @@ -568,6 +701,20 @@ - <<: *if-merge-request changes: *ci-patterns +.rails:rules:as-if-foss-unit:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-security-merge-request + changes: *backend-patterns + - <<: *if-merge-request-title-as-if-foss + changes: *backend-patterns + .rails:rules:as-if-foss-integration: rules: - <<: *if-not-ee @@ -579,6 +726,20 @@ - <<: *if-merge-request changes: *ci-patterns +.rails:rules:as-if-foss-integration:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-security-merge-request + changes: *backend-patterns + - <<: *if-merge-request-title-as-if-foss + changes: *backend-patterns + .rails:rules:as-if-foss-system: rules: - <<: *if-not-ee @@ -590,6 +751,20 @@ - <<: *if-merge-request changes: *ci-patterns +.rails:rules:as-if-foss-system:minimal: + rules: + - <<: *if-not-ee + when: never + - <<: *if-merge-request-rspec-minimal-disabled + when: never + - <<: *if-merge-request + changes: *ci-patterns + when: never + - <<: *if-security-merge-request + changes: *code-backstage-patterns + - <<: *if-merge-request-title-as-if-foss + changes: *code-backstage-patterns + .rails:rules:ee-mr-and-master-only: rules: - <<: *if-not-ee diff --git a/.gitlab/ci/setup.gitlab-ci.yml b/.gitlab/ci/setup.gitlab-ci.yml index 19ec5257bea..74510a0a03a 100644 --- a/.gitlab/ci/setup.gitlab-ci.yml +++ b/.gitlab/ci/setup.gitlab-ci.yml @@ -82,6 +82,7 @@ detect-tests: - .detect-test-base - .rails:rules:detect-tests variables: + RSPEC_TESTS_MAPPING_ENABLED: "true" MATCHED_TESTS_FILE: tmp/matching_tests.txt detect-tests as-if-foss: diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 9b168ee962a..540f039a42f 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -d5a9a458e393f3bccbec1a12e71d49179912457b +993f4ccd104882e0766bd1377f24642603bd558f diff --git a/app/assets/javascripts/authentication/two_factor_auth/components/recovery_codes.vue b/app/assets/javascripts/authentication/two_factor_auth/components/recovery_codes.vue index 681b501fc98..87502db8b82 100644 --- a/app/assets/javascripts/authentication/two_factor_auth/components/recovery_codes.vue +++ b/app/assets/javascripts/authentication/two_factor_auth/components/recovery_codes.vue @@ -2,11 +2,13 @@ import Mousetrap from 'mousetrap'; import { GlSprintf, GlButton, GlAlert } from '@gitlab/ui'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; +import Tracking from '~/tracking'; import { __ } from '~/locale'; import { COPY_BUTTON_ACTION, DOWNLOAD_BUTTON_ACTION, PRINT_BUTTON_ACTION, + TRACKING_LABEL_PREFIX, RECOVERY_CODE_DOWNLOAD_FILENAME, COPY_KEYBOARD_SHORTCUT, } from '../constants'; @@ -28,10 +30,12 @@ export default { copyButtonAction: COPY_BUTTON_ACTION, downloadButtonAction: DOWNLOAD_BUTTON_ACTION, printButtonAction: PRINT_BUTTON_ACTION, + trackingLabelPrefix: TRACKING_LABEL_PREFIX, recoveryCodeDownloadFilename: RECOVERY_CODE_DOWNLOAD_FILENAME, i18n, mousetrap: null, components: { GlSprintf, GlButton, GlAlert, ClipboardButton }, + mixins: [Tracking.mixin()], props: { codes: { type: Array, @@ -74,6 +78,8 @@ export default { if (action === this.$options.printButtonAction) { window.print(); } + + this.track('click_button', { label: `${this.$options.trackingLabelPrefix}${action}_button` }); }, handleKeyboardCopy() { if (!window.getSelection) { @@ -84,6 +90,9 @@ export default { if (copiedText.includes(this.codesAsString)) { this.proceedButtonDisabled = false; + this.track('copy_keyboard_shortcut', { + label: `${this.$options.trackingLabelPrefix}manual_copy`, + }); } }, }, @@ -155,6 +164,8 @@ export default { :title="$options.i18n.proceedButton" variant="success" data-qa-selector="proceed_button" + data-track-event="click_button" + :data-track-label="`${$options.trackingLabelPrefix}proceed_button`" >{{ $options.i18n.proceedButton }}</gl-button > </div> diff --git a/app/assets/javascripts/authentication/two_factor_auth/constants.js b/app/assets/javascripts/authentication/two_factor_auth/constants.js index d27454406ef..35fc49c88b2 100644 --- a/app/assets/javascripts/authentication/two_factor_auth/constants.js +++ b/app/assets/javascripts/authentication/two_factor_auth/constants.js @@ -2,6 +2,8 @@ export const COPY_BUTTON_ACTION = 'copy'; export const DOWNLOAD_BUTTON_ACTION = 'download'; export const PRINT_BUTTON_ACTION = 'print'; +export const TRACKING_LABEL_PREFIX = '2fa_recovery_codes_'; + export const RECOVERY_CODE_DOWNLOAD_FILENAME = 'gitlab-recovery-codes.txt'; export const SUCCESS_QUERY_PARAM = 'two_factor_auth_enabled_successfully'; diff --git a/app/assets/javascripts/ide/components/preview/clientside.vue b/app/assets/javascripts/ide/components/preview/clientside.vue index 3852f2fdfa4..f65b1201d94 100644 --- a/app/assets/javascripts/ide/components/preview/clientside.vue +++ b/app/assets/javascripts/ide/components/preview/clientside.vue @@ -152,7 +152,7 @@ export default { </script> <template> - <div class="preview h-100 w-100 d-flex flex-column"> + <div class="preview h-100 w-100 d-flex flex-column gl-bg-white"> <template v-if="showPreview"> <navigator :manager="manager" /> <div id="ide-preview"></div> diff --git a/app/assets/javascripts/import_projects/components/import_status.vue b/app/assets/javascripts/import_entities/components/import_status.vue index 9e3347a657f..9e3347a657f 100644 --- a/app/assets/javascripts/import_projects/components/import_status.vue +++ b/app/assets/javascripts/import_entities/components/import_status.vue diff --git a/app/assets/javascripts/import_projects/constants.js b/app/assets/javascripts/import_entities/constants.js index ad33ca158d2..ad33ca158d2 100644 --- a/app/assets/javascripts/import_projects/constants.js +++ b/app/assets/javascripts/import_entities/constants.js diff --git a/app/assets/javascripts/import_projects/components/bitbucket_status_table.vue b/app/assets/javascripts/import_entities/import_projects/components/bitbucket_status_table.vue index bc8aa522596..bc8aa522596 100644 --- a/app/assets/javascripts/import_projects/components/bitbucket_status_table.vue +++ b/app/assets/javascripts/import_entities/import_projects/components/bitbucket_status_table.vue diff --git a/app/assets/javascripts/import_projects/components/import_projects_table.vue b/app/assets/javascripts/import_entities/import_projects/components/import_projects_table.vue index 2b6b8b765a2..2b6b8b765a2 100644 --- a/app/assets/javascripts/import_projects/components/import_projects_table.vue +++ b/app/assets/javascripts/import_entities/import_projects/components/import_projects_table.vue diff --git a/app/assets/javascripts/import_projects/components/provider_repo_table_row.vue b/app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue index 18971313dfe..983abda57f7 100644 --- a/app/assets/javascripts/import_projects/components/provider_repo_table_row.vue +++ b/app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue @@ -3,8 +3,8 @@ import { mapState, mapGetters, mapActions } from 'vuex'; import { GlIcon, GlBadge } from '@gitlab/ui'; import Select2Select from '~/vue_shared/components/select2_select.vue'; import { __ } from '~/locale'; -import ImportStatus from './import_status.vue'; -import { STATUSES } from '../constants'; +import ImportStatus from '../../components/import_status.vue'; +import { STATUSES } from '../../constants'; import { isProjectImportable, isIncompatible, getImportStatus } from '../utils'; export default { diff --git a/app/assets/javascripts/import_projects/index.js b/app/assets/javascripts/import_entities/import_projects/index.js index cbb98efa07e..7373b628f2b 100644 --- a/app/assets/javascripts/import_projects/index.js +++ b/app/assets/javascripts/import_entities/import_projects/index.js @@ -1,7 +1,7 @@ import Vue from 'vue'; -import Translate from '../vue_shared/translate'; +import Translate from '~/vue_shared/translate'; +import { parseBoolean } from '~/lib/utils/common_utils'; import ImportProjectsTable from './components/import_projects_table.vue'; -import { parseBoolean } from '../lib/utils/common_utils'; import createStore from './store'; Vue.use(Translate); diff --git a/app/assets/javascripts/import_projects/store/actions.js b/app/assets/javascripts/import_entities/import_projects/store/actions.js index 7b7afd13c55..7b7afd13c55 100644 --- a/app/assets/javascripts/import_projects/store/actions.js +++ b/app/assets/javascripts/import_entities/import_projects/store/actions.js diff --git a/app/assets/javascripts/import_projects/store/getters.js b/app/assets/javascripts/import_entities/import_projects/store/getters.js index b76c52beea2..31e22b50554 100644 --- a/app/assets/javascripts/import_projects/store/getters.js +++ b/app/assets/javascripts/import_entities/import_projects/store/getters.js @@ -1,4 +1,4 @@ -import { STATUSES } from '../constants'; +import { STATUSES } from '../../constants'; import { isProjectImportable, isIncompatible } from '../utils'; export const isLoading = state => state.isLoadingRepos || state.isLoadingNamespaces; diff --git a/app/assets/javascripts/import_projects/store/index.js b/app/assets/javascripts/import_entities/import_projects/store/index.js index 7ba12f81eb9..7ba12f81eb9 100644 --- a/app/assets/javascripts/import_projects/store/index.js +++ b/app/assets/javascripts/import_entities/import_projects/store/index.js diff --git a/app/assets/javascripts/import_projects/store/mutation_types.js b/app/assets/javascripts/import_entities/import_projects/store/mutation_types.js index 6adf5e59cff..6adf5e59cff 100644 --- a/app/assets/javascripts/import_projects/store/mutation_types.js +++ b/app/assets/javascripts/import_entities/import_projects/store/mutation_types.js diff --git a/app/assets/javascripts/import_projects/store/mutations.js b/app/assets/javascripts/import_entities/import_projects/store/mutations.js index 6999253d4b2..3d718a6a386 100644 --- a/app/assets/javascripts/import_projects/store/mutations.js +++ b/app/assets/javascripts/import_entities/import_projects/store/mutations.js @@ -1,6 +1,6 @@ import Vue from 'vue'; import * as types from './mutation_types'; -import { STATUSES } from '../constants'; +import { STATUSES } from '../../constants'; const makeNewImportedProject = importedProject => ({ importSource: { diff --git a/app/assets/javascripts/import_projects/store/state.js b/app/assets/javascripts/import_entities/import_projects/store/state.js index ecd93561d52..ecd93561d52 100644 --- a/app/assets/javascripts/import_projects/store/state.js +++ b/app/assets/javascripts/import_entities/import_projects/store/state.js diff --git a/app/assets/javascripts/import_projects/utils.js b/app/assets/javascripts/import_entities/import_projects/utils.js index 695b12cbcba..0610117e09b 100644 --- a/app/assets/javascripts/import_projects/utils.js +++ b/app/assets/javascripts/import_entities/import_projects/utils.js @@ -1,4 +1,4 @@ -import { STATUSES } from './constants'; +import { STATUSES } from '../constants'; export function isIncompatible(project) { return project.importSource.incompatible; diff --git a/app/assets/javascripts/pages/import/bitbucket/status/index.js b/app/assets/javascripts/pages/import/bitbucket/status/index.js index 2a5432ce09d..f450a2aac00 100644 --- a/app/assets/javascripts/pages/import/bitbucket/status/index.js +++ b/app/assets/javascripts/pages/import/bitbucket/status/index.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import { initStoreFromElement, initPropsFromElement } from '~/import_projects'; -import BitbucketStatusTable from '~/import_projects/components/bitbucket_status_table.vue'; +import { initStoreFromElement, initPropsFromElement } from '~/import_entities/import_projects'; +import BitbucketStatusTable from '~/import_entities/import_projects/components/bitbucket_status_table.vue'; document.addEventListener('DOMContentLoaded', () => { const mountElement = document.getElementById('import-projects-mount-element'); diff --git a/app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue b/app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue index 35ae9d8419f..f0c4ecbe3eb 100644 --- a/app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue +++ b/app/assets/javascripts/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue @@ -1,6 +1,6 @@ <script> import { GlButton } from '@gitlab/ui'; -import BitbucketStatusTable from '~/import_projects/components/bitbucket_status_table.vue'; +import BitbucketStatusTable from '~/import_entities/import_projects/components/bitbucket_status_table.vue'; export default { components: { diff --git a/app/assets/javascripts/pages/import/bitbucket_server/status/index.js b/app/assets/javascripts/pages/import/bitbucket_server/status/index.js index a44fc4e6b29..a6d748ce857 100644 --- a/app/assets/javascripts/pages/import/bitbucket_server/status/index.js +++ b/app/assets/javascripts/pages/import/bitbucket_server/status/index.js @@ -1,5 +1,5 @@ import Vue from 'vue'; -import { initStoreFromElement, initPropsFromElement } from '~/import_projects'; +import { initStoreFromElement, initPropsFromElement } from '~/import_entities/import_projects'; import BitbucketServerStatusTable from './components/bitbucket_server_status_table.vue'; document.addEventListener('DOMContentLoaded', () => { diff --git a/app/assets/javascripts/pages/import/fogbugz/status/index.js b/app/assets/javascripts/pages/import/fogbugz/status/index.js index dcd84f0faf9..98ddb8b3aa4 100644 --- a/app/assets/javascripts/pages/import/fogbugz/status/index.js +++ b/app/assets/javascripts/pages/import/fogbugz/status/index.js @@ -1,4 +1,4 @@ -import mountImportProjectsTable from '~/import_projects'; +import mountImportProjectsTable from '~/import_entities/import_projects'; document.addEventListener('DOMContentLoaded', () => { const mountElement = document.getElementById('import-projects-mount-element'); diff --git a/app/assets/javascripts/pages/import/gitea/status/index.js b/app/assets/javascripts/pages/import/gitea/status/index.js index dcd84f0faf9..98ddb8b3aa4 100644 --- a/app/assets/javascripts/pages/import/gitea/status/index.js +++ b/app/assets/javascripts/pages/import/gitea/status/index.js @@ -1,4 +1,4 @@ -import mountImportProjectsTable from '~/import_projects'; +import mountImportProjectsTable from '~/import_entities/import_projects'; document.addEventListener('DOMContentLoaded', () => { const mountElement = document.getElementById('import-projects-mount-element'); diff --git a/app/assets/javascripts/pages/import/github/status/index.js b/app/assets/javascripts/pages/import/github/status/index.js index dcd84f0faf9..98ddb8b3aa4 100644 --- a/app/assets/javascripts/pages/import/github/status/index.js +++ b/app/assets/javascripts/pages/import/github/status/index.js @@ -1,4 +1,4 @@ -import mountImportProjectsTable from '~/import_projects'; +import mountImportProjectsTable from '~/import_entities/import_projects'; document.addEventListener('DOMContentLoaded', () => { const mountElement = document.getElementById('import-projects-mount-element'); diff --git a/app/assets/javascripts/pages/import/gitlab/status/index.js b/app/assets/javascripts/pages/import/gitlab/status/index.js index dcd84f0faf9..98ddb8b3aa4 100644 --- a/app/assets/javascripts/pages/import/gitlab/status/index.js +++ b/app/assets/javascripts/pages/import/gitlab/status/index.js @@ -1,4 +1,4 @@ -import mountImportProjectsTable from '~/import_projects'; +import mountImportProjectsTable from '~/import_entities/import_projects'; document.addEventListener('DOMContentLoaded', () => { const mountElement = document.getElementById('import-projects-mount-element'); diff --git a/app/assets/javascripts/pages/import/manifest/status/index.js b/app/assets/javascripts/pages/import/manifest/status/index.js index dcd84f0faf9..98ddb8b3aa4 100644 --- a/app/assets/javascripts/pages/import/manifest/status/index.js +++ b/app/assets/javascripts/pages/import/manifest/status/index.js @@ -1,4 +1,4 @@ -import mountImportProjectsTable from '~/import_projects'; +import mountImportProjectsTable from '~/import_entities/import_projects'; document.addEventListener('DOMContentLoaded', () => { const mountElement = document.getElementById('import-projects-mount-element'); diff --git a/app/assets/javascripts/terraform/components/states_table.vue b/app/assets/javascripts/terraform/components/states_table.vue index c77eb84dddb..cf9c6e19094 100644 --- a/app/assets/javascripts/terraform/components/states_table.vue +++ b/app/assets/javascripts/terraform/components/states_table.vue @@ -52,12 +52,18 @@ export default { return columns; }, }, + i18n: { + locked: s__('Terraform|Locked'), + lockedByUser: s__('Terraform|Locked by %{user} %{timeAgo}'), + unknownUser: s__('Terraform|Unknown User'), + updatedUser: s__('Terraform|%{user} updated %{timeAgo}'), + }, methods: { createdByUserName(item) { return item.latestVersion?.createdByUser?.name; }, lockedByUserName(item) { - return item.lockedByUser?.name || s__('Terraform|Unknown User'); + return item.lockedByUser?.name || this.$options.i18n.unknownUser; }, updatedTime(item) { return item.latestVersion?.updatedAt || item.updatedAt; @@ -74,18 +80,18 @@ export default { {{ item.name }} </p> - <div v-if="item.lockedAt" id="terraformLockedBadgeContainer" class="gl-mx-2"> - <gl-badge id="terraformLockedBadge"> + <div v-if="item.lockedAt" :id="`terraformLockedBadgeContainer${item.name}`" class="gl-mx-2"> + <gl-badge :id="`terraformLockedBadge${item.name}`"> <gl-icon name="lock" /> - {{ s__('Terraform|Locked') }} + {{ $options.i18n.locked }} </gl-badge> <gl-tooltip - container="terraformLockedBadgeContainer" + :container="`terraformLockedBadgeContainer${item.name}`" + :target="`terraformLockedBadge${item.name}`" placement="right" - target="terraformLockedBadge" > - <gl-sprintf :message="s__('Terraform|Locked by %{user} %{timeAgo}')"> + <gl-sprintf :message="$options.i18n.lockedByUser"> <template #user> {{ lockedByUserName(item) }} </template> @@ -101,7 +107,7 @@ export default { <template #cell(updated)="{ item }"> <p class="gl-m-0" data-testid="terraform-states-table-updated"> - <gl-sprintf :message="s__('Terraform|%{user} updated %{timeAgo}')"> + <gl-sprintf :message="$options.i18n.updatedUser"> <template #user> <span v-if="item.latestVersion"> {{ createdByUserName(item) }} diff --git a/app/assets/javascripts/terraform/components/states_table_actions.vue b/app/assets/javascripts/terraform/components/states_table_actions.vue index 64d30f0c678..5375e4e45f7 100644 --- a/app/assets/javascripts/terraform/components/states_table_actions.vue +++ b/app/assets/javascripts/terraform/components/states_table_actions.vue @@ -1,11 +1,14 @@ <script> -import { GlDropdown, GlDropdownItem } from '@gitlab/ui'; +import { GlDropdown, GlDropdownItem, GlIcon } from '@gitlab/ui'; import { s__ } from '~/locale'; +import lockState from '../graphql/mutations/lock_state.mutation.graphql'; +import unlockState from '../graphql/mutations/unlock_state.mutation.graphql'; export default { components: { GlDropdown, GlDropdownItem, + GlIcon, }, props: { state: { @@ -13,22 +16,73 @@ export default { type: Object, }, }, + data() { + return { + loading: false, + }; + }, i18n: { downloadJSON: s__('Terraform|Download JSON'), + lock: s__('Terraform|Lock'), + unlock: s__('Terraform|Unlock'), + }, + methods: { + lock() { + this.stateMutation(lockState); + }, + unlock() { + this.stateMutation(unlockState); + }, + stateMutation(mutation) { + this.loading = true; + this.$apollo + .mutate({ + mutation, + variables: { + stateID: this.state.id, + }, + refetchQueries: () => ['getStates'], + awaitRefetchQueries: true, + notifyOnNetworkStatusChange: true, + }) + .catch(() => {}) + .finally(() => { + this.loading = false; + }); + }, }, }; </script> <template> - <div v-if="state.latestVersion"> - <gl-dropdown icon="ellipsis_v" right :data-testid="`terraform-state-actions-${state.name}`"> + <div> + <gl-dropdown + icon="ellipsis_v" + right + :data-testid="`terraform-state-actions-${state.name}`" + :disabled="loading" + toggle-class="gl-px-3! gl-shadow-none!" + > + <template #button-content> + <gl-icon class="gl-mr-0" name="ellipsis_v" /> + </template> + <gl-dropdown-item + v-if="state.latestVersion" data-testid="terraform-state-download" :download="`${state.name}.json`" :href="state.latestVersion.downloadPath" > {{ $options.i18n.downloadJSON }} </gl-dropdown-item> + + <gl-dropdown-item v-if="state.lockedAt" data-testid="terraform-state-unlock" @click="unlock"> + {{ $options.i18n.unlock }} + </gl-dropdown-item> + + <gl-dropdown-item v-else data-testid="terraform-state-lock" @click="lock"> + {{ $options.i18n.lock }} + </gl-dropdown-item> </gl-dropdown> </div> </template> diff --git a/app/assets/javascripts/terraform/components/terraform_list.vue b/app/assets/javascripts/terraform/components/terraform_list.vue index ad21bc47a76..26a0bfe5fa5 100644 --- a/app/assets/javascripts/terraform/components/terraform_list.vue +++ b/app/assets/javascripts/terraform/components/terraform_list.vue @@ -15,13 +15,7 @@ export default { ...this.cursor, }; }, - update: data => { - return { - count: data?.project?.terraformStates?.count, - list: data?.project?.terraformStates?.nodes, - pageInfo: data?.project?.terraformStates?.pageInfo, - }; - }, + update: data => data, error() { this.states = null; }, @@ -67,35 +61,34 @@ export default { return this.$apollo.queries.states.loading; }, pageInfo() { - return this.states?.pageInfo || {}; + return this.states?.project?.terraformStates?.pageInfo || {}; }, showPagination() { return this.pageInfo.hasPreviousPage || this.pageInfo.hasNextPage; }, statesCount() { - return this.states?.count; + return this.states?.project?.terraformStates?.count; }, statesList() { - return this.states?.list; + return this.states?.project?.terraformStates?.nodes; }, }, methods: { - updatePagination(item) { - if (item === this.pageInfo.endCursor) { - this.cursor = { - first: MAX_LIST_COUNT, - after: item, - last: null, - before: null, - }; - } else { - this.cursor = { - first: null, - after: null, - last: MAX_LIST_COUNT, - before: item, - }; - } + nextPage(item) { + this.cursor = { + first: MAX_LIST_COUNT, + after: item, + last: null, + before: null, + }; + }, + prevPage(item) { + this.cursor = { + first: null, + after: null, + last: MAX_LIST_COUNT, + before: item, + }; }, }, }; @@ -119,11 +112,7 @@ export default { <states-table :states="statesList" :terraform-admin="terraformAdmin" /> <div v-if="showPagination" class="gl-display-flex gl-justify-content-center gl-mt-5"> - <gl-keyset-pagination - v-bind="pageInfo" - @prev="updatePagination" - @next="updatePagination" - /> + <gl-keyset-pagination v-bind="pageInfo" @prev="prevPage" @next="nextPage" /> </div> </div> diff --git a/app/assets/javascripts/terraform/graphql/mutations/lock_state.mutation.graphql b/app/assets/javascripts/terraform/graphql/mutations/lock_state.mutation.graphql new file mode 100644 index 00000000000..aea0f8b025a --- /dev/null +++ b/app/assets/javascripts/terraform/graphql/mutations/lock_state.mutation.graphql @@ -0,0 +1,5 @@ +mutation lockState($stateID: TerraformStateID!) { + terraformStateLock(input: { id: $stateID }) { + errors + } +} diff --git a/app/assets/javascripts/terraform/graphql/mutations/unlock_state.mutation.graphql b/app/assets/javascripts/terraform/graphql/mutations/unlock_state.mutation.graphql new file mode 100644 index 00000000000..1909fe95cf3 --- /dev/null +++ b/app/assets/javascripts/terraform/graphql/mutations/unlock_state.mutation.graphql @@ -0,0 +1,5 @@ +mutation unlockState($stateID: TerraformStateID!) { + terraformStateUnlock(input: { id: $stateID }) { + errors + } +} diff --git a/app/assets/stylesheets/_page_specific_files.scss b/app/assets/stylesheets/_page_specific_files.scss index 52bc19fddd9..f56665553ba 100644 --- a/app/assets/stylesheets/_page_specific_files.scss +++ b/app/assets/stylesheets/_page_specific_files.scss @@ -10,7 +10,6 @@ @import './pages/events'; @import './pages/groups'; @import './pages/help'; -@import './pages/import'; @import './pages/incident_management_list'; @import './pages/issuable'; @import './pages/issues/issue_count_badge'; diff --git a/app/assets/stylesheets/pages/import.scss b/app/assets/stylesheets/page_bundles/import.scss index 68641aa4d5d..2a154393630 100644 --- a/app/assets/stylesheets/pages/import.scss +++ b/app/assets/stylesheets/page_bundles/import.scss @@ -1,3 +1,5 @@ +@import 'mixins_and_variables_and_functions'; + .import-jobs-to-col { width: 39%; } @@ -39,3 +41,17 @@ .import-projects-loading-icon { margin-top: $gl-padding-32; } + +.import-entities-target-select { + .select2-container { + > .select2-choice { + border-color: var(--gray-200, $gray-200); + border-top-right-radius: 0; + border-bottom-right-radius: 0; + } + } + + .gl-form-input { + box-shadow: inset 0 0 0 1px var(--gray-200, $gray-200); + } +} diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index e32d9dcba92..33cd90ce5d3 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -8,7 +8,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = _('Naming, visibility') - %button.btn.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.js-settings-toggle{ type: 'button' } = _('Collapse') %p = _('Update your group name, description, avatar, and visibility.') @@ -19,7 +19,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = _('Permissions, LFS, 2FA') - %button.btn.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p = _('Advanced permissions, Large File Storage and Two-Factor authentication settings.') @@ -32,7 +32,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = s_('GroupSettings|Badges') - %button.btn.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p = s_('GroupSettings|Customize your group badges.') @@ -48,7 +48,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = _('Advanced') - %button.btn.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p = _('Perform advanced options such as changing path, transferring, exporting, or removing the group.') diff --git a/app/views/import/_githubish_status.html.haml b/app/views/import/_githubish_status.html.haml index fca73f118b3..4cf08b1d2be 100644 --- a/app/views/import/_githubish_status.html.haml +++ b/app/views/import/_githubish_status.html.haml @@ -1,3 +1,4 @@ +- add_page_specific_style 'page_bundles/import' - provider = local_assigns.fetch(:provider) - extra_data = local_assigns.fetch(:extra_data, {}) - filterable = local_assigns.fetch(:filterable, true) diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml index a257f2e9433..0c0530110c5 100644 --- a/app/views/projects/compare/_form.html.haml +++ b/app/views/projects/compare/_form.html.haml @@ -28,4 +28,4 @@ - if @merge_request.present? = link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'gl-ml-3 btn' - elsif create_mr_button? - = link_to _("Create merge request"), create_mr_path, class: 'gl-ml-3 btn' + = link_to _("Create merge request"), create_mr_path, class: 'gl-ml-3 btn gl-button' diff --git a/changelogs/unreleased/231207-convert-compare-button-to-gl.yml b/changelogs/unreleased/231207-convert-compare-button-to-gl.yml new file mode 100644 index 00000000000..d4b62d5cf56 --- /dev/null +++ b/changelogs/unreleased/231207-convert-compare-button-to-gl.yml @@ -0,0 +1,5 @@ +--- +title: Conver create merge request button to gl +merge_request: 49864 +author: +type: other diff --git a/changelogs/unreleased/273592-terraform-actions.yml b/changelogs/unreleased/273592-terraform-actions.yml new file mode 100644 index 00000000000..9bb3a91003f --- /dev/null +++ b/changelogs/unreleased/273592-terraform-actions.yml @@ -0,0 +1,5 @@ +--- +title: Add lock button to the Terraform State list view +merge_request: 47842 +author: +type: added diff --git a/changelogs/unreleased/281026-set-live-preview-bg-white.yml b/changelogs/unreleased/281026-set-live-preview-bg-white.yml new file mode 100644 index 00000000000..0a1a7c91fac --- /dev/null +++ b/changelogs/unreleased/281026-set-live-preview-bg-white.yml @@ -0,0 +1,5 @@ +--- +title: Set Web IDE Live Preview default background to white +merge_request: 49901 +author: +type: fixed diff --git a/config/application.rb b/config/application.rb index 193e240f9a6..003e8a5ced7 100644 --- a/config/application.rb +++ b/config/application.rb @@ -188,6 +188,7 @@ module Gitlab config.assets.precompile << "page_bundles/error_tracking_index.css" config.assets.precompile << "page_bundles/signup.css" config.assets.precompile << "page_bundles/ide.css" + config.assets.precompile << "page_bundles/import.css" config.assets.precompile << "page_bundles/issues_list.css" config.assets.precompile << "page_bundles/jira_connect.css" config.assets.precompile << "page_bundles/jira_connect_users.css" diff --git a/config/feature_flags/development/disable_metric_dashboard_refresh_rate.yml b/config/feature_flags/development/disable_metric_dashboard_refresh_rate.yml index 354dfebbf6d..6f4235acaac 100644 --- a/config/feature_flags/development/disable_metric_dashboard_refresh_rate.yml +++ b/config/feature_flags/development/disable_metric_dashboard_refresh_rate.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/37195 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229841 milestone: '13.2' type: development -group: group::health +group: group::monitor default_enabled: false diff --git a/config/feature_flags/development/metrics_dashboard.yml b/config/feature_flags/development/metrics_dashboard.yml index 81eafa74ab4..39a7fd1260b 100644 --- a/config/feature_flags/development/metrics_dashboard.yml +++ b/config/feature_flags/development/metrics_dashboard.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29634 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/257902 milestone: '13.0' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/multiple_http_integrations_custom_mapping.yml b/config/feature_flags/development/multiple_http_integrations_custom_mapping.yml index efc18603fdc..6c04d08369f 100644 --- a/config/feature_flags/development/multiple_http_integrations_custom_mapping.yml +++ b/config/feature_flags/development/multiple_http_integrations_custom_mapping.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/46437 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/273573 milestone: '13.6' type: development -group: group::health +group: group::monitor default_enabled: false diff --git a/config/feature_flags/development/prometheus_computed_alerts.yml b/config/feature_flags/development/prometheus_computed_alerts.yml index 428a99c1c1e..5a9a989d544 100644 --- a/config/feature_flags/development/prometheus_computed_alerts.yml +++ b/config/feature_flags/development/prometheus_computed_alerts.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/13443 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/255304 milestone: '12.0' type: development -group: group::health +group: group::monitor default_enabled: false diff --git a/config/feature_flags/development/settings_operations_prometheus_service.yml b/config/feature_flags/development/settings_operations_prometheus_service.yml index 3b2fea80a2d..27ccaf782c2 100644 --- a/config/feature_flags/development/settings_operations_prometheus_service.yml +++ b/config/feature_flags/development/settings_operations_prometheus_service.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24296 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/258560 milestone: '12.8' type: development -group: group::health +group: group::monitor default_enabled: false diff --git a/config/feature_flags/development/usage_data_incident_management_alert_assigned.yml b/config/feature_flags/development/usage_data_incident_management_alert_assigned.yml index c3e59a0c323..bc9aaef47ef 100644 --- a/config/feature_flags/development/usage_data_incident_management_alert_assigned.yml +++ b/config/feature_flags/development/usage_data_incident_management_alert_assigned.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_alert_status_changed.yml b/config/feature_flags/development/usage_data_incident_management_alert_status_changed.yml index c858de35d56..2868f920d5b 100644 --- a/config/feature_flags/development/usage_data_incident_management_alert_status_changed.yml +++ b/config/feature_flags/development/usage_data_incident_management_alert_status_changed.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_alert_todo.yml b/config/feature_flags/development/usage_data_incident_management_alert_todo.yml index 198289db02d..f5133676231 100644 --- a/config/feature_flags/development/usage_data_incident_management_alert_todo.yml +++ b/config/feature_flags/development/usage_data_incident_management_alert_todo.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_assigned.yml b/config/feature_flags/development/usage_data_incident_management_incident_assigned.yml index 1b5b2d1f8a0..14fc5f92744 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_assigned.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_assigned.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_change_confidential.yml b/config/feature_flags/development/usage_data_incident_management_incident_change_confidential.yml index 9eff79d3d4a..8babb4557a6 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_change_confidential.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_change_confidential.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_closed.yml b/config/feature_flags/development/usage_data_incident_management_incident_closed.yml index 1e857525d06..474466dd057 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_closed.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_closed.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_comment.yml b/config/feature_flags/development/usage_data_incident_management_incident_comment.yml index c562501fdad..6c6f9a58071 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_comment.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_comment.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_created.yml b/config/feature_flags/development/usage_data_incident_management_incident_created.yml index d6c4a082714..4a9b742c0ef 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_created.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_created.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_relate.yml b/config/feature_flags/development/usage_data_incident_management_incident_relate.yml index d9a9f9f5e5e..08bdd429fc3 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_relate.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_relate.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_reopened.yml b/config/feature_flags/development/usage_data_incident_management_incident_reopened.yml index 1cc30a4683e..4785c8224e4 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_reopened.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_reopened.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_todo.yml b/config/feature_flags/development/usage_data_incident_management_incident_todo.yml index 414f47e1137..8dc2e623caf 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_todo.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_todo.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_unrelate.yml b/config/feature_flags/development/usage_data_incident_management_incident_unrelate.yml index a09b8bf2f3f..90226a7c3e2 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_unrelate.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_unrelate.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/config/feature_flags/development/usage_data_incident_management_incident_zoom_meeting.yml b/config/feature_flags/development/usage_data_incident_management_incident_zoom_meeting.yml index 7d3a9bbff39..c00f79d1e05 100644 --- a/config/feature_flags/development/usage_data_incident_management_incident_zoom_meeting.yml +++ b/config/feature_flags/development/usage_data_incident_management_incident_zoom_meeting.yml @@ -4,5 +4,5 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40475 rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/229918 milestone: '13.4' type: development -group: group::health +group: group::monitor default_enabled: true diff --git a/locale/gitlab.pot b/locale/gitlab.pot index fed9da08fee..116b3f16456 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -27081,6 +27081,9 @@ msgstr "" msgid "Terraform|Get started with Terraform" msgstr "" +msgid "Terraform|Lock" +msgstr "" + msgid "Terraform|Locked" msgstr "" @@ -27102,6 +27105,9 @@ msgstr "" msgid "Terraform|Unknown User" msgstr "" +msgid "Terraform|Unlock" +msgstr "" + msgid "Test" msgstr "" diff --git a/qa/qa/page/project/import/github.rb b/qa/qa/page/project/import/github.rb index ad1746258ea..6890c7de9f8 100644 --- a/qa/qa/page/project/import/github.rb +++ b/qa/qa/page/project/import/github.rb @@ -12,7 +12,7 @@ module QA element :authenticate_button end - view 'app/assets/javascripts/import_projects/components/provider_repo_table_row.vue' do + view 'app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue' do element :project_import_row element :project_namespace_select element :project_path_field diff --git a/spec/frontend/authentication/two_factor_auth/components/recovery_codes_spec.js b/spec/frontend/authentication/two_factor_auth/components/recovery_codes_spec.js index 956a93b024c..025e605b920 100644 --- a/spec/frontend/authentication/two_factor_auth/components/recovery_codes_spec.js +++ b/spec/frontend/authentication/two_factor_auth/components/recovery_codes_spec.js @@ -2,7 +2,8 @@ import { mount } from '@vue/test-utils'; import { GlAlert, GlButton } from '@gitlab/ui'; import { nextTick } from 'vue'; import { within } from '@testing-library/dom'; -import { extendedWrapper } from 'jest/helpers/vue_test_utils_helper'; +import { extendedWrapper } from 'helpers/vue_test_utils_helper'; +import Tracking from '~/tracking'; import RecoveryCodes, { i18n, } from '~/authentication/two_factor_auth/components/recovery_codes.vue'; @@ -42,6 +43,7 @@ describe('RecoveryCodes', () => { wrapper.vm.$options.mousetrap.trigger(COPY_KEYBOARD_SHORTCUT); beforeEach(() => { + jest.spyOn(Tracking, 'event'); createComponent(); }); @@ -73,6 +75,13 @@ describe('RecoveryCodes', () => { href: profileAccountPath, }); }); + + it('fires Snowplow event', () => { + expect(findProceedButton().attributes()).toMatchObject({ + 'data-track-event': 'click_button', + 'data-track-label': '2fa_recovery_codes_proceed_button', + }); + }); }); describe('"Copy codes" button', () => { @@ -88,13 +97,21 @@ describe('RecoveryCodes', () => { }); describe('when button is clicked', () => { - it('enables "Proceed" button', async () => { + beforeEach(async () => { findCopyButton().trigger('click'); await nextTick(); + }); + it('enables "Proceed" button', () => { expect(findProceedButton().props('disabled')).toBe(false); }); + + it('fires Snowplow event', () => { + expect(Tracking.event).toHaveBeenCalledWith(undefined, 'click_button', { + label: '2fa_recovery_codes_copy_button', + }); + }); }); }); @@ -111,7 +128,7 @@ describe('RecoveryCodes', () => { }); describe('when button is clicked', () => { - it('enables "Proceed" button', async () => { + beforeEach(async () => { const downloadButton = findDownloadButton(); // jsdom does not support navigating. // Since we are clicking an anchor tag there is no way to mock this @@ -121,9 +138,17 @@ describe('RecoveryCodes', () => { downloadButton.trigger('click'); await nextTick(); + }); + it('enables "Proceed" button', () => { expect(findProceedButton().props('disabled')).toBe(false); }); + + it('fires Snowplow event', () => { + expect(Tracking.event).toHaveBeenCalledWith(undefined, 'click_button', { + label: '2fa_recovery_codes_download_button', + }); + }); }); }); @@ -138,34 +163,48 @@ describe('RecoveryCodes', () => { }); describe('when button is clicked', () => { - it('enables "Proceed" button and opens print dialog', async () => { + beforeEach(async () => { window.print = jest.fn(); findPrintButton().trigger('click'); await nextTick(); + }); + it('enables "Proceed" button and opens print dialog', () => { expect(findProceedButton().props('disabled')).toBe(false); - expect(window.print).toHaveBeenCalledWith(); + expect(window.print).toHaveBeenCalled(); + }); + + it('fires Snowplow event', () => { + expect(Tracking.event).toHaveBeenCalledWith(undefined, 'click_button', { + label: '2fa_recovery_codes_print_button', + }); }); }); }); describe('when codes are manually copied', () => { describe('when selected text is the recovery codes', () => { - beforeEach(() => { + beforeEach(async () => { jest.spyOn(window, 'getSelection').mockImplementation(() => ({ toString: jest.fn(() => codesFormattedString), })); - }); - it('enables "Proceed" button', async () => { manuallyCopyRecoveryCodes(); await nextTick(); + }); + it('enables "Proceed" button', () => { expect(findProceedButton().props('disabled')).toBe(false); }); + + it('fires Snowplow event', () => { + expect(Tracking.event).toHaveBeenCalledWith(undefined, 'copy_keyboard_shortcut', { + label: '2fa_recovery_codes_manual_copy', + }); + }); }); describe('when selected text includes the recovery codes', () => { diff --git a/spec/frontend/import_projects/components/bitbucket_status_table_spec.js b/spec/frontend/import_entities/import_projects/components/bitbucket_status_table_spec.js index b65b388fd5f..8f8c01a8b81 100644 --- a/spec/frontend/import_projects/components/bitbucket_status_table_spec.js +++ b/spec/frontend/import_entities/import_projects/components/bitbucket_status_table_spec.js @@ -2,8 +2,8 @@ import { nextTick } from 'vue'; import { shallowMount } from '@vue/test-utils'; import { GlAlert } from '@gitlab/ui'; -import BitbucketStatusTable from '~/import_projects/components/bitbucket_status_table.vue'; -import ImportProjectsTable from '~/import_projects/components/import_projects_table.vue'; +import BitbucketStatusTable from '~/import_entities/import_projects/components/bitbucket_status_table.vue'; +import ImportProjectsTable from '~/import_entities/import_projects/components/import_projects_table.vue'; const ImportProjectsTableStub = { name: 'ImportProjectsTable', diff --git a/spec/frontend/import_projects/components/import_projects_table_spec.js b/spec/frontend/import_entities/import_projects/components/import_projects_table_spec.js index 7322c7c1ae1..b4ac11b4404 100644 --- a/spec/frontend/import_projects/components/import_projects_table_spec.js +++ b/spec/frontend/import_entities/import_projects/components/import_projects_table_spec.js @@ -2,11 +2,11 @@ import { nextTick } from 'vue'; import Vuex from 'vuex'; import { createLocalVue, shallowMount } from '@vue/test-utils'; import { GlLoadingIcon, GlButton, GlIntersectionObserver } from '@gitlab/ui'; -import state from '~/import_projects/store/state'; -import * as getters from '~/import_projects/store/getters'; -import { STATUSES } from '~/import_projects/constants'; -import ImportProjectsTable from '~/import_projects/components/import_projects_table.vue'; -import ProviderRepoTableRow from '~/import_projects/components/provider_repo_table_row.vue'; +import state from '~/import_entities/import_projects/store/state'; +import * as getters from '~/import_entities/import_projects/store/getters'; +import { STATUSES } from '~/import_entities/constants'; +import ImportProjectsTable from '~/import_entities/import_projects/components/import_projects_table.vue'; +import ProviderRepoTableRow from '~/import_entities/import_projects/components/provider_repo_table_row.vue'; describe('ImportProjectsTable', () => { let wrapper; diff --git a/spec/frontend/import_projects/components/provider_repo_table_row_spec.js b/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js index 03e30ef610e..aa003226050 100644 --- a/spec/frontend/import_projects/components/provider_repo_table_row_spec.js +++ b/spec/frontend/import_entities/import_projects/components/provider_repo_table_row_spec.js @@ -2,9 +2,9 @@ import { nextTick } from 'vue'; import Vuex from 'vuex'; import { createLocalVue, shallowMount } from '@vue/test-utils'; import { GlBadge } from '@gitlab/ui'; -import ProviderRepoTableRow from '~/import_projects/components/provider_repo_table_row.vue'; -import ImportStatus from '~/import_projects/components/import_status.vue'; -import { STATUSES } from '~/import_projects/constants'; +import ProviderRepoTableRow from '~/import_entities/import_projects/components/provider_repo_table_row.vue'; +import ImportStatus from '~/import_entities/components/import_status.vue'; +import { STATUSES } from '~/import_entities//constants'; import Select2Select from '~/vue_shared/components/select2_select.vue'; describe('ProviderRepoTableRow', () => { diff --git a/spec/frontend/import_projects/store/actions_spec.js b/spec/frontend/import_entities/import_projects/store/actions_spec.js index 06afb20c6a2..5d4e73a17a3 100644 --- a/spec/frontend/import_projects/store/actions_spec.js +++ b/spec/frontend/import_entities/import_projects/store/actions_spec.js @@ -17,11 +17,11 @@ import { RECEIVE_NAMESPACES_ERROR, SET_PAGE, SET_FILTER, -} from '~/import_projects/store/mutation_types'; -import actionsFactory from '~/import_projects/store/actions'; -import { getImportTarget } from '~/import_projects/store/getters'; -import state from '~/import_projects/store/state'; -import { STATUSES } from '~/import_projects/constants'; +} from '~/import_entities/import_projects/store/mutation_types'; +import actionsFactory from '~/import_entities/import_projects/store/actions'; +import { getImportTarget } from '~/import_entities/import_projects/store/getters'; +import state from '~/import_entities/import_projects/store/state'; +import { STATUSES } from '~/import_entities/constants'; jest.mock('~/flash'); diff --git a/spec/frontend/import_projects/store/getters_spec.js b/spec/frontend/import_entities/import_projects/store/getters_spec.js index 1ce42e534ea..f0ccffc19f2 100644 --- a/spec/frontend/import_projects/store/getters_spec.js +++ b/spec/frontend/import_entities/import_projects/store/getters_spec.js @@ -5,9 +5,9 @@ import { hasImportableRepos, importAllCount, getImportTarget, -} from '~/import_projects/store/getters'; -import { STATUSES } from '~/import_projects/constants'; -import state from '~/import_projects/store/state'; +} from '~/import_entities/import_projects/store/getters'; +import { STATUSES } from '~/import_entities/constants'; +import state from '~/import_entities/import_projects/store/state'; const IMPORTED_REPO = { importSource: {}, diff --git a/spec/frontend/import_projects/store/mutations_spec.js b/spec/frontend/import_entities/import_projects/store/mutations_spec.js index 5d78a7fa9e7..8b7ddffe6f4 100644 --- a/spec/frontend/import_projects/store/mutations_spec.js +++ b/spec/frontend/import_entities/import_projects/store/mutations_spec.js @@ -1,7 +1,7 @@ -import * as types from '~/import_projects/store/mutation_types'; -import mutations from '~/import_projects/store/mutations'; -import getInitialState from '~/import_projects/store/state'; -import { STATUSES } from '~/import_projects/constants'; +import * as types from '~/import_entities/import_projects/store/mutation_types'; +import mutations from '~/import_entities/import_projects/store/mutations'; +import getInitialState from '~/import_entities/import_projects/store/state'; +import { STATUSES } from '~/import_entities/constants'; describe('import_projects store mutations', () => { let state; diff --git a/spec/frontend/import_projects/utils_spec.js b/spec/frontend/import_entities/import_projects/utils_spec.js index 4e1e16a3184..7d9c4b7137e 100644 --- a/spec/frontend/import_projects/utils_spec.js +++ b/spec/frontend/import_entities/import_projects/utils_spec.js @@ -1,5 +1,9 @@ -import { isProjectImportable, isIncompatible, getImportStatus } from '~/import_projects/utils'; -import { STATUSES } from '~/import_projects/constants'; +import { + isProjectImportable, + isIncompatible, + getImportStatus, +} from '~/import_entities/import_projects/utils'; +import { STATUSES } from '~/import_entities/constants'; describe('import_projects utils', () => { const COMPATIBLE_PROJECT = { diff --git a/spec/frontend/pages/import/bitbucket_server/components/bitbucket_server_status_table_spec.js b/spec/frontend/pages/import/bitbucket_server/components/bitbucket_server_status_table_spec.js index 67ace608127..695d1b686a5 100644 --- a/spec/frontend/pages/import/bitbucket_server/components/bitbucket_server_status_table_spec.js +++ b/spec/frontend/pages/import/bitbucket_server/components/bitbucket_server_status_table_spec.js @@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils'; import { GlButton } from '@gitlab/ui'; import BitbucketServerStatusTable from '~/pages/import/bitbucket_server/status/components/bitbucket_server_status_table.vue'; -import BitbucketStatusTable from '~/import_projects/components/bitbucket_status_table.vue'; +import BitbucketStatusTable from '~/import_entities/import_projects/components/bitbucket_status_table.vue'; const BitbucketStatusTableStub = { name: 'BitbucketStatusTable', diff --git a/spec/frontend/terraform/components/states_table_actions_spec.js b/spec/frontend/terraform/components/states_table_actions_spec.js index d539e4e1844..bbbac2dd9d9 100644 --- a/spec/frontend/terraform/components/states_table_actions_spec.js +++ b/spec/frontend/terraform/components/states_table_actions_spec.js @@ -1,8 +1,17 @@ import { GlDropdown } from '@gitlab/ui'; -import { shallowMount } from '@vue/test-utils'; +import { createLocalVue, shallowMount } from '@vue/test-utils'; +import createMockApollo from 'jest/helpers/mock_apollo_helper'; +import VueApollo from 'vue-apollo'; import StateActions from '~/terraform/components/states_table_actions.vue'; +import lockStateMutation from '~/terraform/graphql/mutations/lock_state.mutation.graphql'; +import unlockStateMutation from '~/terraform/graphql/mutations/unlock_state.mutation.graphql'; + +const localVue = createLocalVue(); +localVue.use(VueApollo); describe('StatesTableActions', () => { + let lockResponse; + let unlockResponse; let wrapper; const defaultProps = { @@ -10,11 +19,29 @@ describe('StatesTableActions', () => { id: 'gid/1', name: 'state-1', latestVersion: { downloadPath: '/path' }, + lockedAt: '2020-10-13T00:00:00Z', }, }; + const createMockApolloProvider = () => { + lockResponse = jest.fn().mockResolvedValue({ data: { terraformStateLock: { errors: [] } } }); + + unlockResponse = jest + .fn() + .mockResolvedValue({ data: { terraformStateUnlock: { errors: [] } } }); + + return createMockApollo([ + [lockStateMutation, lockResponse], + [unlockStateMutation, unlockResponse], + ]); + }; + const createComponent = (propsData = defaultProps) => { + const apolloProvider = createMockApolloProvider(); + wrapper = shallowMount(StateActions, { + apolloProvider, + localVue, propsData, stubs: { GlDropdown }, }); @@ -22,37 +49,92 @@ describe('StatesTableActions', () => { return wrapper.vm.$nextTick(); }; + const findLockBtn = () => wrapper.find('[data-testid="terraform-state-lock"]'); + const findUnlockBtn = () => wrapper.find('[data-testid="terraform-state-unlock"]'); const findDownloadBtn = () => wrapper.find('[data-testid="terraform-state-download"]'); + beforeEach(() => { + return createComponent(); + }); + afterEach(() => { + lockResponse = null; + unlockResponse = null; wrapper.destroy(); }); - describe('when state has a latestVersion', () => { - beforeEach(() => { - return createComponent(); + describe('download button', () => { + it('displays a download button', () => { + expect(findDownloadBtn().text()).toBe('Download JSON'); }); - it('displays a download button', () => { - const downloadBtn = findDownloadBtn(); + describe('when state does not have a latestVersion', () => { + beforeEach(() => { + return createComponent({ + state: { + id: 'gid/1', + name: 'state-1', + latestVersion: null, + }, + }); + }); - expect(downloadBtn.text()).toBe('Download JSON'); + it('does not display a download button', () => { + expect(findDownloadBtn().exists()).toBe(false); + }); }); }); - describe('when state does not have a latestVersion', () => { - beforeEach(() => { - return createComponent({ - state: { - id: 'gid/1', - name: 'state-1', - latestVersion: null, - }, + describe('unlock button', () => { + it('displays an unlock button', () => { + expect(findUnlockBtn().text()).toBe('Unlock'); + expect(findLockBtn().exists()).toBe(false); + }); + + describe('when clicking the unlock button', () => { + beforeEach(() => { + findUnlockBtn().vm.$emit('click'); + return wrapper.vm.$nextTick(); + }); + + it('calls the unlock mutation', () => { + expect(unlockResponse).toHaveBeenCalledWith({ + stateID: defaultProps.state.id, + }); }); }); + }); + + describe('lock button', () => { + const unlockedProps = { + state: { + id: 'gid/2', + name: 'state-2', + latestVersion: null, + lockedAt: null, + }, + }; + + beforeEach(() => { + return createComponent(unlockedProps); + }); + + it('displays a lock button', () => { + expect(findLockBtn().text()).toBe('Lock'); + expect(findUnlockBtn().exists()).toBe(false); + }); - it('does not display a download button', () => { - expect(findDownloadBtn().exists()).toBe(false); + describe('when clicking the lock button', () => { + beforeEach(() => { + findLockBtn().vm.$emit('click'); + return wrapper.vm.$nextTick(); + }); + + it('calls the lock mutation', () => { + expect(lockResponse).toHaveBeenCalledWith({ + stateID: unlockedProps.state.id, + }); + }); }); }); }); diff --git a/spec/models/service_spec.rb b/spec/models/service_spec.rb index 3e8c66ab1ae..04b3920cd6c 100644 --- a/spec/models/service_spec.rb +++ b/spec/models/service_spec.rb @@ -921,6 +921,9 @@ RSpec.describe Service do end describe '.project_specific_services_names' do - it { expect(described_class.project_specific_services_names).to include('jenkins') } + it do + expect(described_class.project_specific_services_names) + .to include(*described_class::PROJECT_SPECIFIC_SERVICE_NAMES) + end end end |