Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
013f9a5f
Commit
013f9a5f
authored
Jan 21, 2020
by
Mark Florian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make snapshots more readable
parent
9d75ab15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
9 deletions
+83
-9
spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap
...hared/components/__snapshots__/expand_button_spec.js.snap
+81
-7
spec/frontend/vue_shared/components/expand_button_spec.js
spec/frontend/vue_shared/components/expand_button_spec.js
+2
-2
No files found.
spec/frontend/vue_shared/components/__snapshots__/expand_button_spec.js.snap
View file @
013f9a5f
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Expand button on click when short text is provided renders button after text 1`] = `
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 btn-md\\" 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 btn-md\\" style=\\"\\"><svg aria-hidden=\\"true\\" class=\\"s12 ic-ellipsis_h\\">
<span>
<use xlink:href=\\"#ellipsis_h\\"></use>
<button
</svg></button></span>"
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`] = `
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 btn-md\\"><svg aria-hidden=\\"true\\" class=\\"s12 ic-ellipsis_h\\"><use xlink:href=\\"#ellipsis_h\\"></use></svg></button> <span><p>Short</p></span>
<span>
<!----> <button aria-label=\\"Click to expand text\\" type=\\"button\\" class=\\"btn js-text-expander-append text-expander btn-blank btn-secondary btn-md\\" style=\\"display: none;\\"><svg aria-hidden=\\"true\\" class=\\"s12 ic-ellipsis_h\\">
<button
<use xlink:href=\\"#ellipsis_h\\"></use>
aria-label="Click to expand text"
</svg></button></span>"
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>
`;
`;
spec/frontend/vue_shared/components/expand_button_spec.js
View file @
013f9a5f
...
@@ -71,7 +71,7 @@ describe('Expand button', () => {
...
@@ -71,7 +71,7 @@ describe('Expand button', () => {
it
(
'
renders button before text
'
,
()
=>
{
it
(
'
renders button before text
'
,
()
=>
{
expect
(
expanderPrependEl
().
isVisible
()).
toBe
(
true
);
expect
(
expanderPrependEl
().
isVisible
()).
toBe
(
true
);
expect
(
expanderAppendEl
().
isVisible
()).
toBe
(
false
);
expect
(
expanderAppendEl
().
isVisible
()).
toBe
(
false
);
expect
(
wrapper
.
find
(
ExpandButton
).
html
()
).
toMatchSnapshot
();
expect
(
wrapper
.
find
(
ExpandButton
).
element
).
toMatchSnapshot
();
});
});
});
});
...
@@ -119,7 +119,7 @@ describe('Expand button', () => {
...
@@ -119,7 +119,7 @@ describe('Expand button', () => {
it
(
'
renders button after text
'
,
()
=>
{
it
(
'
renders button after text
'
,
()
=>
{
expect
(
expanderPrependEl
().
isVisible
()).
toBe
(
false
);
expect
(
expanderPrependEl
().
isVisible
()).
toBe
(
false
);
expect
(
expanderAppendEl
().
isVisible
()).
toBe
(
true
);
expect
(
expanderAppendEl
().
isVisible
()).
toBe
(
true
);
expect
(
wrapper
.
find
(
ExpandButton
).
html
()
).
toMatchSnapshot
();
expect
(
wrapper
.
find
(
ExpandButton
).
element
).
toMatchSnapshot
();
});
});
});
});
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment