@@ -8,68 +8,31 @@ test.describe('Projects homepage @readonly', function () {
8
8
await page . goto ( url , { waitUntil : 'networkidle' } ) ;
9
9
} ) ;
10
10
11
- test ( 'should display project metadata (cold cache) ' , async function ( { page } ) {
11
+ test ( 'should have project metadata' , async function ( { page } ) {
12
12
13
13
let project = page . locator ( '.liz-project' ) . filter ( { hasText : 'Test tags: nature, flower' } ) ;
14
14
await expect ( project ) . toHaveAttribute (
15
15
"data-lizmap-proj" , 'EPSG:4326' ) ;
16
16
await expect ( project ) . toHaveAttribute (
17
17
"data-lizmap-bbox" , '-1.2459627329192546, -1.0, 1.2459627329192546, 1.0' ) ;
18
-
19
- const allMetadata = await project . locator ( '.liz-project-desc' ) ;
20
- await expect ( allMetadata ) . not . toBeVisible ( ) ;
21
-
22
- await project . hover ( ) ;
23
- await expect ( allMetadata ) . toBeVisible ( ) ;
24
- await expect ( allMetadata . locator ( '.title' ) ) . toContainText ( 'Test tags: nature, flower' ) ;
25
- await expect ( allMetadata . locator ( '.abstract' ) ) . toContainText ( 'This is an abstract' ) ;
26
- await expect ( allMetadata . locator ( '.keywordList' ) ) . toContainText ( 'nature, flower' ) ;
27
-
28
- // hover on header
29
- await page . locator ( '#headermenu' ) . hover ( ) ;
30
- await expect ( allMetadata ) . not . toBeVisible ( ) ;
18
+ await expect ( project ) . toHaveAttribute (
19
+ "data-lizmap-title" , 'Test tags: nature, flower' ) ;
20
+ await expect ( project ) . toHaveAttribute (
21
+ "data-lizmap-abstract" , 'This is an abstract' ) ;
22
+ await expect ( project ) . toHaveAttribute (
23
+ "data-lizmap-keywords" , 'nature, flower' ) ;
31
24
32
25
// another project
33
26
project = page . locator ( '.liz-project' ) . filter ( { hasText : 'Tests tags: nature, tree' } ) ;
34
27
await expect ( project ) . toHaveAttribute (
35
28
"data-lizmap-proj" , 'EPSG:4326' ) ;
36
29
await expect ( project ) . toHaveAttribute (
37
30
"data-lizmap-bbox" , '-1.2459627329192546, -1.0, 1.2459627329192546, 1.0' ) ;
38
-
39
- const allMetadataTree = project . locator ( '.liz-project-desc' ) ;
40
- await expect ( allMetadataTree ) . not . toBeVisible ( ) ;
41
-
42
- await project . hover ( ) ;
43
- await expect ( allMetadataTree ) . toBeVisible ( ) ;
44
- await expect ( allMetadataTree . locator ( '.title' ) ) . toContainText ( 'Tests tags: nature, tree' ) ;
45
- await expect ( allMetadataTree . locator ( '.abstract' ) ) . toContainText ( 'Tags: nature, tree' ) ;
46
- await expect ( allMetadataTree . locator ( '.keywordList' ) ) . toContainText ( 'nature, tree' ) ;
47
-
48
- // hover on header
49
- await page . locator ( '#headermenu' ) . hover ( ) ;
50
- await expect ( allMetadataTree ) . not . toBeVisible ( ) ;
51
-
52
- } ) ;
53
-
54
- test ( 'should display project metadata (hot cache)' , async function ( { page } ) {
55
-
56
- const project = page . locator ( '.liz-project' ) . filter ( { hasText : 'Test tags: nature, flower' } ) ;
57
31
await expect ( project ) . toHaveAttribute (
58
- "data-lizmap-proj" , 'EPSG:4326 ') ;
32
+ "data-lizmap-title" , 'Tests tags: nature, tree ') ;
59
33
await expect ( project ) . toHaveAttribute (
60
- "data-lizmap-bbox" , '-1.2459627329192546, -1.0, 1.2459627329192546, 1.0' ) ;
61
- const allMetadata = project . locator ( '.liz-project-desc' ) ;
62
- await expect ( allMetadata ) . not . toBeVisible ( ) ;
63
-
64
- await project . hover ( ) ;
65
- await expect ( allMetadata ) . toBeVisible ( ) ;
66
- await expect ( allMetadata . locator ( '.title' ) ) . toContainText ( 'Test tags: nature, flower' ) ;
67
- await expect ( allMetadata . locator ( '.abstract' ) ) . toContainText ( 'This is an abstract' ) ;
68
- await expect ( allMetadata . locator ( '.keywordList' ) ) . toContainText ( 'nature, flower' ) ;
69
-
70
- // hover on header
71
- await page . locator ( '#headermenu' ) . hover ( ) ;
72
- await expect ( allMetadata ) . not . toBeVisible ( ) ;
73
-
34
+ "data-lizmap-abstract" , 'Tags: nature, tree' ) ;
35
+ await expect ( project ) . toHaveAttribute (
36
+ "data-lizmap-keywords" , 'nature, tree' ) ;
74
37
} ) ;
75
38
} ) ;
0 commit comments