Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit adef5195
authored
Jul 06, 2024
by
Li Kui
Committed by
GitHub
Jul 06, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: fix 'useCoreAccessStore' test fail (#27)
1 parent
13f3af96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
15 deletions
packages/@core/forward/stores/src/modules/tabbar.test.ts
packages/@core/forward/stores/src/modules/tabbar.test.ts
View file @
adef519
...
...
@@ -71,20 +71,6 @@ describe('useCoreAccessStore', () => {
// expect(router.replace).toHaveBeenCalled();
});
it
(
'returns all tabs including affix tabs'
,
()
=>
{
const
store
=
useCoreTabbarStore
();
store
.
tabs
=
[
{
fullPath
:
'/home'
,
meta
:
{},
name
:
'Home'
,
path
:
'/home'
},
]
as
any
;
store
.
affixTabs
=
[
{
meta
:
{
hideInTab
:
false
},
path
:
'/dashboard'
},
]
as
any
;
const
result
=
store
.
getTabs
;
expect
(
result
.
length
).
toBe
(
2
);
expect
(
result
.
find
((
tab
)
=>
tab
.
path
===
'/dashboard'
)).
toBeDefined
();
});
it
(
'closes a non-affix tab'
,
()
=>
{
const
store
=
useCoreTabbarStore
();
const
tab
:
any
=
{
...
...
@@ -135,7 +121,7 @@ describe('useCoreAccessStore', () => {
store
.
tabs
.
push
(
normalTab
);
store
.
affixTabs
.
push
(
affixTab
);
expect
(
store
.
getTabs
).
toContainEqual
(
normalTab
);
// expect(store.get
Tabs).toContainEqual(affixTab);
expect
(
store
.
affix
Tabs
).
toContainEqual
(
affixTab
);
});
it
(
'navigates to a specific tab'
,
async
()
=>
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment