Commit 9a27f851 authored by Mark Florian's avatar Mark Florian

Merge branch 'update-button-props-gitlab-ui-integration-test' into 'master'

GitLab UI: update-button-props integration test

See merge request gitlab-org/gitlab!23108
parents 58a8bbb9 013f9a5f
...@@ -58,7 +58,9 @@ exports[`DependenciesActions component matches the snapshot 1`] = ` ...@@ -58,7 +58,9 @@ exports[`DependenciesActions component matches the snapshot 1`] = `
<gl-button-stub <gl-button-stub
class="flex-grow-0 js-sort-order" class="flex-grow-0 js-sort-order"
size="md"
title="Sort direction" title="Sort direction"
variant="secondary"
> >
<icon-stub <icon-stub
name="sort-lowest" name="sort-lowest"
...@@ -71,7 +73,9 @@ exports[`DependenciesActions component matches the snapshot 1`] = ` ...@@ -71,7 +73,9 @@ exports[`DependenciesActions component matches the snapshot 1`] = `
class="js-download" class="js-download"
download="dependencies.json" download="dependencies.json"
href="http://test.host/dependencies.json" href="http://test.host/dependencies.json"
size="md"
title="Export as JSON" title="Export as JSON"
variant="secondary"
> >
<icon-stub <icon-stub
name="download" name="download"
......
...@@ -155,6 +155,7 @@ exports[`DependenciesTableRow component when a dependency with vulnerabilities i ...@@ -155,6 +155,7 @@ exports[`DependenciesTableRow component when a dependency with vulnerabilities i
> >
<gl-button-stub <gl-button-stub
class="bold text-warning-700 text-1 text-decoration-none js-vulnerabilities-toggle" class="bold text-warning-700 text-1 text-decoration-none js-vulnerabilities-toggle"
size="md"
variant="link" variant="link"
> >
<icon-stub <icon-stub
......
...@@ -38,6 +38,8 @@ exports[`Design management toolbar component renders design and updated data 1`] ...@@ -38,6 +38,8 @@ exports[`Design management toolbar component renders design and updated data 1`]
<gl-button-stub <gl-button-stub
class="mr-2" class="mr-2"
href="/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d" href="/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d"
size="md"
variant="secondary"
> >
<icon-stub <icon-stub
name="download" name="download"
......
...@@ -5,6 +5,7 @@ exports[`Design management upload button component renders inverted upload desig ...@@ -5,6 +5,7 @@ exports[`Design management upload button component renders inverted upload desig
isinverted="true" isinverted="true"
> >
<gl-button-stub <gl-button-stub
size="md"
title="Adding a design with the same filename replaces the file in a new version." title="Adding a design with the same filename replaces the file in a new version."
variant="success" variant="success"
> >
...@@ -28,6 +29,7 @@ exports[`Design management upload button component renders loading icon 1`] = ` ...@@ -28,6 +29,7 @@ exports[`Design management upload button component renders loading icon 1`] = `
<div> <div>
<gl-button-stub <gl-button-stub
disabled="true" disabled="true"
size="md"
title="Adding a design with the same filename replaces the file in a new version." title="Adding a design with the same filename replaces the file in a new version."
variant="success" variant="success"
> >
...@@ -56,6 +58,7 @@ exports[`Design management upload button component renders loading icon 1`] = ` ...@@ -56,6 +58,7 @@ exports[`Design management upload button component renders loading icon 1`] = `
exports[`Design management upload button component renders upload design button 1`] = ` exports[`Design management upload button component renders upload design button 1`] = `
<div> <div>
<gl-button-stub <gl-button-stub
size="md"
title="Adding a design with the same filename replaces the file in a new version." title="Adding a design with the same filename replaces the file in a new version."
variant="success" variant="success"
> >
......
...@@ -73,6 +73,7 @@ exports[`Design management index page designs renders designs list and header wi ...@@ -73,6 +73,7 @@ exports[`Design management index page designs renders designs list and header wi
> >
<gl-button-stub <gl-button-stub
class="mr-2 js-select-all" class="mr-2 js-select-all"
size="md"
variant="link" variant="link"
> >
Select all Select all
......
...@@ -34,6 +34,8 @@ exports[`dashboard should match the snapshot 1`] = ` ...@@ -34,6 +34,8 @@ exports[`dashboard should match the snapshot 1`] = `
<gl-button-stub <gl-button-stub
class="js-add-projects-button btn btn-success" class="js-add-projects-button btn btn-success"
role="button" role="button"
size="md"
variant="secondary"
> >
Add projects Add projects
......
...@@ -69,6 +69,8 @@ exports[`Project Header matches the snapshot 1`] = ` ...@@ -69,6 +69,8 @@ exports[`Project Header matches the snapshot 1`] = `
<li> <li>
<gl-button-stub <gl-button-stub
class="js-remove-button" class="js-remove-button"
size="md"
variant="secondary"
> >
<span <span
class="text-danger" class="text-danger"
......
...@@ -32,6 +32,7 @@ exports[`SidebarDatePicker renders expected template 1`] = ` ...@@ -32,6 +32,7 @@ exports[`SidebarDatePicker renders expected template 1`] = `
<gl-button-stub <gl-button-stub
class="btn-sidebar-action" class="btn-sidebar-action"
size="md"
variant="link" variant="link"
> >
......
...@@ -12,6 +12,7 @@ exports[`InstanceCardsList renders a list of license cards 1`] = ` ...@@ -12,6 +12,7 @@ exports[`InstanceCardsList renders a list of license cards 1`] = `
<gl-button-stub <gl-button-stub
class="my-3 js-add-license" class="my-3 js-add-license"
href="/newLicensePath" href="/newLicensePath"
size="md"
variant="success" variant="success"
> >
...@@ -50,6 +51,7 @@ exports[`InstanceCardsList renders a message when there are no licenses 1`] = ` ...@@ -50,6 +51,7 @@ exports[`InstanceCardsList renders a message when there are no licenses 1`] = `
<gl-button-stub <gl-button-stub
class="my-3 js-add-license" class="my-3 js-add-license"
href="/newLicensePath" href="/newLicensePath"
size="md"
variant="success" variant="success"
> >
...@@ -84,6 +86,7 @@ exports[`InstanceCardsList renders a skeleton loading card if loading licenses 1 ...@@ -84,6 +86,7 @@ exports[`InstanceCardsList renders a skeleton loading card if loading licenses 1
<gl-button-stub <gl-button-stub
class="my-3 js-add-license" class="my-3 js-add-license"
href="/newLicensePath" href="/newLicensePath"
size="md"
variant="success" variant="success"
> >
......
...@@ -25,7 +25,7 @@ exports[`Package code instruction single line to match the default snapshot 1`] ...@@ -25,7 +25,7 @@ exports[`Package code instruction single line to match the default snapshot 1`]
class="input-group-append js-instruction-button" class="input-group-append js-instruction-button"
> >
<button <button
class="btn input-group-text btn-secondary btn-default" class="btn input-group-text btn-secondary btn-md btn-default"
data-clipboard-text="npm i @my-package" data-clipboard-text="npm i @my-package"
title="Copy npm install command" title="Copy npm install command"
type="button" type="button"
......
...@@ -18,6 +18,8 @@ exports[`grafana integration component default state to match the default snapsh ...@@ -18,6 +18,8 @@ exports[`grafana integration component default state to match the default snapsh
<gl-button-stub <gl-button-stub
class="js-settings-toggle" class="js-settings-toggle"
size="md"
variant="secondary"
> >
Expand Expand
</gl-button-stub> </gl-button-stub>
...@@ -89,6 +91,7 @@ exports[`grafana integration component default state to match the default snapsh ...@@ -89,6 +91,7 @@ exports[`grafana integration component default state to match the default snapsh
</gl-form-group-stub> </gl-form-group-stub>
<gl-button-stub <gl-button-stub
size="md"
variant="success" variant="success"
> >
......
...@@ -12,7 +12,7 @@ describe('DateTimePicker', () => { ...@@ -12,7 +12,7 @@ describe('DateTimePicker', () => {
const dropdownToggle = () => dateTimePicker.find('.dropdown-toggle'); const dropdownToggle = () => dateTimePicker.find('.dropdown-toggle');
const dropdownMenu = () => dateTimePicker.find('.dropdown-menu'); const dropdownMenu = () => dateTimePicker.find('.dropdown-menu');
const applyButtonElement = () => dateTimePicker.find('button[variant="success"]').element; const applyButtonElement = () => dateTimePicker.find('button.btn-success').element;
const cancelButtonElement = () => dateTimePicker.find('button.btn-secondary').element; const cancelButtonElement = () => dateTimePicker.find('button.btn-secondary').element;
const fillInputAndBlur = (input, val) => { const fillInputAndBlur = (input, val) => {
dateTimePicker.find(input).setValue(val); dateTimePicker.find(input).setValue(val);
......
...@@ -39,6 +39,7 @@ exports[`User Operation confirmation modal renders modal with form included 1`] ...@@ -39,6 +39,7 @@ exports[`User Operation confirmation modal renders modal with form included 1`]
</form> </form>
<gl-button-stub <gl-button-stub
size="md"
variant="secondary" variant="secondary"
> >
Cancel Cancel
...@@ -46,6 +47,7 @@ exports[`User Operation confirmation modal renders modal with form included 1`] ...@@ -46,6 +47,7 @@ exports[`User Operation confirmation modal renders modal with form included 1`]
<gl-button-stub <gl-button-stub
disabled="true" disabled="true"
size="md"
variant="warning" variant="warning"
> >
...@@ -55,6 +57,7 @@ exports[`User Operation confirmation modal renders modal with form included 1`] ...@@ -55,6 +57,7 @@ exports[`User Operation confirmation modal renders modal with form included 1`]
<gl-button-stub <gl-button-stub
disabled="true" disabled="true"
size="md"
variant="danger" variant="danger"
> >
action action
......
...@@ -84,7 +84,7 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = ` ...@@ -84,7 +84,7 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
class="input-group-append" class="input-group-append"
> >
<button <button
class="btn input-group-text btn-secondary btn-default" class="btn input-group-text btn-secondary btn-md btn-default"
data-clipboard-text="docker login host" data-clipboard-text="docker login host"
title="Copy login command" title="Copy login command"
type="button" type="button"
...@@ -122,7 +122,7 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = ` ...@@ -122,7 +122,7 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
class="input-group-append" class="input-group-append"
> >
<button <button
class="btn input-group-text btn-secondary btn-default" class="btn input-group-text btn-secondary btn-md btn-default"
data-clipboard-text="docker build -t url ." data-clipboard-text="docker build -t url ."
title="Copy build command" title="Copy build command"
type="button" type="button"
...@@ -152,7 +152,7 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = ` ...@@ -152,7 +152,7 @@ exports[`Registry Project Empty state to match the default snapshot 1`] = `
class="input-group-append" class="input-group-append"
> >
<button <button
class="btn input-group-text btn-secondary btn-default" class="btn input-group-text btn-secondary btn-md btn-default"
data-clipboard-text="docker push url" data-clipboard-text="docker push url"
title="Copy push command" title="Copy push command"
type="button" type="button"
......
...@@ -159,7 +159,9 @@ exports[`Settings Form renders 1`] = ` ...@@ -159,7 +159,9 @@ exports[`Settings Form renders 1`] = `
> >
<glbutton-stub <glbutton-stub
class="mr-2 d-block" class="mr-2 d-block"
size="md"
type="reset" type="reset"
variant="secondary"
> >
Cancel Cancel
...@@ -168,6 +170,7 @@ exports[`Settings Form renders 1`] = ` ...@@ -168,6 +170,7 @@ exports[`Settings Form renders 1`] = `
<glbutton-stub <glbutton-stub
class="d-flex justify-content-center align-items-center js-no-auto-disable" class="d-flex justify-content-center align-items-center js-no-auto-disable"
size="md"
type="submit" type="submit"
variant="success" variant="success"
> >
......
...@@ -17,6 +17,8 @@ exports[`self monitor component When the self monitor project has not been creat ...@@ -17,6 +17,8 @@ exports[`self monitor component When the self monitor project has not been creat
<gl-button-stub <gl-button-stub
class="js-settings-toggle" class="js-settings-toggle"
size="md"
variant="secondary"
> >
Expand Expand
</gl-button-stub> </gl-button-stub>
......
// 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\\" 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\\"> <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\\"><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\\" 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>
`; `;
...@@ -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();
}); });
}); });
}); });
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment