File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { test , expect } from './models/fixture-dashboard'
2+
3+ test ( 'header in dashboard' , async ( { dashboard } ) => {
4+ await dashboard . open ( )
5+
6+ await test . step ( "navigation links" , async ( ) => {
7+ const links = dashboard . header . getNavLinks ( )
8+ await expect ( links . nth ( 0 ) ) . toHaveText ( 'Dashboard' )
9+ if ( process . env . CI ) {
10+ await expect ( links . nth ( 1 ) ) . toHaveText ( 'Guides' )
11+ await expect ( links . nth ( 2 ) ) . toHaveText ( 'Configuration' )
12+ await expect ( links . nth ( 3 ) ) . toHaveText ( 'JavaScript API' )
13+ await expect ( links . nth ( 4 ) ) . toHaveText ( 'Resources' )
14+ await expect ( links . nth ( 5 ) ) . toHaveText ( 'References' )
15+ } else {
16+ await expect ( links . nth ( 1 ) ) . toHaveText ( 'Dashboard' )
17+ await expect ( links . nth ( 2 ) ) . toHaveText ( 'Guides' )
18+ await expect ( links . nth ( 3 ) ) . toHaveText ( 'Configuration' )
19+ await expect ( links . nth ( 4 ) ) . toHaveText ( 'JavaScript API' )
20+ await expect ( links . nth ( 5 ) ) . toHaveText ( 'Resources' )
21+ await expect ( links . nth ( 6 ) ) . toHaveText ( 'References' )
22+ }
23+ } )
24+
25+ await test . step ( 'version number' , async ( ) => {
26+ await expect ( dashboard . header . version ) . toHaveText ( 'v0.11.0' )
27+ } )
28+ } )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import { test , expect } from './models/fixture-dashboard'
2+
3+ test ( 'header in dashboard' , async ( { dashboard } ) => {
4+ await dashboard . open ( )
5+
6+ 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 ( ) ;
18+ } )
19+ } )
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ const config: PlaywrightTestConfig = {
4444 /* Configure projects for major browsers */
4545 projects : [
4646 {
47- name : 'chromium ' ,
47+ name : 'dashboard ' ,
4848 use : {
4949 ...devices [ 'Desktop Chrome' ] ,
5050 storageState : {
@@ -60,7 +60,28 @@ const config: PlaywrightTestConfig = {
6060 }
6161 ]
6262 } ,
63- }
63+ } ,
64+ testIgnore : [ "/e2e/**/*.website.spec.ts" ] ,
65+ } ,
66+ {
67+ name : 'website' ,
68+ use : {
69+ ...devices [ 'Desktop Chrome' ] ,
70+ storageState : {
71+ cookies : [ ] ,
72+ origins : [
73+ {
74+ origin : 'http://localhost:5173' ,
75+ localStorage : [
76+ {
77+ name : 'theme' , value : 'dark'
78+ }
79+ ]
80+ }
81+ ]
82+ } ,
83+ } ,
84+ testIgnore : [ "/e2e/**/*.dashboard.spec.ts" ] ,
6485 } ,
6586 // {
6687 // name: 'firefox',
You can’t perform that action at this time.
0 commit comments