diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-22 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-22 12:08:42 +0300 |
commit | 5956978e1d2aa2b5b35c2d79f67f6b9706b8ec4e (patch) | |
tree | 30f01d7e265cf3c6884cd9343b916e2a46fc9d8c /app/views | |
parent | c11591217a3b923a0ce36e0259bbb88c2e1601e7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
9 files changed, 16 insertions, 16 deletions
diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 16902ebe1d4..0c3a69cf569 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -37,7 +37,7 @@ - if project_nav_tab? :files = nav_link(controller: sidebar_repository_paths, unless: -> { current_path?('projects/graphs#charts') }) do - = link_to project_tree_path(@project), class: 'shortcuts-tree qa-project-menu-repo' do + = link_to project_tree_path(@project), class: 'shortcuts-tree', data: { qa_selector: "repository_link" } do .nav-icon-container = sprite_icon('doc-text') %span.nav-item-name#js-onboarding-repo-link @@ -58,11 +58,11 @@ = _('Commits') = nav_link(html_options: {class: branches_tab_class}) do - = link_to project_branches_path(@project), class: 'qa-branches-link', id: 'js-onboarding-branches-link' do + = link_to project_branches_path(@project), data: { qa_selector: "branches_link" }, id: 'js-onboarding-branches-link' do = _('Branches') = nav_link(controller: [:tags]) do - = link_to project_tags_path(@project) do + = link_to project_tags_path(@project), data: { qa_selector: "tags_link" } do = _('Tags') = nav_link(path: 'graphs#show') do diff --git a/app/views/projects/protected_tags/_create_protected_tag.html.haml b/app/views/projects/protected_tags/_create_protected_tag.html.haml index f53b81cada6..b58df9de380 100644 --- a/app/views/projects/protected_tags/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/_create_protected_tag.html.haml @@ -3,6 +3,6 @@ = dropdown_tag('Select', options: { toggle_class: 'js-allowed-to-create wide', dropdown_class: 'dropdown-menu-selectable capitalize-header', - data: { field_name: 'protected_tag[create_access_levels_attributes][0][access_level]', input_id: 'create_access_levels_attributes' }}) + data: { field_name: 'protected_tag[create_access_levels_attributes][0][access_level]', input_id: 'create_access_levels_attributes', qa_selector: 'access_levels_dropdown' }}) = render 'projects/protected_tags/shared/create_protected_tag' diff --git a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml index 020e6e187a6..8a6ae53a7c4 100644 --- a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml @@ -25,4 +25,4 @@ = yield :create_access_levels .card-footer - = f.submit 'Protect', class: 'btn-success btn', disabled: true + = f.submit 'Protect', class: 'btn-success btn', disabled: true, data: { qa_selector: 'protect_tag_button' } diff --git a/app/views/projects/protected_tags/shared/_dropdown.html.haml b/app/views/projects/protected_tags/shared/_dropdown.html.haml index 824a8604f6f..9c7f532fa29 100644 --- a/app/views/projects/protected_tags/shared/_dropdown.html.haml +++ b/app/views/projects/protected_tags/shared/_dropdown.html.haml @@ -6,7 +6,7 @@ footer_content: true, data: { show_no: true, show_any: true, show_upcoming: true, selected: params[:protected_tag_name], - project_id: @project.try(:id) } }) do + project_id: @project.try(:id), qa_selector: 'tags_dropdown' } }) do %ul.dropdown-footer-list %li diff --git a/app/views/projects/protected_tags/shared/_index.html.haml b/app/views/projects/protected_tags/shared/_index.html.haml index b0c87ac8c17..4bf3ce09fc7 100644 --- a/app/views/projects/protected_tags/shared/_index.html.haml +++ b/app/views/projects/protected_tags/shared/_index.html.haml @@ -1,6 +1,6 @@ - expanded = expanded_by_default? -%section.settings.no-animate#js-protected-tags-settings{ class: ('expanded' if expanded) } +%section.settings.no-animate#js-protected-tags-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_tag_settings_content' } } .settings-header %h4 Protected Tags diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index 6ad7cf1848f..e3d3f2226a8 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -24,7 +24,7 @@ %li = link_to title, filter_tags_path(sort: value), class: ("is-active" if @sort == value) - if can?(current_user, :admin_tag, @project) - = link_to new_project_tag_path(@project), class: 'btn btn-success new-tag-btn' do + = link_to new_project_tag_path(@project), class: 'btn btn-success new-tag-btn', data: { qa_selector: "new_tag_button" } do = s_('TagsPage|New tag') = link_to project_tags_path(@project, rss_url_options), title: _("Tags feed"), class: 'btn d-none d-sm-inline-block has-tooltip' do = icon("rss") diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 5aabfdd022a..c874a510e61 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -14,7 +14,7 @@ .form-group.row = label_tag :tag_name, nil, class: 'col-form-label col-sm-2' .col-sm-10 - = text_field_tag :tag_name, params[:tag_name], required: true, autofocus: true, class: 'form-control' + = text_field_tag :tag_name, params[:tag_name], required: true, autofocus: true, class: 'form-control', data: { qa_selector: "tag_name_field" } .form-group.row = label_tag :ref, 'Create from', class: 'col-form-label col-sm-2' .col-sm-10.create-from @@ -29,7 +29,7 @@ .form-group.row = label_tag :message, nil, class: 'col-form-label col-sm-2' .col-sm-10 - = text_area_tag :message, @message, required: false, class: 'form-control', rows: 5 + = text_area_tag :message, @message, required: false, class: 'form-control', rows: 5, data: { qa_selector: "tag_message_field" } .form-text.text-muted = tag_description_help_text %hr @@ -47,10 +47,10 @@ = s_('TagsPage|Optionally, create a public Release of your project, based on this tag. Release notes are displayed on the %{releases_page_link_start}Releases%{link_end} page. %{docs_link_start}More information%{link_end}').html_safe % replacements = render layout: 'shared/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do - = render 'shared/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files here…'), current_text: @release_description + = render 'shared/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files here…'), current_text: @release_description, qa_selector: 'release_notes_field' = render 'shared/notes/hints' .form-actions - = button_tag s_('TagsPage|Create tag'), class: 'btn btn-success' + = button_tag s_('TagsPage|Create tag'), class: 'btn btn-success', data: { qa_selector: "create_tag_button" } = link_to s_('TagsPage|Cancel'), project_tags_path(@project), class: 'btn btn-cancel' -# haml-lint:disable InlineJavaScript %script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index 6f53a687fb9..b98906a6863 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -9,7 +9,7 @@ .top-area.multi-line.flex-wrap .nav-text .title - %span.item-title.ref-name + %span.item-title.ref-name{ data: { qa_selector: 'tag_name_content' } } = icon('tag') = @tag.name - if protected_tag?(@project, @tag) @@ -56,12 +56,12 @@ %i.fa.fa-trash-o - if @tag.message.present? - %pre.wrap + %pre.wrap{ data: { qa_selector: 'tag_message_content' } } = strip_signature(@tag.message) .append-bottom-default.prepend-top-default - if @release.description.present? - .description.md + .description.md{ data: { qa_selector: 'tag_release_notes_content' } } = markdown_field(@release, :description) - else = s_('TagsPage|This tag has no release notes.') diff --git a/app/views/shared/_zen.html.haml b/app/views/shared/_zen.html.haml index 8dd0e5a92a7..914409d0e65 100644 --- a/app/views/shared/_zen.html.haml +++ b/app/views/shared/_zen.html.haml @@ -14,6 +14,6 @@ supports_autocomplete: supports_autocomplete, qa_selector: qa_selector } - else - = text_area_tag attr, current_text, class: classes, placeholder: placeholder + = text_area_tag attr, current_text, data: { qa_selector: qa_selector }, class: classes, placeholder: placeholder %a.zen-control.zen-control-leave.js-zen-leave.gl-text-gray-700{ href: "#" } = sprite_icon('compress', size: 16) |