Skip to content

Commit

Permalink
Updates expected results
Browse files Browse the repository at this point in the history
Add is_mobile is sql query
Accept array for lcps
  • Loading branch information
Miraeld committed May 14, 2024
1 parent 7ec803e commit 1cc1966
Show file tree
Hide file tree
Showing 4 changed files with 353 additions and 182 deletions.
4 changes: 2 additions & 2 deletions src/features/lcp-beacon-script.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Feature: Beacon script captures the right images.
Scenario: Beacon captures expected images in desktop
When I log out
And I visit the urls for 'desktop'
Then lcp and atf should be as expected
Then lcp and atf should be as expected for 'desktop'

Scenario: Beacon captures expected images in mobile
When I log out
And I visit the urls for 'mobile'
Then lcp and atf should be as expected
Then lcp and atf should be as expected for 'mobile'
216 changes: 150 additions & 66 deletions src/support/results/expectedResultsDesktop.json
Original file line number Diff line number Diff line change
@@ -1,150 +1,234 @@
{
"lcp_bg_inline_template": {
"lcp": "wp-content/rocket-test-data/images/test_inline2.jpeg",
"lcp": [
"/wp-content/rocket-test-data/images/test_inline2.jpeg"
],
"viewport": [
"/wp-content/rocket-test-data/images/lcp/testjpeg.jpeg"
]
],
"enabled": true
},
"lcp_bg_samestyle_template": {
"lcp": "https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testavif.avif",
"lcp": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testavif.avif"
],
"viewport": [
"wp-content/rocket-test-data/images/lcp/testjpg.jpg"
]
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testjpg.jpg"
],
"enabled": true
},
"lcp_img_loadedbydynamicjs_template": {
"lcp": "https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testavif.avif",
"lcp": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testavif.avif"
],
"viewport": [
"http://www.google.com/intl/en_com/images/logo_plain.png"
]
],
"enabled": true
},
"lcp_img_loadedbyjs_template": {
"lcp": [
"/wp-content/rocket-test-data/images/istockphoto-1184692500-612x612.webp"
],
"viewport": [
"/test.png",
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testwebp.webp"
],
"enabled": true
},
"lcp_bg_multimage_template": {
"lcp": "wp-content/rocket-test-data/image/file_example_JPG_100kB.jpg",
"lcp": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/image/test3.webp",
"/wp-content/rocket-test-data/image/file_example_JPG_100kB.jpg"
],
"viewport": [
"https://fastly.picsum.photos/id/976/200/300.jpg?hmac=s1Uz9fgJv32r8elfaIYn7pLpQXps7X9oYNwC5XirhO8",
"https://rocketlabsqa.ovh/wp-content/rocket-test-data/images/fixtheissue.jpg"
]
],
"enabled": true
},
"lcp_with_space_after_title": {
"lcp": "https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testwebp.webp",
"lcp": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testwebp.webp"
],
"viewport": [
"/wp-content/rocket-test-data/images/test_inline2.jpeg"
]
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/test_inline2.jpeg"
],
"enabled": true
},
"lcp_test_template": {
"lcp": "wp-content/rocket-test-data/images/test_internal2.jpg",
"lcp": [
"/wp-content/rocket-test-data/images/test_internal2.jpg"
],
"viewport": [
"/wp-content/rocket-test-data/images/lipsum_logo.jpg"
]
],
"enabled": true
},
"lcp_bg_responsive_webkit_template": {
"lcp": "https://rocketlabsqa.ovh/wp-content/rocket-test-data/images/fixtheissue.jpg",
"lcp": [
"https://fastly.picsum.photos/id/976/200/300.jpg?hmac=s1Uz9fgJv32r8elfaIYn7pLpQXps7X9oYNwC5XirhO8",
"https://rocketlabsqa.ovh/wp-content/rocket-test-data/images/fixtheissue.jpg"
],
"viewport": [
"/wp-content/rocket-test-data/image/test3.webp",
"/wp-content/rocket-test-data/images/lcp/testwebp.webp"
]
"/wp-content/rocket-test-data/images/lcp/testwebp.webp",
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testavif.avif"
],
"enabled": true
},
"lcp_regular_image_template": {
"lcp": "wp-content/rocket-test-data/images/600px-Mapang-test.gif",
"lcp": [
"/wp-content/rocket-test-data/images/600px-Mapang-test.gif"
],
"viewport": [
"/test.png",
"/wp-content/rocket-test-data/images/test_inline2.jpeg",
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testPng.png",
"/wp-content/rocket-test-data/images/Przechwytywanie.PNG"
]
],
"enabled": true
},
"lcp_bg_reponsive_imgset_template": {
"lcp": "/wp-content/rocket-test-data/images/lcp/testavif.avif",
"lcp": [
"/wp-content/rocket-test-data/images/lcp/testavif.avif",
"/wp-content/rocket-test-data/images/lcp/testwebp.webp"
],
"viewport": [
"https://fastly.picsum.photos/id/976/200/300.jpg?hmac=s1Uz9fgJv32r8elfaIYn7pLpQXps7X9oYNwC5XirhO8"
]
"https://fastly.picsum.photos/id/976/200/300.jpg?hmac=s1Uz9fgJv32r8elfaIYn7pLpQXps7X9oYNwC5XirhO8",
"https://rocketlabsqa.ovh/wp-content/rocket-test-data/images/fixtheissue.jpg"
],
"enabled": true
},
"lcp_rsponsive_imagegrid": {
"lcp": "https://www.w3schools.com/w3images/underwater.jpg",
"lcp": [
"https://www.w3schools.com/w3images/underwater.jpg"
],
"viewport": [
"https://www.w3schools.com/w3images/wedding.jpg",
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testavif.avif",
"/wp-content/rocket-test-data/images/file_example_JPG_100kB.jpg"
]
"https://www.w3schools.com/w3images/rocks.jpg",
"/wp-content/rocket-test-data/images/lcp/testPng.png",
"/wp-content/rocket-test-data/images/lcp/testavif.avif",
"/wp-content/rocket-test-data/images/file_example_JPG_100kB.jpg",
"/wp-content/rocket-test-data/images/maxime-lebrun-6g3Akg708E0-unsplash.jpg"
],
"enabled": true
},
"lcp_attribute_template": {
"lcp": "/wp-content/rocket-test-data/images/wp-rocket.svg",
"lcp": [
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/wp-rocket.svg"
],
"viewport": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testPng.png",
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/wp-rocket2.svg",
"/wp-content/rocket-test-data/images/lcp/testsvg.svg",
"/wp-content/rocket-test-data/images/lcp/testjpeg.jpeg",
"https://rocketlabsqa.ovh/wp-content/rocket-test-data/images/fixtheissue.jpg",
"/wp-content/rocket-test-data/images/lcp/testavif.avif",
"/test.png"
]
],
"enabled": true
},
"lcp_no_dimension_svg": {
"lcp": "wp-content/rocket-test-data/images/lcp/testsvg.svg",
"viewport": [
]
"lcp": [
"/wp-content/rocket-test-data/images/lcp/testsvg.svg"
],
"viewport": [],
"enabled": true
},
"lcp_no_dimensions_picture": {
"lcp": "wp-content/rocket-test-data/images/lcp/testavif.avif",
"lcp": [
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testavif.avif"
],
"viewport": [
"/test.png"
]
"/test.png",
"wp-content/rocket-test-data/images/lcp/testjpg.jpg"
],
"enabled": true
},
"lcp_no_dimension_absolute_url": {
"lcp": "wp-content/rocket-test-data/images/lcp/testjpg.jpg",
"lcp": [
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testjpg.jpg"
],
"viewport": [
"/rocket-test-data/images/lcp/testPng.png",
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testPng.png",
"https://cdn.pixabay.com/photo/2023/06/05/02/01/starry-sky-8041247_1280.jpg"
]
],
"enabled": true
},
"lcp_image_withspecialchar_template": {
"lcp": "wp-content/rocket-test-data/images/lcp/imagewithspace.jpg",
"lcp": [
"/wp-content/rocket-test-data/images/lcp/image%20with%20space.jpg"
],
"viewport": [
"/wp-content/rocket-test-data/images/testspace2.png",
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/paperquipesTest.jpeg"
]
"/wp-content/rocket-test-data/images/testspace%202.png",
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/paperéquipesTest.jpeg"
],
"enabled": false
},
"lcp_img_addedbydynamicstyle_template": {
"lcp": "wp-content/rocket-test-data/images/paper.jpeg",
"lcp": [
"/wp-content/rocket-test-data/images/paper.jpeg"
],
"viewport": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testjpg.jpg"
]
],
"enabled": true
},
"lcp_withfetchpriorityhigh_template": {
"lcp": "https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/test_inline2.jpeg",
"lcp": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/test_inline2.jpeg"
],
"viewport": [
"https://e2e.rocketlabsqa.ovh/wp-content/rocket-test-data/images/lcp/testjpeg.jpeg"
]
"/wp-content/rocket-test-data/images/lcp/testjpeg.jpeg"
],
"enabled": true
},
"lcp_single_double": {
"lcp": "not found",
"viewport": [
]
"lcp": [
],
"viewport": [],
"enabled": true
},
"lcp_withfetchprioritylow_template": {
"lcp": "wp-content/rocket-test-data/images/test_inline2.jpeg",
"viewport": []
"lcp": [
"/wp-content/rocket-test-data/images/test_inline2.jpeg"
],
"viewport": [],
"enabled": true
},
"lcp_withfetchpriorityempty_template": {
"lcp": "wp-content/rocket-test-data/images/test_inline2.jpeg",
"viewport": []
"lcp": [
"/wp-content/rocket-test-data/images/test_inline2.jpeg"
],
"viewport": [],
"enabled": true
},
"lcp_withfetchpriorityinurl_template": {
"lcp": "https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/fetchpriority='high'.jpg",
"viewport": []
"lcp": [
"https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/fetchpriority='high'.jpg"
],
"viewport": [],
"enabled": true
},
"lcp_video_poster_template": {
"lcp": "wp-content/rocket-test-data/images/lcp/testjpg.jpg",
"viewport": []
"lcp": [
"/wp-content/rocket-test-data/images/lcp/testjpg.jpg"
],
"viewport": [],
"enabled": true
},
"lcp_big_image_template": {
"lcp": "/wp-content/rocket-test-data/images/BigJPGImage_20mbmb.jpg",
"viewport": []
"lcp": [
"/wp-content/rocket-test-data/images/BigJPGImage_20mbmb.jpg"
],
"viewport": [],
"enabled": true
},
"lcp_no_fetchpriority": {
"lcp": "wp-content/rocket-test-data/images/istockphoto-1184692500-612x612.webp",
"viewport": []
},
"lcp_6330_template": {
"lcp": "https://new.rocketlabsqa.ovh/wp-content/rocket-test-data/images/wp-rocket.svg",
"viewport": []
"lcp": [
"/wp-content/rocket-test-data/images/istockphoto-1184692500-612x612.webp"
],
"viewport": [],
"enabled": true
}
}
Loading

0 comments on commit 1cc1966

Please sign in to comment.