ManageIQ/manageiq-ui-classic

View on GitHub
app/javascript/spec/async-credentials/__snapshots__/password-field.spec.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Secret switch field component should render correctly in edit mode 1`] = `
<PasswordField
  cancelEditLabel="Cancel"
  changeEditLabel="Change"
  componentClass="text-field"
  edit={true}
  name="foo"
>
  <FormGroup
    hasMargin={true}
    invalid={false}
    legendText=""
    message={false}
    messageText=""
  >
    <fieldset
      className="bx--fieldset"
    >
      <legend
        className="bx--label"
      />
      <div
        className="bx--grid"
        style={
          Object {
            "marginLeft": 0,
            "paddingLeft": 0,
          }
        }
      >
        <div
          className="bx--row"
        >
          <div
            className="bx--col-lg-15 bx--col-md-7 bx--col-sm-3"
          >
            <TextInput
              autoComplete="new-password"
              disabled={true}
              id="foo-password-placeholder"
              labelText=""
              placeholder="●●●●●●●●"
              type="password"
            >
              <div
                className="bx--form-item bx--text-input-wrapper"
              >
                <div
                  className="bx--text-input__field-outer-wrapper"
                >
                  <div
                    className="bx--text-input__field-wrapper"
                    data-invalid={null}
                  >
                    <input
                      autoComplete="new-password"
                      className="bx--text-input bx--text-input--md"
                      disabled={true}
                      id="foo-password-placeholder"
                      onChange={[Function]}
                      onClick={[Function]}
                      placeholder="●●●●●●●●"
                      title="●●●●●●●●"
                      type="password"
                    />
                  </div>
                </div>
              </div>
            </TextInput>
          </div>
          <div
            className="bx--col-sm-1 bx--col-md-1 bx--col-lg-1"
          >
            <Button
              hasIconOnly={true}
              iconDescription="Change"
              kind="primary"
              onClick={[Function]}
              renderIcon={
                Object {
                  "$$typeof": Symbol(react.forward_ref),
                  "render": [Function],
                }
              }
              size="field"
            >
              <button
                aria-describedby={null}
                aria-pressed={null}
                className="bx--btn bx--btn--md bx--btn--primary bx--tooltip--hidden bx--btn--icon-only bx--tooltip__trigger bx--tooltip--a11y bx--btn--icon-only--top bx--tooltip--align-center"
                disabled={false}
                onBlur={[Function]}
                onClick={[Function]}
                onFocus={[Function]}
                onMouseEnter={[Function]}
                onMouseLeave={[Function]}
                tabIndex={0}
                type="button"
              >
                <div
                  className="bx--assistive-text"
                  onMouseEnter={[Function]}
                >
                  Change
                </div>
                <ForwardRef(Edit16)
                  aria-hidden="true"
                  aria-label="Change"
                  className="bx--btn__icon"
                >
                  <Icon
                    aria-hidden="true"
                    aria-label="Change"
                    className="bx--btn__icon"
                    fill="currentColor"
                    height={16}
                    preserveAspectRatio="xMidYMid meet"
                    viewBox="0 0 32 32"
                    width={16}
                    xmlns="http://www.w3.org/2000/svg"
                  >
                    <svg
                      aria-hidden="true"
                      aria-label="Change"
                      className="bx--btn__icon"
                      fill="currentColor"
                      focusable="false"
                      height={16}
                      preserveAspectRatio="xMidYMid meet"
                      role="img"
                      viewBox="0 0 32 32"
                      width={16}
                      xmlns="http://www.w3.org/2000/svg"
                    >
                      <path
                        d="M2 26H30V28H2zM25.4 9c.8-.8.8-2 0-2.8 0 0 0 0 0 0l-3.6-3.6c-.8-.8-2-.8-2.8 0 0 0 0 0 0 0l-15 15V24h6.4L25.4 9zM20.4 4L24 7.6l-3 3L17.4 7 20.4 4zM6 22v-3.6l10-10 3.6 3.6-10 10H6z"
                      />
                    </svg>
                  </Icon>
                </ForwardRef(Edit16)>
              </button>
            </Button>
          </div>
        </div>
      </div>
    </fieldset>
  </FormGroup>
</PasswordField>
`;

exports[`Secret switch field component should render correctly in non edit mode 1`] = `
<PasswordField
  cancelEditLabel="Cancel"
  changeEditLabel="Change"
  componentClass="text-field"
  edit={false}
  name="foo"
>
  <MockDummyComponent
    autoComplete="new-password"
    component="text-field"
    name="foo"
    type="password"
  >
    <button
      autoComplete="new-password"
      component="text-field"
      name="foo"
      type="button"
    >
      Dummy
    </button>
  </MockDummyComponent>
</PasswordField>
`;