Skip to content
Snippets Groups Projects

Convert Admin Mode form to Pajamas

Merged Eduardo Sanz García requested to merge eduardosanz/vue-password-tests-2 into master

What does this MR do and why?

General improvement in the Admin Mode:

  • Converted the form and the submit button to Pajamas.
  • Normalize and improve vertical spaces.
  • Removed .submit-container class.

Screenshots or screen recordings

Restyle enabled

Before After
image image

Restyle disabled

Before After
image image

How to set up and validate locally

  1. Enable the Admin Mode in:
  2. Enter Admin Mode

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Merged results pipeline #914835756 passed with warnings

Pipeline: E2E Omnibus GitLab EE

#914843146

    Pipeline: GitLab

    #914841450

      Pipeline: TRIGGERED_EE_PIPELINE

      #914842441

        +1

        Merged results pipeline passed with warnings for 25e7d2e7

        Test coverage 82.22% (15.52%) from 2 jobs

        Merged by Andrew FontaineAndrew Fontaine 1 year ago (Jun 28, 2023 2:54pm UTC)

        Loading

        Pipeline #914901876 passed

        Pipeline passed for f0f64232 on master

        Test coverage 66.76% (15.52%) from 2 jobs
        10 environments impacted.

        Activity

        Filter activity
        • Approvals
        • Assignees & reviewers
        • Comments (from bots)
        • Comments (from users)
        • Commits & branches
        • Edits
        • Labels
        • Lock status
        • Mentions
        • Merge request status
        • Tracking
        • Eduardo Sanz García changed milestone to %16.2

          changed milestone to %16.2

        • A deleted user added backend label

          added backend label

        • 3 Warnings
          :warning:

          featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.

          For more information, see:

          :warning: This merge request contains lines with QA selectors. Please ensure e2e:package-and-test job is run.
          :warning: You've made some app changes, but didn't add any tests.
          That's OK as long as you're refactoring existing code,
          but please consider adding any of the maintenancepipelines, maintenancerefactor, maintenanceworkflow, documentation, QA labels.
          1 Message
          :book: CHANGELOG missing:

          If you want to create a changelog entry for GitLab FOSS, add the Changelog trailer to the commit message you want to add to the changelog.

          If you want to create a changelog entry for GitLab EE, also add the EE: true trailer to your commit message.

          If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.

          QA Selectors

          The following changed lines in this MR contain QA selectors:

          • file app/views/admin/sessions/_new_base.html.haml:
            • = password_field_tag 'user[password]', nil, { class: 'form-control js-password', data: { id: 'user_password', name: 'user[password]', qa_selector: 'password_field', testid: 'password-field' } }
            • = f.password_field :password, class: 'form-control js-password', data: { id: 'user_password', name: 'user[password]', qa_selector: 'password_field', testid: 'password-field' }
            • = submit_tag _('Enter admin mode'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'enter_admin_mode_button' }
            • = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, block: true, button_options: { data: { qa_selector: 'enter_admin_mode_button' } }) do
          • file app/views/devise/sessions/_new_ldap.html.haml:
            • = f.text_field :vue_password_placeholder, class: 'form-control gl-form-input js-password', data: { id: "#{provider}_password", name: 'password', qa_selector: 'password_field' }
            • %input.form-control.gl-form-input.js-password{ data: { id: "#{provider}_password", name: 'password', qa_selector: 'password_field' } }

          Please ensure e2e:package-and-test job is run and the tests are passing.

          For the list of known failures please refer to the latest pipeline triage issue.

          If your changes are under a feature flag, please check our Testing with feature flags documentation for instructions.

          Reviewer roulette

          Changes that require review have been detected!

          Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:

          Category Reviewer Maintainer
          backend Michael Becker current availability (@wandering_person) (UTC-7, 9 hours behind @eduardosanz) Brian Williams current availability (@bwill) (UTC-5, 7 hours behind @eduardosanz)
          frontend Scott de Jonge current availability (@sdejonge) (UTC+10, 8 hours ahead of @eduardosanz) Tristan Read current availability (@tristan.read) (UTC+12, 10 hours ahead of @eduardosanz)
          ~"group::authentication and authorization" Reviewer review is optional for ~"group::authentication and authorization" Smriti Garg current availability (@sgarg_gitlab) (UTC+5.5, 3.5 hours ahead of @eduardosanz)

          To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.

          To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.

          Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.

          If needed, you can retry the :repeat: danger-review job that generated this comment.

          Generated by :no_entry_sign: Danger

          Edited by Ghost User
        • Allure report

          allure-report-publisher generated test report!

          e2e-test-on-gdk: :x: test report for 605c9778

          expand test summary
          +-----------------------------------------------------------------------+
          |                            suites summary                             |
          +------------------+--------+--------+---------+-------+-------+--------+
          |                  | passed | failed | skipped | flaky | total | result |
          +------------------+--------+--------+---------+-------+-------+--------+
          | Framework sanity | 0      | 0      | 1       | 0     | 1     | ➖     |
          | Create           | 8      | 0      | 1       | 6     | 9     | ❗     |
          | Plan             | 0      | 4      | 0       | 4     | 4     | ❌     |
          | Monitor          | 4      | 0      | 0       | 4     | 4     | ❗     |
          | Manage           | 1      | 0      | 0       | 0     | 1     | ✅     |
          | Govern           | 2      | 0      | 0       | 0     | 2     | ✅     |
          | Data Stores      | 2      | 0      | 0       | 0     | 2     | ✅     |
          +------------------+--------+--------+---------+-------+-------+--------+
          | Total            | 17     | 4      | 2       | 14    | 23    | ❌     |
          +------------------+--------+--------+---------+-------+-------+--------+

          e2e-package-and-test: :x: test report for 605c9778

          expand test summary
          +-----------------------------------------------------------------------+
          |                            suites summary                             |
          +------------------+--------+--------+---------+-------+-------+--------+
          |                  | passed | failed | skipped | flaky | total | result |
          +------------------+--------+--------+---------+-------+-------+--------+
          | Verify           | 196    | 0      | 20      | 4     | 216   | ❗     |
          | Fulfillment      | 10     | 0      | 100     | 0     | 110   | ✅     |
          | Manage           | 174    | 1      | 31      | 10    | 206   | ❌     |
          | Data Stores      | 151    | 0      | 3       | 0     | 154   | ✅     |
          | Create           | 693    | 0      | 107     | 10    | 800   | ❗     |
          | Package          | 233    | 0      | 46      | 24    | 279   | ❗     |
          | Plan             | 318    | 0      | 3       | 0     | 321   | ✅     |
          | Release          | 24     | 0      | 0       | 0     | 24    | ✅     |
          | Govern           | 193    | 0      | 12      | 0     | 205   | ✅     |
          | Configure        | 1      | 0      | 12      | 0     | 13    | ✅     |
          | Systems          | 13     | 0      | 0       | 0     | 13    | ✅     |
          | Analytics        | 9      | 0      | 0       | 0     | 9     | ✅     |
          | Monitor          | 44     | 0      | 9       | 0     | 53    | ✅     |
          | Secure           | 8      | 0      | 36      | 0     | 44    | ✅     |
          | Framework sanity | 0      | 0      | 6       | 0     | 6     | ➖     |
          | GitLab Metrics   | 2      | 0      | 1       | 0     | 3     | ✅     |
          | Growth           | 0      | 0      | 8       | 0     | 8     | ➖     |
          | ModelOps         | 0      | 0      | 4       | 0     | 4     | ➖     |
          +------------------+--------+--------+---------+-------+-------+--------+
          | Total            | 2069   | 1      | 398     | 48    | 2468  | ❌     |
          +------------------+--------+--------+---------+-------+-------+--------+
          Edited by Ghost User
        • requested review from @tachyons-gitlab and @mfluharty

      • Eduardo Sanz García resolved all threads

        resolved all threads

      • added 1 commit

        • 2ff726b7 - Apply suggestion from backend review

        Compare with previous version

      • added 1 commit

        • 8f68b008 - Apply suggestion from backend review

        Compare with previous version

      • :wave: @eduardosanz, please can you answer the question: Should this have a feature flag? to help with code review for the Authentication and Authorization group.

        This nudge was added by this triage-ops policy.

      • I haven't validated this on my machine, but code looks good from backend perspective

      • Aboobacker MK requested review from @jarka and removed review request for @tachyons-gitlab

        requested review from @jarka and removed review request for @tachyons-gitlab

      • Jarka Košanová approved this merge request

        approved this merge request

      • :wave: @jarka, thanks for approving this merge request.

        This is the first time the merge request is approved. To ensure full test coverage, a new pipeline will be started shortly.

        For more info, please refer to the following links:

      • Loading
      • Loading
      • Loading
      • Loading
      • Loading
      • Loading
      • Loading
      • Loading
      • Loading
      • Loading
      • Please register or sign in to reply
        Loading