Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing test: Jest Tests.x-pack/plugins/security/public/management/users/edit_user - EditUserPage validates change password form #115474

Closed
kibanamachine opened this issue Oct 18, 2021 · 9 comments
Assignees
Labels
blocker failed-test A test failure on a tracked branch, potentially flaky-test skipped-test Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.16.1 v8.0.0 v8.1.0

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Oct 18, 2021

A test failed on a tracked branch

Error: Unable to find an element with the text: /Enter your current password/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

<div
  data-eui="EuiFlyout"
  role="dialog"
>
  <button
    data-test-subj="euiFlyoutCloseButton"
    type="button"
  />
  <div
    class="euiFlyoutHeader euiFlyoutHeader--hasBorder"
  >
    <h2
      class="euiTitle euiTitle--medium"
      id="id-0.9655315406163589"
    >
      Change password
    </h2>
  </div>
  <div
    class="euiFlyoutBody"
  >
    <div
      class="euiFlyoutBody__overflow"
      tabindex="0"
    >
      <div
        class="euiFlyoutBody__overflowContent"
      >
        <form
          class="euiForm"
          novalidate=""
        >
          <div
            class="euiFormRow"
            id="id-0.3312805497711857-row"
          >
            <div
              class="euiFormRow__labelWrapper"
            >
              <label
                class="euiFormLabel euiFormRow__label"
                for="id-0.3312805497711857"
              >
                User
              </label>
            </div>
            <div
              class="euiFormRow__fieldWrapper"
            >
              <div
                class="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow"
                id="id-0.3312805497711857"
              >
                <div
                  class="euiFlexItem euiFlexItem--flexGrowZero"
                >
                  <span
                    data-euiicon-type="user"
                  />
                </div>
                <div
                  class="euiFlexItem"
                >
                  <div
                    class="euiSpacer euiSpacer--xs"
                  />
                  <div
                    class="euiText euiText--medium"
                  >
                    jdoe
                  </div>
                  <div
                    class="euiSpacer euiSpacer--xs"
                  />
                </div>
              </div>
            </div>
          </div>
          <div
            class="euiFormRow"
            id="id-0.14412468999004013-row"
          >
            <div
              class="euiFormRow__labelWrapper"
            >
              <label
                class="euiFormLabel euiFormRow__label euiFormLabel-isFocused"
                for="id-0.14412468999004013"
              >
                Current password
              </label>
            </div>
            <div
              class="euiFormRow__fieldWrapper"
            >
              <div
                class="euiFormControlLayout euiFormControlLayout--group"
              >
                <div
                  class="euiFormControlLayout__childrenWrapper"
                >
                  <input
                    autocomplete="current-password"
                    class="euiFieldPassword euiFieldPassword--inGroup euiFieldPassword--withToggle"
                    id="id-0.14412468999004013"
                    name="current_password"
                    type="password"
                    value=""
                  />
                  <div
                    class="euiFormControlLayoutIcons"
                  >
                    <span
                      class="euiFormControlLayoutCustomIcon"
                    >
                      <span
                        aria-hidden="true"
                        class="euiFormControlLayoutCustomIcon__icon"
                        data-euiicon-type="lock"
                      />
                    </span>
                  </div>
                </div>
                <button
                  aria-label="Show password as plain text. Note: this will visually expose your password on the screen."
                  class="euiButtonIcon euiButtonIcon--primary euiButtonIcon--empty euiButtonIcon--xSmall euiFormControlLayout__append"
                  title="Show password as plain text. Note: this will visually expose your password on the screen."
                  type="button"
                >
                  <span
                    aria-hidden="true"
                    class="euiButtonIcon__icon"
                    color="inherit"
                    data-euiicon-type="eye"
                  />
                </button>
              </div>
            </div>
          </div>
          <div
            class="euiFormRow"
            id="id-0.4367938190591081-row"
          >
            <div
              class="euiFormRow__labelWrapper"
            >
              <label
                class="euiFormLabel euiFormRow__label"
                for="id-0.4367938190591081"
              >
                New password
              </label>
            </div>
            <div
              class="euiFormRow__fieldWrapper"
            >
              <div
                class="euiFormControlLayout euiFormControlLayout--group"
              >
                <div
                  class="euiFormControlLayout__childrenWrapper"
                >
                  <input
                    aria-describedby="id-0.4367938190591081-help-0"
                    autocomplete="new-password"
                    class="euiFieldPassword euiFieldPassword--inGroup euiFieldPassword--withToggle"
                    id="id-0.4367938190591081"
                    name="password"
                    type="password"
                    value=""
                  />
                  <div
                    class="euiFormControlLayoutIcons"
                  >
                    <span
                      class="euiFormControlLayoutCustomIcon"
                    >
                      <span
                        aria-hidden="true"
                        class="euiFormControlLayoutCustomIcon__icon"
                        data-euiicon-type="lock"
                      />
                    </span>
                  </div>
                </div>
                <button
                  aria-label="Show password as plain text. Note: this will visually expose your password on the screen."
                  class="euiButtonIcon euiButtonIcon--primary euiButtonIcon--empty euiButtonIcon--xSmall euiFormControlLayout__append"
                  title="Show password as plain text. Note: this will visually expose your password on the screen."
                  type="button"
                >
                  <span
                    aria-hidden="true"
                    class="euiButtonIcon__icon"
                    color="inherit"
                    data-euiicon-type="eye"
                  />
                </button>
              </div>
              <div
                class="euiFormHelpText euiFormRow__text"
                id="id-0.4367938190591081-help-0"
              >
                Password must be at least 6 characters.
              </div>
            </div>
          </div>
          <div
            class="euiFormRow"
            id="id-0.8975772480250293-row"
          >
            <div
              class="euiFormRow__labelWrapper"
            >
              <label
                class="euiFormLabel euiFormRow__label"
                for="id-0.8975772480250293"
              >
                Confirm password
              </label>
            </div>
            <div
              class="euiFormRow__fieldWrapper"
            >
              <div
                class="euiFormControlLayout euiFormControlLayout--group"
              >
                <div
                  class="euiFormControlLayout__childrenWrapper"
                >
                  <input
                    autocomplete="new-password"
                    class="euiFieldPassword euiFieldPassword--inGroup euiFieldPassword--withToggle"
                    id="id-0.8975772480250293"
                    name="confirm_password"
                    type="password"
                    value=""
                  />
                  <div
                    class="euiFormControlLayoutIcons"
                  >
                    <span
                      class="euiFormControlLayoutCustomIcon"
                    >
                      <span
                        aria-hidden="true"
                        class="euiFormControlLayoutCustomIcon__icon"
                        data-euiicon-type="lock"
                      />
                    </span>
                  </div>
                </div>
                <button
                  aria-label="Show password as plain text. Note: this will visually expose your password on the screen."
                  class="euiButtonIcon euiButtonIcon--primary euiButtonIcon--empty euiButtonIcon--xSmall euiFormControlLayout__append"
                  title="Show password as plain text. Note: this will visually expose your password on the screen."
                  type="button"
                >
                  <span
                    aria-hidden="true"
                    class="euiButtonIcon__icon"
                    color="inherit"
                    data-euiicon-type="eye"
                  />
                </button>
              </div>
            </div>
          </div>
          <input
            hidden=""
            type="submit"
          />
        </form>
      </div>
    </div>
  </div>
  <div
    class="euiFlyoutFooter"
  >
    <div
      class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--justifyContentSpaceBetween euiFlexGroup--directionRow euiFlexGroup--responsive"
    >
      <div
        class="euiFlexItem euiFlexItem--flexGrowZero"
      >
        <button
          class="euiButtonEmpty euiButtonEmpty--primary euiButtonEmpty--flushRight"
          data-test-subj="formFlyoutCancelButton"
          type="button"
        >
          <span
            class="euiButtonContent euiButtonEmpty__content"
          >
            <span
              class="euiButtonEmpty__text"
            >
              Cancel
            </span>
          </span>
        </button>
      </div>
      <div
        class="euiFlexItem euiFlexItem--flexGrowZero"
      >
        <button
          class="euiButton euiButton--primary euiButton--fill"
          data-test-subj="formFlyoutSubmitButton"
          type="button"
        >
          <span
            class="euiButtonContent euiButton__content"
          >
            <span
              class="euiButton__text"
            >
              Change password
            </span>
          </span>
        </button>
      </div>
    </div>
  </div>
</div>
    at waitForWrapper (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/@testing-library/dom/dist/wait-for.js:173:27)
    at findByText (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/@testing-library/dom/dist/query-helpers.js:101:33)
    at Object.<anonymous> (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/x-pack/plugins/security/public/management/users/edit_user/edit_user_page.test.tsx:349:26)
    at _callCircusTest (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-circus/build/run.js:212:5)
    at _runTest (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-circus/build/run.js:149:3)
    at _runTestsForDescribeBlock (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-circus/build/run.js:63:9)
    at _runTestsForDescribeBlock (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-circus/build/run.js:57:9)
    at run (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-circus/build/run.js:25:3)
    at runAndTransformResultsToJestFormat (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:176:21)
    at jestAdapter (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:109:19)
    at runTestInternal (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-runner/build/runTest.js:380:16)
    at runTest (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-runner/build/runTest.js:472:34)
    at Object.worker (/opt/local-ssd/buildkite/builds/kb-c2-16-06eb455d777eb090/elastic/kibana-hourly/kibana/node_modules/jest-runner/build/testWorker.js:133:12)

First failure: CI Build - master

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Oct 18, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 18, 2021
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 7.16

@mistic mistic added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Oct 30, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 30, 2021
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 8.0

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 8.0

@jportner
Copy link
Contributor

jportner commented Nov 1, 2021

This is almost certainly failing for the same reason as #115473 (we recently overhauled this test suite), will close this issue in favor of the other one.

@jportner jportner closed this as completed Nov 1, 2021
@kibanamachine kibanamachine reopened this Nov 2, 2021
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - main

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 7.16

@mistic
Copy link
Member

mistic commented Nov 3, 2021

This test looks keeps failing. Skipping for now.

main/8.1: 1efcfb6
8.0: e612a34
7.16: 3308ff0

@jportner
Copy link
Contributor

jportner commented Nov 4, 2021

Now that this is skipped, closing again in favor of the other issue

@jportner jportner closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker failed-test A test failure on a tracked branch, potentially flaky-test skipped-test Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! v7.16.1 v8.0.0 v8.1.0
Projects
None yet
Development

No branches or pull requests

5 participants