Uploaded image for project: 'OpenShift Dev Console'
  1. OpenShift Dev Console
  2. ODC-7761

Fix ImagesSection.spec.tsx unit tests

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • UI
    • None
    • ODC Sprint 3269

      ImagesSection should submit right form data when user fills out an image stream tag: ImagesSection should submit right form data when user fills out an image stream tag expand_less    6s

       

      {  Error: expect(jest.fn()).toHaveBeenCalledTimes(1)

      Expected mock function to have been called one time, but it was called zero times.

      Ignored nodes: comments, <script />, <style />
      <html>
        <head />
        <body>
          <div>
            <form>
              <div
                class="pf-v6-c-form co-m-pane__form"
                data-test="section images"
              >
                <h2
                  class="odc-form-section__heading"
                >
                  Images
                </h2>
                <div
                  class="pf-v6-c-form co-m-pane__form"
                >
                  <div
                    class="pf-v6-c-form__group"
                  >
                    <div
                      class="pf-v6-c-form__group-label"
                    >
                      <label
                        class="pf-v6-c-form__label"
                        for="form-dropdown-formData-images-buildFrom-type-field"
                      >
                        <span
                          class="pf-v6-c-form__label-text"
                        >
                          Build from
                        </span>
                        <span
                          aria-hidden="true"
                          class="pf-v6-c-form__label-required"
                        >
                           
                          *
                        </span>
                      </label>
                        
                    </div>
                    <div
                      class="pf-v6-c-form__group-control"
                    >
                      <div>
                        <div
                          class="pf-v6-c-dropdown"
                        >
                          <button
                            aria-expanded="false"
                            aria-haspopup="true"
                            class="pf-v6-c-menu-toggle"
                            data-test="build-from type"
                            data-test-id="dropdown-button"
                            id="form-dropdown-formData-images-buildFrom-type-field"
                            type="button"
                          >
                            <span
                              class="pf-v6-c-dropdown__toggle-text"
                            >
                              Image Stream Tag
                            </span>
                            <svg
                              aria-hidden="true"
                              class="pf-v6-svg pf-c-dropdown__toggle-icon"
                              fill="currentColor"
                              height="1em"
                              role="img"
                              viewBox="0 0 320 512"
                              width="1em"
                            >
                              <path
                                d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
                              />
                            </svg>
                          </button>
                        </div>
                      </div>
                      <div
                        class="pf-v6-c-form__helper-text"
                      >
                        <div
                          class="pf-v6-c-helper-text"
                        >
                          <div
                            class="pf-v6-c-helper-text__item"
                          >
                            <span
                              class="pf-v6-c-helper-text__item-text"
                            />
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <div
                    class="pf-v6-c-form__group"
                    data-test="build-from image-stream-tag"
                  >
                    <div
                      class="pf-v6-c-form__group-label"
                    >
                      <label
                        class="pf-v6-c-form__label"
                        for="image-stream-dropdowns"
                      >
                        <span
                          class="pf-v6-c-form__label-text"
                        >
                          Image stream tag
                        </span>
                      </label>
                        
                    </div>
                    <div
                      class="pf-v6-c-form__group-control"
                    >
                      <div
                        class="pf-v6-c-form__group"
                      >
                        <div
                          class="pf-v6-c-form__group-label"
                        >
                          <label
                            class="pf-v6-c-form__label"
                            for="form-dropdown-formData-images-buildFrom-imageStreamTag-imageStream-namespace-field"
                          >
                            <span
                              class="pf-v6-c-form__label-text"
                            >
                              Project
                            </span>
                          </label>
                            
                        </div>
                        <div
                          class="pf-v6-c-form__group-control"
                        >
                          <div>
                            <div
                              class="pf-v6-c-dropdown"
                            >
                              <button
                                aria-expanded="false"
                                aria-haspopup="true"
                                class="pf-v6-c-menu-toggle"
                                data-test-id="dropdown-button"
                                id="form-dropdown-formData-images-buildFrom-imageStreamTag-imageStream-namespace-field"
                                type="button"
                              >
                                <span
                                  class="pf-v6-c-dropdown__toggle-text"
                                >
                                  project-a
                                </span>
                                <svg
                                  aria-hidden="true"
                                  class="pf-v6-svg pf-c-dropdown__toggle-icon"
                                  fill="currentColor"
                                  height="1em"
                                  role="img"
                                  viewBox="0 0 320 512"
                                  width="1em"
                                >
                                  <path
                                    d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
                                  />
                                </svg>
                              </button>
                            </div>
                          </div>
                          <div
                            class="pf-v6-c-form__helper-text"
                          >
                            <div
                              class="pf-v6-c-helper-text"
                            >
                              <div
                                class="pf-v6-c-helper-text__item"
                              >
                                <span
                                  class="pf-v6-c-helper-text__item-text"
                                />
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div
                        class="pf-v6-c-form__group"
                      >
                        <div
                          class="pf-v6-c-form__group-label"
                        >
                          <label
                            class="pf-v6-c-form__label"
                            for="form-dropdown-formData-images-buildFrom-imageStreamTag-imageStream-image-field"
                          >
                            <span
                              class="pf-v6-c-form__label-text"
                            >
                              Image Stream
                            </span>
                          </label>
                            
                        </div>
                        <div
                          class="pf-v6-c-form__group-control"
                        >
                          <div>
                            <div
                              class="pf-v6-c-dropdown"
                            >
                              <button
                                aria-expanded="false"
                                aria-haspopup="true"
                                class="pf-v6-c-menu-toggle"
                                data-test-id="dropdown-button"
                                id="form-dropdown-formData-images-buildFrom-imageStreamTag-imageStream-image-field"
                                type="button"
                              >
                                <span
                                  class="pf-v6-c-dropdown__toggle-text"
                                >
                                  imagestream-a
                                </span>
                                <svg
                                  aria-hidden="true"
                                  class="pf-v6-svg pf-c-dropdown__toggle-icon"
                                  fill="currentColor"
                                  height="1em"
                                  role="img"
                                  viewBox="0 0 320 512"
                                  width="1em"
                                >
                                  <path
                                    d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
                                  />
                                </svg>
                              </button>
                            </div>
                          </div>
                          <div
                            class="pf-v6-c-form__helper-text"
                          >
                            <div
                              class="pf-v6-c-helper-text"
                            >
                              <div
                                class="pf-v6-c-helper-text__item"
                              >
                                <span
                                  class="pf-v6-c-helper-text__item-text"
                                />
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div
                        class="pf-v6-c-form__group"
                      >
                        <div
                          class="pf-v6-c-form__group-label"
                        >
                          <label
                            class="pf-v6-c-form__label"
                            for="form-dropdown-formData-images-buildFrom-imageStreamTag-imageStream-tag-field"
                          >
                            <span
                              class="pf-v6-c-form__label-text"
                            >
                              Tag
                            </span>
                          </label>
                            
                        </div>
                        <div
                          class="pf-v6-c-form__group-control"
                        >
                          <div>
                            <div
                              class="pf-v6-c-dropdown"
                            >
                              <button
                                aria-expanded="false"
                                aria-haspopup="true"
                                class="pf-v6-c-menu-toggle"
                                data-test-id="dropdown-button"
                                id="form-dropdown-formData-images-buildFrom-imageStreamTag-imageStream-tag-field"
                                type="button"
                              >
                                <span
                                  class="pf-v6-c-dropdown__toggle-text"
                                >
                                  latest
                                </span>
                                <svg
                                  aria-hidden="true"
                                  class="pf-v6-svg pf-c-dropdown__toggle-icon"
                                  fill="currentColor"
                                  height="1em"
                                  role="img"
                                  viewBox="0 0 320 512"
                                  width="1em"
                                >
                                  <path
                                    d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
                                  />
                                </svg>
                              </button>
                            </div>
                          </div>
                          <div
                            class="pf-v6-c-form__helper-text"
                          >
                            <div
                              class="pf-v6-c-helper-text"
                            >
                              <div
                                class="pf-v6-c-helper-text__item"
                              >
                                <span
                                  class="pf-v6-c-helper-text__item-text"
                                />
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <div
                  class="pf-v6-c-form co-m-pane__form"
                >
                  <div
                    class="pf-v6-c-form__group"
                  >
                    <div
                      class="pf-v6-c-form__group-label"
                    >
                      <label
                        class="pf-v6-c-form__label"
                        for="form-dropdown-formData-images-pushTo-type-field"
                      >
                        <span
                          class="pf-v6-c-form__label-text"
                        >
                          Push to
                        </span>
                      </label>
                        
                    </div>
                    <div
                      class="pf-v6-c-form__group-control"
                    >
                      <div>
                        <div
                          class="pf-v6-c-dropdown"
                        >
                          <button
                            aria-expanded="false"
                            aria-haspopup="true"
                            class="pf-v6-c-menu-toggle"
                            data-test="push-to type"
                            data-test-id="dropdown-button"
                            id="form-dropdown-formData-images-pushTo-type-field"
                            type="button"
                          >
                            <span
                              class="pf-v6-c-dropdown__toggle-text"
                            >
                              None
                            </span>
                            <svg
                              aria-hidden="true"
                              class="pf-v6-svg pf-c-dropdown__toggle-icon"
                              fill="currentColor"
                              height="1em"
                              role="img"
                              viewBox="0 0 320 512"
                              width="1em"
                            >
                              <path
                                d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
                              />
                            </svg>
                          </button>
                        </div>
                      </div>
                      <div
                        class="pf-v6-c-form__helper-text"
                      >
                        <div
                          class="pf-v6-c-helper-text"
                        >
                          <div
                            class="pf-v6-c-helper-text__item"
                          >
                            <span
                              class="pf-v6-c-helper-text__item-text"
                            />
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <input
                type="submit"
                value="Submit"
              />
            </form>
          </div>
        </body>
      </html>
          at /go/src/github.com/openshift/console/frontend/packages/dev-console/src/components/buildconfig/sections/_tests_/ImagesSection.spec.tsx:308:24

              viraj-1 Vikram Raj
              viraj-1 Vikram Raj
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: