@@ -8,7 +8,7 @@ test.describe('Projects homepage @readonly', function () {
88 await page . goto ( url , { waitUntil : 'networkidle' } ) ;
99 } ) ;
1010
11- test ( 'should display project metadata (cold cache) ' , async function ( { page } ) {
11+ test ( 'should have project metadata' , async function ( { page } ) {
1212
1313 let project = page . locator (
1414 '.liz-repository-project-item'
@@ -27,19 +27,6 @@ test.describe('Projects homepage @readonly', function () {
2727 await expect ( project ) . toHaveAttribute (
2828 "data-lizmap-abstract" , 'This is an abstract' ) ;
2929
30- const allMetadata = await project . locator ( '.liz-project-desc' ) ;
31- await expect ( allMetadata ) . not . toBeVisible ( ) ;
32-
33- await project . hover ( ) ;
34- // await expect(allMetadata).toBeVisible();
35- await expect ( allMetadata . locator ( '.title' ) ) . toContainText ( 'Test tags: nature, flower' ) ;
36- await expect ( allMetadata . locator ( '.abstract' ) ) . toContainText ( 'This is an abstract' ) ;
37- await expect ( allMetadata . locator ( '.keywordList' ) ) . toContainText ( 'nature, flower' ) ;
38-
39- // hover on header
40- await page . locator ( '#headermenu' ) . hover ( ) ;
41- await expect ( allMetadata ) . not . toBeVisible ( ) ;
42-
4330 // another project
4431 project = page . locator (
4532 '.liz-repository-project-item'
@@ -57,52 +44,5 @@ test.describe('Projects homepage @readonly', function () {
5744 "data-lizmap-title" , 'Tests tags: nature, tree' ) ;
5845 await expect ( project ) . toHaveAttribute (
5946 "data-lizmap-abstract" , 'Tags: nature, tree' ) ;
60-
61- const allMetadataTree = project . locator ( '.liz-project-desc' ) ;
62- await expect ( allMetadataTree ) . not . toBeVisible ( ) ;
63-
64- await project . hover ( ) ;
65- // await expect(allMetadataTree).toBeVisible();
66- await expect ( allMetadataTree . locator ( '.title' ) ) . toContainText ( 'Tests tags: nature, tree' ) ;
67- await expect ( allMetadataTree . locator ( '.abstract' ) ) . toContainText ( 'Tags: nature, tree' ) ;
68- await expect ( allMetadataTree . locator ( '.keywordList' ) ) . toContainText ( 'nature, tree' ) ;
69-
70- // hover on header
71- await page . locator ( '#headermenu' ) . hover ( ) ;
72- await expect ( allMetadataTree ) . not . toBeVisible ( ) ;
73-
74- } ) ;
75-
76- test ( 'should display project metadata (hot cache)' , async function ( { page } ) {
77-
78- const project = page . locator (
79- '.liz-repository-project-item'
80- ) . filter (
81- { hasText : 'Test tags: nature, flower' }
82- ) . locator ( '.liz-project' ) ;
83-
84- await expect ( project ) . toHaveAttribute (
85- "data-lizmap-proj" , 'EPSG:4326' ) ;
86- await expect ( project ) . toHaveAttribute (
87- "data-lizmap-bbox" , '-1.2459627329192546, -1.0, 1.2459627329192546, 1.0' ) ;
88- await expect ( project ) . toHaveAttribute (
89- "data-lizmap-keywords" , 'nature, flower' ) ;
90- await expect ( project ) . toHaveAttribute (
91- "data-lizmap-title" , 'Test tags: nature, flower' ) ;
92- await expect ( project ) . toHaveAttribute (
93- "data-lizmap-abstract" , 'This is an abstract' ) ;
94- const allMetadata = project . locator ( '.liz-project-desc' ) ;
95- await expect ( allMetadata ) . not . toBeVisible ( ) ;
96-
97- await project . hover ( ) ;
98- // await expect(allMetadata).toBeVisible();
99- await expect ( allMetadata . locator ( '.title' ) ) . toContainText ( 'Test tags: nature, flower' ) ;
100- await expect ( allMetadata . locator ( '.abstract' ) ) . toContainText ( 'This is an abstract' ) ;
101- await expect ( allMetadata . locator ( '.keywordList' ) ) . toContainText ( 'nature, flower' ) ;
102-
103- // hover on header
104- await page . locator ( '#headermenu' ) . hover ( ) ;
105- await expect ( allMetadata ) . not . toBeVisible ( ) ;
106-
10747 } ) ;
10848} ) ;
0 commit comments