File tree Expand file tree Collapse file tree
.github/actions/publish-website Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5555 working-directory : ./webui
5656 run : npx playwright install --with-deps
5757 shell : bash
58+ - name : test website
59+ working-directory : ./webui
60+ run : npx playwright test --project=website
61+ shell : bash
5862 - name : prerender
5963 working-directory : ./webui/ssg
6064 run : node index.js
Original file line number Diff line number Diff line change 11import { test , expect } from './models/fixture-dashboard'
22
3- test ( 'header in dashboard' , async ( { dashboard } ) => {
4- await dashboard . open ( )
3+ test ( 'header in dashboard' , async ( { page } ) => {
4+ await page . goto ( '/home' )
55
66 await test . step ( "navigation links" , async ( ) => {
7- const links = dashboard . header . getNavLinks ( )
8- await expect ( links . nth ( 0 ) ) . toHaveText ( 'Dashboard' )
9- await expect ( links . nth ( 1 ) ) . toHaveText ( 'Guides' )
10- await expect ( links . nth ( 2 ) ) . toHaveText ( 'Configuration' )
11- await expect ( links . nth ( 3 ) ) . toHaveText ( 'JavaScript API' )
12- await expect ( links . nth ( 4 ) ) . toHaveText ( 'Resources' )
13- await expect ( links . nth ( 5 ) ) . toHaveText ( 'References' )
14- } )
15-
16- await test . step ( 'version number' , async ( ) => {
17- await expect ( dashboard . header . version ) . not . toBeVisible ( ) ;
7+ const links = page . getByRole ( 'banner' ) . getByRole ( 'navigation' ) . getByRole ( 'link' ) ;
8+ await expect ( links . nth ( 0 ) ) . toHaveAccessibleDescription ( 'Mokapi home' )
9+ await expect ( links . nth ( 1 ) ) . toHaveText ( 'Dashboard' )
10+ await expect ( links . nth ( 2 ) ) . toHaveText ( 'Guides' )
11+ await expect ( links . nth ( 3 ) ) . toHaveText ( 'Configuration' )
12+ await expect ( links . nth ( 4 ) ) . toHaveText ( 'JavaScript API' )
13+ await expect ( links . nth ( 5 ) ) . toHaveText ( 'Resources' )
14+ await expect ( links . nth ( 6 ) ) . toHaveText ( 'References' )
1815 } )
1916} )
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ const config: PlaywrightTestConfig = {
155155 * Use the preview server on CI for more realistic testing.
156156 Playwright will re-use the local server if there is already a dev-server running.
157157 */
158- command : process . env . CI ? 'vite preview --mode dashboard -- port 5173' : 'vite dev' ,
158+ command : process . env . CI ? 'vite preview --port 5173' : 'vite dev' ,
159159 port : 5173 ,
160160 reuseExistingServer : ! process . env . CI
161161 }
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ function navigateAndClose(params: Record<string, string>) {
214214</div >
215215 <nav class =" navbar navbar-expand-lg" >
216216 <div class =" container-fluid" >
217- <a class =" navbar-brand" href =" ./" ><img src =" /logo-header.svg" height =" 30" alt =" Mokapi home" /></a >
217+ <a class =" navbar-brand" href =" ./" title = " Mokapi home " ><img src =" /logo-header.svg" height =" 30" alt =" Mokapi home" /></a >
218218 <div class =" d-flex ms-auto align-items-center tools d-none" >
219219 <a href =" https://github.com/marle3003/mokapi" class =" version pe-2" v-if =" appInfo?.data" >v{{appInfo.data.version}}</a >
220220 <button class =" btn icon" aria-label =" Search" data-bs-toggle =" modal" data-bs-target =" #search-docs" >
You can’t perform that action at this time.
0 commit comments