diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-10-19 15:57:54 +0300 |
commit | 419c53ec62de6e97a517abd5fdd4cbde3a942a34 (patch) | |
tree | 1f43a548b46bca8a5fb8fe0c31cef1883d49c5b6 /app/assets/javascripts/snippets | |
parent | 1da20d9135b3ad9e75e65b028bffc921aaf8deb7 (diff) |
Add latest changes from gitlab-org/gitlab@16-5-stable-eev16.5.0-rc42
Diffstat (limited to 'app/assets/javascripts/snippets')
10 files changed, 16 insertions, 19 deletions
diff --git a/app/assets/javascripts/snippets/components/edit.vue b/app/assets/javascripts/snippets/components/edit.vue index 9e80210de51..aa3f33989c8 100644 --- a/app/assets/javascripts/snippets/components/edit.vue +++ b/app/assets/javascripts/snippets/components/edit.vue @@ -232,8 +232,7 @@ export default { <gl-form-input id="snippet-title" v-model="snippet.title" - data-testid="snippet-title-input" - data-qa-selector="snippet_title_field" + data-testid="snippet-title-input-field" :autofocus="true" /> </gl-form-group> @@ -261,7 +260,7 @@ export default { category="primary" type="submit" variant="confirm" - data-qa-selector="submit_button" + data-testid="submit-button" :disabled="isUpdating" >{{ saveButtonLabel }}</gl-button > diff --git a/app/assets/javascripts/snippets/components/embed_dropdown.vue b/app/assets/javascripts/snippets/components/embed_dropdown.vue index 17312c2373b..1510cc01810 100644 --- a/app/assets/javascripts/snippets/components/embed_dropdown.vue +++ b/app/assets/javascripts/snippets/components/embed_dropdown.vue @@ -53,7 +53,7 @@ export default { :aria-label="$options.MSG_COPY" :data-clipboard-text="value" icon="copy-to-clipboard" - data-qa-selector="copy_button" + data-testid="copy-button" :data-qa-action="name" /> </template> diff --git a/app/assets/javascripts/snippets/components/show.vue b/app/assets/javascripts/snippets/components/show.vue index 549b1bdd209..7a60fc6d26c 100644 --- a/app/assets/javascripts/snippets/components/show.vue +++ b/app/assets/javascripts/snippets/components/show.vue @@ -68,14 +68,14 @@ export default { <embed-dropdown v-if="embeddable" :url="snippet.webUrl" - data-qa-selector="snippet_embed_dropdown" + data-testid="snippet-embed-dropdown" /> <clone-dropdown-button v-if="canBeCloned" class="gl-ml-3" :ssh-link="snippet.sshUrlToRepo" :http-link="snippet.httpUrlToRepo" - data-qa-selector="clone_button" + data-testid="clone-button" /> </div> <gl-alert v-if="hasUnretrievableBlobs" variant="danger" class="gl-mb-3" :dismissible="false"> diff --git a/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue b/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue index 59f7c8d8d97..ca1d9f858a5 100644 --- a/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue +++ b/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue @@ -157,10 +157,9 @@ export default { </gl-form-group> <gl-button :disabled="!canAdd" - data-testid="add_button" + data-testid="add-button" class="gl-my-3" variant="dashed" - data-qa-selector="add_file_button" @click="addBlob" >{{ addLabel }}</gl-button > diff --git a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue index 021bd23781e..9b0a1db23f2 100644 --- a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue +++ b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue @@ -69,11 +69,11 @@ export default { }; </script> <template> - <div class="file-holder snippet" data-qa-selector="file_holder_container"> + <div class="file-holder snippet" data-testid="file-holder-container"> <blob-header-edit :id="inputId" :value="blob.path" - data-qa-selector="file_name_field" + data-testid="file-name-field" :can-delete="canDelete" :show-delete="showDelete" @input="notifyAboutUpdates({ path: $event })" diff --git a/app/assets/javascripts/snippets/components/snippet_description_edit.vue b/app/assets/javascripts/snippets/components/snippet_description_edit.vue index 3ce7ea231ff..93d52890675 100644 --- a/app/assets/javascripts/snippets/components/snippet_description_edit.vue +++ b/app/assets/javascripts/snippets/components/snippet_description_edit.vue @@ -36,7 +36,7 @@ export default { <gl-form-input class="form-control" :placeholder="s__('Snippets|Describe what your snippet does or how to use it…')" - data-qa-selector="description_placeholder" + data-testid="description-placeholder" /> </div> <markdown-field @@ -54,7 +54,7 @@ export default { :value="value" class="note-textarea js-gfm-input js-autosize markdown-area" dir="auto" - data-qa-selector="snippet_description_field" + data-testid="snippet-description-field" data-supports-quick-actions="false" :aria-label="__('Description')" :placeholder="__('Write a comment or drag your files here…')" diff --git a/app/assets/javascripts/snippets/components/snippet_description_view.vue b/app/assets/javascripts/snippets/components/snippet_description_view.vue index ab2ff6e0ef8..9eae096d6f2 100644 --- a/app/assets/javascripts/snippets/components/snippet_description_view.vue +++ b/app/assets/javascripts/snippets/components/snippet_description_view.vue @@ -20,7 +20,7 @@ export default { }; </script> <template> - <markdown-field-view class="snippet-description" data-qa-selector="snippet_description_content"> + <markdown-field-view class="snippet-description" data-testid="snippet-description-content"> <div v-safe-html:[$options.safeHtmlConfig]="description" class="md js-snippet-description" diff --git a/app/assets/javascripts/snippets/components/snippet_header.vue b/app/assets/javascripts/snippets/components/snippet_header.vue index 881e06113d9..56ea931fc8c 100644 --- a/app/assets/javascripts/snippets/components/snippet_header.vue +++ b/app/assets/javascripts/snippets/components/snippet_header.vue @@ -216,7 +216,7 @@ export default { <div class="detail-page-header-body"> <div class="snippet-box has-tooltip d-flex align-items-center gl-mr-2 mb-1" - data-qa-selector="snippet_container" + data-testid="snippet-container" :title="snippetVisibilityLevelDescription" data-container="body" > @@ -267,7 +267,7 @@ export default { :category="action.category" :class="action.cssClass" :href="action.href" - data-qa-selector="snippet_action_button" + data-testid="snippet-action-button" :data-qa-action="action.text" @click="action.click ? action.click() : undefined" >{{ action.text }}</gl-button @@ -321,8 +321,7 @@ export default { variant="danger" category="primary" :disabled="isLoading" - data-qa-selector="delete_snippet_button" - data-testid="delete-snippet" + data-testid="delete-snippet-button" @click="deleteSnippet" > <gl-loading-icon v-if="isLoading" size="sm" inline /> diff --git a/app/assets/javascripts/snippets/components/snippet_title.vue b/app/assets/javascripts/snippets/components/snippet_title.vue index 2cf7a1e267b..0e4dbf55963 100644 --- a/app/assets/javascripts/snippets/components/snippet_title.vue +++ b/app/assets/javascripts/snippets/components/snippet_title.vue @@ -20,7 +20,7 @@ export default { </script> <template> <div class="snippet-header limited-header-width"> - <h2 class="snippet-title gl-mt-0 mb-3" data-qa-selector="snippet_title_content"> + <h2 class="snippet-title gl-mt-0 mb-3" data-testid="snippet-title-content"> {{ snippet.title }} </h2> diff --git a/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue b/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue index 24dd978585c..37d10cffc78 100644 --- a/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue +++ b/app/assets/javascripts/snippets/components/snippet_visibility_edit.vue @@ -57,7 +57,7 @@ export default { <gl-icon :size="16" :name="option.icon" /> <span class="font-weight-bold ml-1 js-visibility-option" - data-qa-selector="visibility_content" + data-testid="visibility-content" :data-qa-visibility="option.label" >{{ option.label }}</span > |