File tree Expand file tree Collapse file tree 3 files changed +7
-15
lines changed
examples/minimal/__test__ Expand file tree Collapse file tree 3 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ describe('render corrent content', () => {
7
7
} )
8
8
9
9
test ( 'main content' , async ( ) => {
10
- const h1Locator = await page . locator ( 'h1' )
11
- const h2Locator = await page . locator ( 'h2' )
12
- const pLocator = await page . locator ( '.Layout p' )
10
+ const h1Locator = page . locator ( 'h1' )
11
+ const h2Locator = page . locator ( 'h2' )
12
+ const pLocator = page . locator ( '.Layout p' )
13
13
14
14
const [ h1Contents , h2Conetents , pContents ] = await Promise . all ( [
15
15
h1Locator . allTextContents ( ) ,
@@ -28,11 +28,11 @@ describe('render corrent content', () => {
28
28
} )
29
29
30
30
test ( 'outline' , async ( ) => {
31
- const outlineLinksLocator = await page . locator (
31
+ const outlineLinksLocator = page . locator (
32
32
'.VPDocAsideOutline .root .outline-link'
33
33
)
34
34
35
35
const outlineLinksCount = await outlineLinksLocator . count ( )
36
- expect ( outlineLinksCount ) . toEqual ( 0 )
36
+ expect ( outlineLinksCount ) . toEqual ( 4 )
37
37
} )
38
38
} )
Original file line number Diff line number Diff line change @@ -73,10 +73,6 @@ const pageName = computed(() =>
73
73
max-width : 992px ;
74
74
}
75
75
76
- .VPDoc :not (.has-sidebar ) .aside {
77
- display : block ;
78
- }
79
-
80
76
.VPDoc :not (.has-sidebar ) .content {
81
77
max-width : 752px ;
82
78
}
Original file line number Diff line number Diff line change @@ -23,13 +23,9 @@ export function useSidebar() {
23
23
} )
24
24
25
25
const hasAside = computed ( ( ) => {
26
- if (
27
- frontmatter . value . layout !== 'home' &&
28
- frontmatter . value . aside === false
26
+ return (
27
+ frontmatter . value . layout !== 'home' && frontmatter . value . aside !== false
29
28
)
30
- return false
31
-
32
- return hasSidebar . value
33
29
} )
34
30
35
31
function open ( ) {
You can’t perform that action at this time.
0 commit comments