mirror of
https://github.com/iflytek/skillhub.git
synced 2026-09-11 22:51:04 +00:00
test(suite): cover unavailable entry overview
Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
This commit is contained in:
parent
ff0a1cd4cb
commit
ea1941e436
1 changed files with 16 additions and 0 deletions
|
|
@ -126,6 +126,22 @@ describe('SuiteDetailPage', () => {
|
|||
expect(screen.getAllByRole('link')).toHaveLength(1)
|
||||
})
|
||||
|
||||
it('keeps an unavailable entry skill visible but non-navigable in the overview', () => {
|
||||
const blockedEntrySuite = suite()
|
||||
blockedEntrySuite.members[0] = {
|
||||
...blockedEntrySuite.members[0],
|
||||
browsable: false,
|
||||
blockingReason: 'SKILL_HIDDEN',
|
||||
}
|
||||
mocks.detail = { data: blockedEntrySuite, isLoading: false, error: null }
|
||||
|
||||
render(<SuiteDetailPage />)
|
||||
|
||||
expect(screen.getByText('@global/medical-records@1.0.0')).not.toBeNull()
|
||||
expect(screen.getByText('suite.blockingReasons.SKILL_HIDDEN')).not.toBeNull()
|
||||
expect(screen.queryByRole('link', { name: 'suite.viewEntrySkill' })).toBeNull()
|
||||
})
|
||||
|
||||
it.each([
|
||||
'DELETED',
|
||||
'NAMESPACE_ARCHIVED',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue