diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 12:08:40 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-22 12:08:40 +0000 |
commit | be3e24ea3c9f497efde85900df298ce9bc42fce8 (patch) | |
tree | fd0de9443253a1b21ca9a2741dc34ba3aef795be /spec/frontend/vue_shared/components | |
parent | 001243986195143c395a9811d8254bbf1b9ebfa1 (diff) | |
download | gitlab-ce-be3e24ea3c9f497efde85900df298ce9bc42fce8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components')
-rw-r--r-- | spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap | 88 | ||||
-rw-r--r-- | spec/frontend/vue_shared/components/expand_button_spec.js | 4 |
2 files changed, 83 insertions, 9 deletions
diff --git a/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap b/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap index 3a518029702..2abcc53bf14 100644 --- a/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap +++ b/spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap @@ -1,14 +1,88 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Expand button on click when short text is provided renders button after text 1`] = ` -"<span><button aria-label=\\"Click to expand text\\" type=\\"button\\" class=\\"btn js-text-expander-prepend text-expander btn-blank btn-secondary\\" style=\\"display: none;\\"><svg aria-hidden=\\"true\\" class=\\"s12 ic-ellipsis_h\\"><use xlink:href=\\"#ellipsis_h\\"></use></svg></button> <!----> <span><p>Expanded!</p></span> <button aria-label=\\"Click to expand text\\" type=\\"button\\" class=\\"btn js-text-expander-append text-expander btn-blank btn-secondary\\" style=\\"\\"><svg aria-hidden=\\"true\\" class=\\"s12 ic-ellipsis_h\\"> - <use xlink:href=\\"#ellipsis_h\\"></use> - </svg></button></span>" +<span> + <button + aria-label="Click to expand text" + class="btn js-text-expander-prepend text-expander btn-blank btn-secondary btn-md" + style="display: none;" + type="button" + > + <svg + aria-hidden="true" + class="s12 ic-ellipsis_h" + > + <use + xlink:href="#ellipsis_h" + /> + </svg> + </button> + + <!----> + + <span> + <p> + Expanded! + </p> + </span> + + <button + aria-label="Click to expand text" + class="btn js-text-expander-append text-expander btn-blank btn-secondary btn-md" + style="" + type="button" + > + <svg + aria-hidden="true" + class="s12 ic-ellipsis_h" + > + <use + xlink:href="#ellipsis_h" + /> + </svg> + </button> +</span> `; exports[`Expand button when short text is provided renders button before text 1`] = ` -"<span><button aria-label=\\"Click to expand text\\" type=\\"button\\" class=\\"btn js-text-expander-prepend text-expander btn-blank btn-secondary\\"><svg aria-hidden=\\"true\\" class=\\"s12 ic-ellipsis_h\\"><use xlink:href=\\"#ellipsis_h\\"></use></svg></button> <span><p>Short</p></span> -<!----> <button aria-label=\\"Click to expand text\\" type=\\"button\\" class=\\"btn js-text-expander-append text-expander btn-blank btn-secondary\\" style=\\"display: none;\\"><svg aria-hidden=\\"true\\" class=\\"s12 ic-ellipsis_h\\"> - <use xlink:href=\\"#ellipsis_h\\"></use> - </svg></button></span>" +<span> + <button + aria-label="Click to expand text" + class="btn js-text-expander-prepend text-expander btn-blank btn-secondary btn-md" + type="button" + > + <svg + aria-hidden="true" + class="s12 ic-ellipsis_h" + > + <use + xlink:href="#ellipsis_h" + /> + </svg> + </button> + + <span> + <p> + Short + </p> + </span> + + <!----> + + <button + aria-label="Click to expand text" + class="btn js-text-expander-append text-expander btn-blank btn-secondary btn-md" + style="display: none;" + type="button" + > + <svg + aria-hidden="true" + class="s12 ic-ellipsis_h" + > + <use + xlink:href="#ellipsis_h" + /> + </svg> + </button> +</span> `; diff --git a/spec/frontend/vue_shared/components/expand_button_spec.js b/spec/frontend/vue_shared/components/expand_button_spec.js index 3b1c8f6219c..aea90e5b31f 100644 --- a/spec/frontend/vue_shared/components/expand_button_spec.js +++ b/spec/frontend/vue_shared/components/expand_button_spec.js @@ -71,7 +71,7 @@ describe('Expand button', () => { it('renders button before text', () => { expect(expanderPrependEl().isVisible()).toBe(true); expect(expanderAppendEl().isVisible()).toBe(false); - expect(wrapper.find(ExpandButton).html()).toMatchSnapshot(); + expect(wrapper.find(ExpandButton).element).toMatchSnapshot(); }); }); @@ -119,7 +119,7 @@ describe('Expand button', () => { it('renders button after text', () => { expect(expanderPrependEl().isVisible()).toBe(false); expect(expanderAppendEl().isVisible()).toBe(true); - expect(wrapper.find(ExpandButton).html()).toMatchSnapshot(); + expect(wrapper.find(ExpandButton).element).toMatchSnapshot(); }); }); }); |