@@ -16,18 +16,19 @@ test.describe('Download Modal Flow', () => {
1616 await page . goto ( '/#download' ) ;
1717
1818 const modal = page . locator ( '.modal' ) ;
19+ const navTabs = modal . locator ( '.nav-tabs' ) ;
1920 // Check for tab elements with OS names
20- await expect ( modal . getByRole ( 'tab' , { name : / u b u n t u / i } ) ) . toBeVisible ( ) ;
21- await expect ( modal . getByRole ( 'tab' , { name : / d e b i a n / i } ) ) . toBeVisible ( ) ;
22- await expect ( modal . getByRole ( 'tab' , { name : / o t h e r / i } ) ) . toBeVisible ( ) ;
21+ await expect ( navTabs . getByText ( 'Ubuntu' ) ) . toBeVisible ( ) ;
22+ await expect ( navTabs . getByText ( 'Debian' ) ) . toBeVisible ( ) ;
23+ await expect ( navTabs . getByText ( 'Other' ) ) . toBeVisible ( ) ;
2324 } ) ;
2425
2526 test ( 'should show Ubuntu instructions by default' , async ( { page } ) => {
2627 await page . goto ( '/#download' ) ;
2728
2829 const modal = page . locator ( '.modal' ) ;
2930 // Ubuntu Easy Install should be visible
30- await expect ( modal . getByText ( ' Easy Install') . first ( ) ) . toBeVisible ( ) ;
31+ await expect ( modal . getByRole ( 'heading' , { name : ' Easy Install' } ) . first ( ) ) . toBeVisible ( ) ;
3132 await expect ( modal . getByText ( / u b u n t u 1 7 .0 4 a n d l a t e r / i) ) . toBeVisible ( ) ;
3233 await expect ( modal . getByText ( 'sudo apt install cryfs' ) . first ( ) ) . toBeVisible ( ) ;
3334 } ) ;
@@ -36,7 +37,8 @@ test.describe('Download Modal Flow', () => {
3637 await page . goto ( '/#download' ) ;
3738
3839 const modal = page . locator ( '.modal' ) ;
39- await modal . getByRole ( 'tab' , { name : / d e b i a n / i } ) . click ( ) ;
40+ // Click on Debian tab using the nav-link
41+ await modal . locator ( '.nav-tabs' ) . getByText ( 'Debian' ) . click ( ) ;
4042
4143 // Debian instructions should be visible
4244 await expect ( modal . getByText ( / d e b i a n s t r e t c h a n d l a t e r / i) ) . toBeVisible ( ) ;
@@ -46,10 +48,11 @@ test.describe('Download Modal Flow', () => {
4648 await page . goto ( '/#download' ) ;
4749
4850 const modal = page . locator ( '.modal' ) ;
49- await modal . getByRole ( 'tab' , { name : / o t h e r / i } ) . click ( ) ;
51+ // Click on Other tab
52+ await modal . locator ( '.nav-tabs' ) . getByText ( 'Other' ) . click ( ) ;
5053
5154 // macOS instructions should be visible
52- await expect ( modal . getByText ( ' Mac OS X') . first ( ) ) . toBeVisible ( ) ;
55+ await expect ( modal . getByRole ( 'heading' , { name : ' Mac OS X' } ) ) . toBeVisible ( ) ;
5356 await expect ( modal . getByText ( 'brew install --cask macfuse' ) . first ( ) ) . toBeVisible ( ) ;
5457 await expect ( modal . getByText ( 'brew install cryfs/tap/cryfs' ) . first ( ) ) . toBeVisible ( ) ;
5558 } ) ;
@@ -58,18 +61,19 @@ test.describe('Download Modal Flow', () => {
5861 await page . goto ( '/#download' ) ;
5962
6063 const modal = page . locator ( '.modal' ) ;
61- await modal . getByRole ( 'tab' , { name : / o t h e r / i } ) . click ( ) ;
64+ // Click on Other tab
65+ await modal . locator ( '.nav-tabs' ) . getByText ( 'Other' ) . click ( ) ;
6266
6367 // Windows instructions should be visible
64- await expect ( modal . getByText ( ' Windows') . first ( ) ) . toBeVisible ( ) ;
68+ await expect ( modal . getByRole ( 'heading' , { name : ' Windows' } ) ) . toBeVisible ( ) ;
6569 await expect ( modal . getByText ( / w i n d o w s s u p p o r t i s h i g h l y e x p e r i m e n t a l / i) ) . toBeVisible ( ) ;
6670 } ) ;
6771
6872 test ( 'should have DokanY download link' , async ( { page } ) => {
6973 await page . goto ( '/#download' ) ;
7074
7175 const modal = page . locator ( '.modal' ) ;
72- await modal . getByRole ( 'tab' , { name : / o t h e r / i } ) . click ( ) ;
76+ await modal . locator ( '.nav-tabs' ) . getByText ( 'Other' ) . click ( ) ;
7377
7478 const dokanLink = modal . getByRole ( 'link' , { name : / d o k a n y / i } ) ;
7579 await expect ( dokanLink ) . toBeVisible ( ) ;
0 commit comments