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
@@ -0,0 +1,162 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`TheHeader.vue renders correctly 1`] = `
<cheader-stub
colorscheme="light"
fixed="true"
light=""
tag="header"
withsubheader="true"
>
<ctoggler-stub
class="ml-3 d-lg-none"
inheader="true"
tag="button"
/>
<ctoggler-stub
class="ml-3 d-md-down-none"
inheader="true"
tag="button"
/>
<cheaderbrand-stub
alt="CoreUI Logo"
class="mx-auto d-lg-none"
height="46"
src="img/brand/coreui-base.svg"
width="97"
wrappedinlink="[object Object]"
/>
<cheadernav-stub
class="d-md-down-none mr-auto"
>
<cheadernavitem-stub
class="px-3"
to="/dashboard"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
Dashboard
</cheadernavlink-stub>
</cheadernavitem-stub>
<cheadernavitem-stub
class="px-3"
exact=""
to="/users"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
Users
</cheadernavlink-stub>
</cheadernavitem-stub>
<cheadernavitem-stub
class="px-3"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
Settings
</cheadernavlink-stub>
</cheadernavitem-stub>
</cheadernav-stub>
<cheadernav-stub
class="mr-4"
>
<cheadernavitem-stub
class="d-md-down-none mx-2"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
<cicon-stub
name="bell"
/>
</cheadernavlink-stub>
</cheadernavitem-stub>
<cheadernavitem-stub
class="d-md-down-none mx-2"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
<cicon-stub
name="list"
/>
</cheadernavlink-stub>
</cheadernavitem-stub>
<cheadernavitem-stub
class="d-md-down-none mx-2"
>
<cheadernavlink-stub
activeclass="active"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
<cicon-stub
name="envelope-open"
/>
</cheadernavlink-stub>
</cheadernavitem-stub>
<theheaderdropdownaccnt-stub />
</cheadernav-stub>
<csubheader-stub
class="px-3"
tag="div"
>
<cbreadcrumbrouter-stub
class="border-0"
/>
</csubheader-stub>
</cheader-stub>
`;
@@ -0,0 +1,256 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`TheHeaderDropdownAccnt.vue renders correctly 1`] = `
<cdropdown-stub
addmenuclasses="pt-0"
caret="true"
class="c-header-nav-items"
flip="true"
innav="true"
placement="bottom-end"
togglertext="Dropdown"
>
<cdropdownheader-stub
class="text-center"
color="light"
tag="div"
>
<strong>
Account
</strong>
</cdropdownheader-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="bell"
/>
Updates
<cbadge-stub
activeclass="active"
class="ml-auto"
color="info"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
42
</cbadge-stub>
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="envelope-open"
/>
Messages
<cbadge-stub
activeclass="active"
class="ml-auto"
color="success"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
42
</cbadge-stub>
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="task"
/>
Tasks
<cbadge-stub
activeclass="active"
class="ml-auto"
color="danger"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
42
</cbadge-stub>
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="comment-square"
/>
Comments
<cbadge-stub
activeclass="active"
class="ml-auto"
color="warning"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
42
</cbadge-stub>
</cdropdownitem-stub>
<cdropdownheader-stub
class="text-center"
color="light"
tag="div"
>
<strong>
Settings
</strong>
</cdropdownheader-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="user"
/>
Profile
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="settings"
/>
Settings
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="dollar"
/>
Payments
<cbadge-stub
activeclass="active"
class="ml-auto"
color="secondary"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
42
</cbadge-stub>
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="file"
/>
Projects
<cbadge-stub
activeclass="active"
class="ml-auto"
color="primary"
event="click"
exactactiveclass="active"
innavitem="true"
routertag="a"
tag="span"
target="_self"
>
42
</cbadge-stub>
</cdropdownitem-stub>
<cdropdowndivider-stub
tag="div"
/>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="shield-alt"
/>
Lock Account
</cdropdownitem-stub>
<cdropdownitem-stub
activeclass="active"
event="click"
exactactiveclass="active"
routertag="a"
target="_self"
>
<cicon-stub
name="lock-locked"
/>
Logout
</cdropdownitem-stub>
</cdropdown-stub>
`;
@@ -16,7 +16,8 @@ exports[`TheSidebar.vue renders correctly 1`] = `
/>
<crenderfunction-stub
contenttorender="CSidebarNav,CSidebarNavLink,[object Object],CSidebarNavTitle,Theme,CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavTitle,Components,CSidebarNavDropdown,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavDropdown,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavDropdown,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavDropdown,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavDivider,CSidebarNavTitle,Extras,CSidebarNavDropdown,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object],CSidebarNavLink,[object Object]"
contenttorender="[object Object]"
flat=""
/>
<csidebarminimizer-stub