refactor: fix small bugs, update unit tests

This commit is contained in:
woothu
2019-11-14 14:42:13 +01:00
parent 760dc7ba79
commit b696666806
45 changed files with 45759 additions and 1710 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,875 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`ButtonGroups.vue renders correctly 1`] = `
<crow-stub
gutters="true"
>
<ccol-stub
col="12"
tag="div"
>
<ccard-stub>
<ccardheader-stub>
<cicon-stub
name="justify-center"
/>
<strong>
Bootstrap button group
</strong>
<div
class="card-header-actions"
>
<a
class="card-header-action"
href="https://coreui.io/vue/docs/3.0/components/ButtonComponents"
rel="noreferrer noopener"
target="_blank"
>
<small
class="text-muted"
>
docs
</small>
</a>
</div>
</ccardheader-stub>
<ccardbody-stub>
<div>
<cbuttongroup-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
One
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Two
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Three
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Four
</cbutton-stub>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Five
</cbutton-stub>
</cbuttongroup-stub>
<br />
<br />
<cbuttongroup-stub>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="success"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Success
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="info"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Info
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="warning"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Warn
</cbutton-stub>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="primary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Primary
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="danger"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Danger
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="link"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Link
</cbutton-stub>
</cbuttongroup-stub>
</div>
</ccardbody-stub>
</ccard-stub>
</ccol-stub>
<ccol-stub
col="12"
tag="div"
>
<ccard-stub>
<ccardheader-stub>
<cicon-stub
name="justify-center"
/>
<strong>
Button group
</strong>
sizing
</ccardheader-stub>
<ccardbody-stub>
<div>
<cbuttongroup-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Left
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Middle
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Right
</cbutton-stub>
</cbuttongroup-stub>
<br />
<br />
<cbuttongroup-stub
size="sm"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Left
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Middle
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Right
</cbutton-stub>
</cbuttongroup-stub>
<br />
<br />
<cbuttongroup-stub
size="lg"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Left
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Middle
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Right
</cbutton-stub>
</cbuttongroup-stub>
</div>
</ccardbody-stub>
</ccard-stub>
</ccol-stub>
<ccol-stub
col="12"
tag="div"
>
<ccard-stub>
<ccardheader-stub>
<cicon-stub
name="justify-center"
/>
<strong>
Button group
</strong>
dropdown support
</ccardheader-stub>
<ccardbody-stub>
<div>
<cbuttongroup-stub>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Button 1
</cbutton-stub>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Button 2
</cbutton-stub>
<cdropdown-stub
caret="true"
color="success"
flip="true"
placement="bottom-start"
right=""
text="Menu"
togglertext="Dropdown"
>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 1
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 2
</cdropdownitem-stub>
<cdropdowndivider-stub
tag="div"
/>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 3
</cdropdownitem-stub>
</cdropdown-stub>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Button 3
</cbutton-stub>
<cdropdown-stub
caret="true"
color="info"
flip="true"
placement="bottom-start"
right=""
split="true"
text="Split Menu"
togglertext="Dropdown"
>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 1
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 2
</cdropdownitem-stub>
<cdropdowndivider-stub
tag="div"
/>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 3
</cdropdownitem-stub>
</cdropdown-stub>
</cbuttongroup-stub>
</div>
</ccardbody-stub>
</ccard-stub>
</ccol-stub>
<ccol-stub
col="12"
tag="div"
>
<ccard-stub>
<ccardheader-stub>
<cicon-stub
name="justify-center"
/>
<strong>
Button group
</strong>
vertical variation
</ccardheader-stub>
<ccardbody-stub>
<div>
<cbuttongroup-stub
vertical="true"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Top
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Middle
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Bottom
</cbutton-stub>
</cbuttongroup-stub>
</div>
</ccardbody-stub>
</ccard-stub>
</ccol-stub>
<ccol-stub
col="12"
tag="div"
>
<ccard-stub>
<ccardheader-stub>
<cicon-stub
name="justify-center"
/>
<strong>
Button toolbar
</strong>
<small>
with button groups
</small>
</ccardheader-stub>
<ccardbody-stub>
<cbuttontoolbar-stub
aria-label="Toolbar with button groups"
>
<cbuttongroup-stub
class="mx-1"
>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
«
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
</cbutton-stub>
</cbuttongroup-stub>
<cbuttongroup-stub
class="mx-1"
>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Edit
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Undo
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Redo
</cbutton-stub>
</cbuttongroup-stub>
<cbuttongroup-stub
class="mx-1"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
</cbutton-stub>
<cbutton-stub
activeclass="active"
class="d-sm-down-none"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
»
</cbutton-stub>
</cbuttongroup-stub>
</cbuttontoolbar-stub>
<hr
class="d-sm-down-none"
/>
<cbuttontoolbar-stub
aria-label="Toolbar with button groups and input groups"
class="d-sm-down-none"
>
<cbuttongroup-stub
class="mx-1"
size="sm"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
New
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Edit
</cbutton-stub>
</cbuttongroup-stub>
<cinput-stub
append=".00"
class="mb-0 w-25 mx-1"
lazy="400"
prepend="$"
size="sm"
type="text"
value="100"
/>
<cselect-stub
class="mb-0 w-25 mx-1"
custom="true"
options="Large,Medium,Small"
prepend="Size"
size="sm"
value="Medium"
/>
<cbuttongroup-stub
class="mx-1"
size="sm"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Save
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Cancel
</cbutton-stub>
</cbuttongroup-stub>
</cbuttontoolbar-stub>
<hr />
<cbuttontoolbar-stub
aria-label="Toolbar with button groups and dropdown menu"
>
<cbuttongroup-stub
class="mx-1 d-sm-down-none"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
New
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Edit
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Undo
</cbutton-stub>
</cbuttongroup-stub>
<cdropdown-stub
button-content="Menu"
caret="true"
class="mx-1"
color="secondary"
flip="true"
placement="bottom-end"
togglertext="Dropdown"
>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 1
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 2
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
Item 3
</cdropdownitem-stub>
</cdropdown-stub>
<cbuttongroup-stub
class="mx-1"
>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Save
</cbutton-stub>
<cbutton-stub
activeclass="active"
color="secondary"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
type="button"
>
Cancel
</cbutton-stub>
</cbuttongroup-stub>
</cbuttontoolbar-stub>
</ccardbody-stub>
</ccard-stub>
</ccol-stub>
</crow-stub>
`;
File diff suppressed because it is too large Load Diff