|
1 | | -import { defineConfig } from 'astro/config'; |
| 1 | +import {defineConfig} from 'astro/config'; |
2 | 2 | import starlight from '@astrojs/starlight'; |
3 | 3 | import tailwindcss from '@tailwindcss/vite'; |
4 | 4 | import starlightSidebarTopics from 'starlight-sidebar-topics'; |
5 | 5 | import starlightImageZoom from 'starlight-image-zoom'; |
6 | 6 | import rehypeAstroRelativeMarkdownLinks from "astro-rehype-relative-markdown-links"; |
| 7 | +import starlightScrollToTop from 'starlight-scroll-to-top'; |
| 8 | +import react from '@astrojs/react'; |
7 | 9 |
|
8 | 10 | const options = { |
9 | | - contentPath: 'src/content/docs', |
| 11 | + collectionBase: false, |
10 | 12 | }; |
11 | 13 |
|
12 | 14 | export default defineConfig({ |
13 | | - integrations: [ |
14 | | - starlight({ |
15 | | - title: '', |
16 | | - favicon: '/favicon.svg', |
17 | | - social: [ |
18 | | - { icon: 'github', label: 'GitHub', href: 'https://github.com/codeceptjs/CodeceptJS' }, |
19 | | - ], |
20 | | - components: { |
21 | | - Head: "./src/components/Head.astro", |
22 | | - PageTitle: './src/components/PageTitle.astro', |
23 | | - Footer: './src/components/Footer.astro', |
24 | | - SiteTitle: './src/components/SiteTitle.astro', |
25 | | - }, |
26 | | - customCss: [ |
27 | | - './src/styles/custom.css', |
28 | | - './src/styles/global.css', |
29 | | - ], |
30 | | - plugins: [ |
31 | | - starlightImageZoom(), |
32 | | - starlightSidebarTopics([ |
33 | | - { |
34 | | - label: 'Documentation', |
35 | | - link: 'quickstart', |
36 | | - items: [ |
37 | | - { |
38 | | - label: 'Web Testing', |
39 | | - items: [ |
40 | | - { label: 'Getting Started', link: 'basics' }, |
41 | | - { label: 'CodeceptUI', link: 'ui' }, |
42 | | - { label: 'Testing with Playwright', link: 'playwright' }, |
43 | | - { label: 'Testing with WebDriver', link: 'webdriver' }, |
44 | | - { label: 'Testing with Puppeteer', link: 'puppeteer' }, |
45 | | - { label: 'API Testing', link: 'api' }, |
46 | | - { label: 'Testing with TestCafe', link: 'testcafe' }, |
47 | | - ], |
48 | | - }, |
49 | | - { |
50 | | - label: 'Mobile Testing', |
51 | | - items: [ |
52 | | - { label: 'Mobile Testing with Appium', link: 'mobile' }, |
53 | | - { label: 'Testing React Native with Detox', link: 'detox' }, |
54 | | - ], |
55 | | - }, |
56 | | - { |
57 | | - label: 'Organizing Tests', |
58 | | - items: [ |
59 | | - { label: 'Page Objects', link: 'pageobjects' }, |
60 | | - { label: 'TypeScript', link: 'typescript' }, |
61 | | - { label: 'Data Management', link: 'data' }, |
62 | | - { label: 'Behavior Driven Development', link: 'bdd' }, |
63 | | - { label: 'Locators', link: 'locators' }, |
64 | | - { label: 'Translation', link: 'translation' }, |
65 | | - { label: 'Custom Helpers', link: 'custom-helpers' }, |
66 | | - { label: 'Best Practices', link: 'best' }, |
67 | | - ], |
68 | | - }, |
69 | | - { |
70 | | - label: 'Advanced Usage', |
71 | | - items: [ |
72 | | - { label: 'Advanced Usage', link: 'advanced' }, |
73 | | - { label: 'Bootstrap', link: 'bootstrap' }, |
74 | | - { label: 'Reporters', link: 'reports' }, |
75 | | - { label: 'Continuous Integration', link: 'continuous-integration' }, |
76 | | - { label: 'Parallel Execution', link: 'parallel' }, |
77 | | - { label: 'Visual Testing', link: 'visual' }, |
78 | | - { label: 'Email Testing', link: 'email' }, |
79 | | - { label: 'Secrets', link: 'secrets' }, |
80 | | - { label: 'Extending', link: 'hooks' }, |
81 | | - { label: 'Concepts', link: 'internal-api' }, |
82 | | - { label: 'Testing React Applications', link: 'react' }, |
83 | | - { label: 'Testing with AI', link: 'ai' }, |
84 | | - { label: 'Self-Healing Tests', link: 'heal' }, |
85 | | - { label: 'Testing with Protractor', link: 'angular' }, |
86 | | - { label: 'Testing Vue Apps', link: 'vue' }, |
87 | | - ], |
88 | | - }, |
89 | | - ], |
90 | | - }, |
| 15 | + integrations: [ |
| 16 | + react(), |
| 17 | + starlight({ |
| 18 | + title: '', |
| 19 | + favicon: '/favicon.svg', |
| 20 | + social: [ |
| 21 | + {icon: 'github', label: 'GitHub', href: 'https://github.com/codeceptjs/CodeceptJS'}, |
| 22 | + ], |
| 23 | + components: { |
| 24 | + Head: "./src/components/Head.astro", |
| 25 | + PageTitle: './src/components/PageTitle.astro', |
| 26 | + Footer: './src/components/Footer.astro', |
| 27 | + SiteTitle: './src/components/SiteTitle.astro', |
| 28 | + Search: './src/components/Search.astro', |
| 29 | + SocialIcons: './src/components/Links.astro', |
| 30 | + }, |
| 31 | + customCss: [ |
| 32 | + './src/styles/custom.css', |
| 33 | + './src/styles/global.css', |
| 34 | + ], |
| 35 | + plugins: [ |
| 36 | + starlightImageZoom(), |
| 37 | + starlightSidebarTopics([ |
| 38 | + { |
| 39 | + label: 'Documentation', |
| 40 | + link: 'quickstart', |
| 41 | + items: [ |
| 42 | + { |
| 43 | + label: 'Web Testing', |
| 44 | + items: [ |
| 45 | + {label: 'Getting Started', link: 'basics'}, |
| 46 | + {label: 'CodeceptUI', link: 'ui'}, |
| 47 | + {label: 'Testing with Playwright', link: 'playwright'}, |
| 48 | + {label: 'Testing with WebDriver', link: 'webdriver'}, |
| 49 | + {label: 'Testing with Puppeteer', link: 'puppeteer'}, |
| 50 | + {label: 'API Testing', link: 'api'}, |
| 51 | + {label: 'Testing with TestCafe', link: 'testcafe'}, |
| 52 | + ], |
| 53 | + }, |
| 54 | + { |
| 55 | + label: 'Mobile Testing', |
| 56 | + items: [ |
| 57 | + {label: 'Mobile Testing with Appium', link: 'mobile'}, |
| 58 | + {label: 'Testing React Native with Detox', link: 'detox'}, |
| 59 | + ], |
| 60 | + }, |
| 61 | + { |
| 62 | + label: 'Organizing Tests', |
| 63 | + items: [ |
| 64 | + {label: 'Page Objects', link: 'pageobjects'}, |
| 65 | + {label: 'TypeScript', link: 'typescript'}, |
| 66 | + {label: 'Data Management', link: 'data'}, |
| 67 | + {label: 'Behavior Driven Development', link: 'bdd'}, |
| 68 | + {label: 'Locators', link: 'locators'}, |
| 69 | + {label: 'Translation', link: 'translation'}, |
| 70 | + {label: 'Custom Helpers', link: 'custom-helpers'}, |
| 71 | + {label: 'Best Practices', link: 'best'}, |
| 72 | + ], |
| 73 | + }, |
| 74 | + { |
| 75 | + label: 'Advanced Usage', |
| 76 | + items: [ |
| 77 | + {label: 'Advanced Usage', link: 'advanced'}, |
| 78 | + {label: 'Bootstrap', link: 'bootstrap'}, |
| 79 | + {label: 'Reporters', link: 'reports'}, |
| 80 | + {label: 'Continuous Integration', link: 'continuous-integration'}, |
| 81 | + {label: 'Parallel Execution', link: 'parallel'}, |
| 82 | + {label: 'Visual Testing', link: 'visual'}, |
| 83 | + {label: 'Email Testing', link: 'email'}, |
| 84 | + {label: 'Secrets', link: 'secrets'}, |
| 85 | + {label: 'Extending', link: 'hooks'}, |
| 86 | + {label: 'Concepts', link: 'internal-api'}, |
| 87 | + {label: 'Testing React Applications', link: 'react'}, |
| 88 | + {label: 'Testing with AI', link: 'ai'}, |
| 89 | + {label: 'Self-Healing Tests', link: 'heal'}, |
| 90 | + {label: 'Testing with Protractor', link: 'angular'}, |
| 91 | + {label: 'Testing Vue Apps', link: 'vue'}, |
| 92 | + ], |
| 93 | + }, |
| 94 | + ], |
| 95 | + }, |
91 | 96 |
|
92 | | - { |
93 | | - label: 'Helpers', |
94 | | - link: '/helpers/playwright/', |
95 | | - items: [ |
96 | | - { |
97 | | - label: 'Web Testing', |
98 | | - items: [ |
99 | | - { label: 'WebDriver', link: 'helpers/web-driver' }, |
100 | | - { label: 'Puppeteer', link: 'helpers/puppeteer' }, |
101 | | - { label: 'TestCafe', link: 'helpers/test-cafe' }, |
102 | | - ], |
103 | | - }, |
104 | | - { |
105 | | - label: 'Mobile Testing', |
106 | | - items: [ |
107 | | - { label: 'Appium', link: 'helpers/appium' }, |
108 | | - { label: 'Detox', link: 'helpers/detox' }, |
109 | | - ], |
110 | | - }, |
111 | | - { |
112 | | - label: 'API Helpers', |
113 | | - items: [ |
114 | | - { label: 'REST', link: 'helpers/rest' }, |
115 | | - { label: 'ApiDataFactory', link: 'helpers/api-data-factory' }, |
116 | | - { label: 'GraphQL', link: 'helpers/graph-ql' }, |
117 | | - { label: 'GraphQLDataFactory', link: 'helpers/graph-ql-data-factory' }, |
118 | | - { label: 'JSONResponse', link: 'helpers/json-response' }, |
119 | | - { label: 'MockRequest', link: 'helpers/mock-request' }, |
120 | | - ], |
121 | | - }, |
122 | | - { |
123 | | - label: 'Other Helpers', |
124 | | - items: [ |
125 | | - { label: 'OpenAI', link: 'helpers/open-ai' }, |
126 | | - { label: 'FileSystem', link: 'helpers/file-system' }, |
127 | | - { label: 'Expect', link: 'helpers/expect' }, |
128 | | - { label: 'SoftExpectHelper', link: 'helpers/soft-expect-helper' }, |
129 | | - { label: 'MockServer', link: 'helpers/mock-server' }, |
130 | | - { label: 'Community Helpers', link: 'community-helpers' }, |
131 | | - ], |
132 | | - }, |
133 | | - ] |
134 | | - }, |
135 | | - { |
136 | | - label: 'Wiki', |
137 | | - link: '/wiki/home/', |
138 | | - items: [ |
139 | | - { label: 'Wiki', autogenerate: { directory: 'wiki/' } }, |
140 | | - ], |
141 | | - }, |
142 | | - ]), |
143 | | - ], |
144 | | - }), |
145 | | - ], |
146 | | - vite: { plugins: [tailwindcss()] }, |
147 | | - markdown: { |
148 | | - rehypePlugins: [ |
149 | | - [rehypeAstroRelativeMarkdownLinks, options], |
150 | | - ], |
151 | | - }, |
| 97 | + { |
| 98 | + label: 'Helpers', |
| 99 | + link: '/helpers/playwright/', |
| 100 | + items: [ |
| 101 | + { |
| 102 | + label: 'Web Testing', |
| 103 | + items: [ |
| 104 | + {label: 'WebDriver', link: 'helpers/web-driver'}, |
| 105 | + {label: 'Puppeteer', link: 'helpers/puppeteer'}, |
| 106 | + {label: 'TestCafe', link: 'helpers/test-cafe'}, |
| 107 | + ], |
| 108 | + }, |
| 109 | + { |
| 110 | + label: 'Mobile Testing', |
| 111 | + items: [ |
| 112 | + {label: 'Appium', link: 'helpers/appium'}, |
| 113 | + {label: 'Detox', link: 'helpers/detox'}, |
| 114 | + ], |
| 115 | + }, |
| 116 | + { |
| 117 | + label: 'API Helpers', |
| 118 | + items: [ |
| 119 | + {label: 'REST', link: 'helpers/rest'}, |
| 120 | + {label: 'ApiDataFactory', link: 'helpers/api-data-factory'}, |
| 121 | + {label: 'GraphQL', link: 'helpers/graph-ql'}, |
| 122 | + {label: 'GraphQLDataFactory', link: 'helpers/graph-ql-data-factory'}, |
| 123 | + {label: 'JSONResponse', link: 'helpers/json-response'}, |
| 124 | + {label: 'MockRequest', link: 'helpers/mock-request'}, |
| 125 | + ], |
| 126 | + }, |
| 127 | + { |
| 128 | + label: 'Other Helpers', |
| 129 | + items: [ |
| 130 | + {label: 'OpenAI', link: 'helpers/open-ai'}, |
| 131 | + {label: 'FileSystem', link: 'helpers/file-system'}, |
| 132 | + {label: 'Expect', link: 'helpers/expect'}, |
| 133 | + {label: 'SoftExpectHelper', link: 'helpers/soft-expect-helper'}, |
| 134 | + {label: 'MockServer', link: 'helpers/mock-server'}, |
| 135 | + {label: 'Community Helpers', link: 'community-helpers'}, |
| 136 | + ], |
| 137 | + }, |
| 138 | + ] |
| 139 | + }, |
| 140 | + { |
| 141 | + label: 'Wiki', |
| 142 | + link: '/wiki/home/', |
| 143 | + items: [ |
| 144 | + {label: 'Wiki', autogenerate: {directory: 'wiki/'}}, |
| 145 | + ], |
| 146 | + }, |
| 147 | + ]), |
| 148 | + starlightScrollToTop({ |
| 149 | + position: 'right', |
| 150 | + tooltipText: 'Back to top', |
| 151 | + showTooltip: true, |
| 152 | + smoothScroll: true, |
| 153 | + threshold: 5, |
| 154 | + svgPath: 'M12 5V19M7 10L12 5L17 10', |
| 155 | + svgStrokeWidth: 1, |
| 156 | + borderRadius: '100', |
| 157 | + showProgressRing: true, |
| 158 | + progressRingColor: '#ffe680', |
| 159 | + }), |
| 160 | + ], |
| 161 | + }), |
| 162 | + ], |
| 163 | + vite: {plugins: [tailwindcss()]}, |
| 164 | + markdown: { |
| 165 | + rehypePlugins: [ |
| 166 | + [rehypeAstroRelativeMarkdownLinks, options], |
| 167 | + ], |
| 168 | + }, |
152 | 169 | }); |
0 commit comments