Skip to content

Commit 77bf0cb

Browse files
Merge branch 'main' into ws/desktop-safari-fullpage-bezel-issue
2 parents 712de6d + 782b98a commit 77bf0cb

File tree

46 files changed

+277
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+277
-72
lines changed

.changeset/lazy-owls-float.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@wdio/image-comparison-core": patch
3+
"@wdio/visual-service": patch
4+
---
5+
6+
7+
# 🐛 Bugfixes
8+
9+
## #1000 fix incorrect cropping and stitching of last image for fullpage screenshots on mobile
10+
11+
The determination of the position of the last image in mobile fullpage webscreenshots was incorrect. This was mostly seen with iOS, but also had some impact on Android. This is now fixed
12+
13+
14+
# Committers: 1
15+
16+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))

.changeset/twenty-apes-pump.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@wdio/image-comparison-core": patch
3+
"@wdio/visual-service": patch
4+
---
5+
6+
# 🐛 Bugfixes
7+
8+
## #1038 fix incorrect determination of ignore area
9+
Ignore regions with `left: 0` and `right:0` lead to an incorrect width which lead to an incorrect ignore area. This is now fixed
10+
11+
12+
# Committers: 1
13+
14+
- Wim Selles ([@wswebcreation](https://github.com/wswebcreation))

packages/image-comparison-core/src/methods/__snapshots__/images.test.ts.snap

Lines changed: 95 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,10 @@ exports[`makeFullPageBase64Image > should create full page base64 image with mul
854854
[
855855
[
856856
{
857+
"bitmap": {
858+
"height": 800,
859+
"width": 1000,
860+
},
857861
"composite": [MockFunction spy],
858862
"crop": [MockFunction spy] {
859863
"calls": [
@@ -906,6 +910,10 @@ exports[`makeFullPageBase64Image > should create full page base64 image with mul
906910
],
907911
[
908912
{
913+
"bitmap": {
914+
"height": 800,
915+
"width": 1000,
916+
},
909917
"composite": [MockFunction spy],
910918
"crop": [MockFunction spy] {
911919
"calls": [
@@ -958,6 +966,10 @@ exports[`makeFullPageBase64Image > should create full page base64 image with mul
958966
],
959967
[
960968
{
969+
"bitmap": {
970+
"height": 800,
971+
"width": 1000,
972+
},
961973
"composite": [MockFunction spy],
962974
"crop": [MockFunction spy] {
963975
"calls": [
@@ -1025,6 +1037,10 @@ exports[`makeFullPageBase64Image > should handle canvas Y positions correctly 1`
10251037
[
10261038
[
10271039
{
1040+
"bitmap": {
1041+
"height": 800,
1042+
"width": 1000,
1043+
},
10281044
"composite": [MockFunction spy],
10291045
"crop": [MockFunction spy] {
10301046
"calls": [
@@ -1077,6 +1093,10 @@ exports[`makeFullPageBase64Image > should handle canvas Y positions correctly 1`
10771093
],
10781094
[
10791095
{
1096+
"bitmap": {
1097+
"height": 800,
1098+
"width": 1000,
1099+
},
10801100
"composite": [MockFunction spy],
10811101
"crop": [MockFunction spy] {
10821102
"calls": [
@@ -1129,6 +1149,10 @@ exports[`makeFullPageBase64Image > should handle canvas Y positions correctly 1`
11291149
],
11301150
[
11311151
{
1152+
"bitmap": {
1153+
"height": 800,
1154+
"width": 1000,
1155+
},
11321156
"composite": [MockFunction spy],
11331157
"crop": [MockFunction spy] {
11341158
"calls": [
@@ -1234,6 +1258,10 @@ exports[`makeFullPageBase64Image > should handle different device pixel ratios 3
12341258
[
12351259
[
12361260
{
1261+
"bitmap": {
1262+
"height": 800,
1263+
"width": 1000,
1264+
},
12371265
"composite": [MockFunction spy],
12381266
"crop": [MockFunction spy] {
12391267
"calls": [
@@ -1286,6 +1314,10 @@ exports[`makeFullPageBase64Image > should handle different device pixel ratios 3
12861314
],
12871315
[
12881316
{
1317+
"bitmap": {
1318+
"height": 800,
1319+
"width": 1000,
1320+
},
12891321
"composite": [MockFunction spy],
12901322
"crop": [MockFunction spy] {
12911323
"calls": [
@@ -1338,6 +1370,10 @@ exports[`makeFullPageBase64Image > should handle different device pixel ratios 3
13381370
],
13391371
[
13401372
{
1373+
"bitmap": {
1374+
"height": 800,
1375+
"width": 1000,
1376+
},
13411377
"composite": [MockFunction spy],
13421378
"crop": [MockFunction spy] {
13431379
"calls": [
@@ -1478,6 +1514,10 @@ exports[`makeFullPageBase64Image > should handle landscape mode with rotation 3`
14781514
[
14791515
[
14801516
{
1517+
"bitmap": {
1518+
"height": 800,
1519+
"width": 1000,
1520+
},
14811521
"composite": [MockFunction spy],
14821522
"crop": [MockFunction spy] {
14831523
"calls": [
@@ -1582,6 +1622,10 @@ exports[`makeFullPageBase64Image > should handle landscape mode with rotation 3`
15821622
],
15831623
[
15841624
{
1625+
"bitmap": {
1626+
"height": 800,
1627+
"width": 1000,
1628+
},
15851629
"composite": [MockFunction spy],
15861630
"crop": [MockFunction spy] {
15871631
"calls": [
@@ -1686,6 +1730,10 @@ exports[`makeFullPageBase64Image > should handle landscape mode with rotation 3`
16861730
],
16871731
[
16881732
{
1733+
"bitmap": {
1734+
"height": 800,
1735+
"width": 1000,
1736+
},
16891737
"composite": [MockFunction spy],
16901738
"crop": [MockFunction spy] {
16911739
"calls": [
@@ -1843,6 +1891,10 @@ exports[`makeFullPageBase64Image > should handle landscape mode without rotation
18431891
[
18441892
[
18451893
{
1894+
"bitmap": {
1895+
"height": 800,
1896+
"width": 1000,
1897+
},
18461898
"composite": [MockFunction spy],
18471899
"crop": [MockFunction spy] {
18481900
"calls": [
@@ -1895,6 +1947,10 @@ exports[`makeFullPageBase64Image > should handle landscape mode without rotation
18951947
],
18961948
[
18971949
{
1950+
"bitmap": {
1951+
"height": 800,
1952+
"width": 1000,
1953+
},
18981954
"composite": [MockFunction spy],
18991955
"crop": [MockFunction spy] {
19001956
"calls": [
@@ -1947,6 +2003,10 @@ exports[`makeFullPageBase64Image > should handle landscape mode without rotation
19472003
],
19482004
[
19492005
{
2006+
"bitmap": {
2007+
"height": 800,
2008+
"width": 1000,
2009+
},
19502010
"composite": [MockFunction spy],
19512011
"crop": [MockFunction spy] {
19522012
"calls": [
@@ -2015,8 +2075,8 @@ exports[`makeFullPageBase64Image > should handle large canvas dimensions 2`] = `
20152075
[
20162076
[
20172077
{
2018-
"h": 2000,
2019-
"w": 3000,
2078+
"h": 800,
2079+
"w": 1000,
20202080
"x": 0,
20212081
"y": 0,
20222082
},
@@ -2028,13 +2088,17 @@ exports[`makeFullPageBase64Image > should handle large canvas dimensions 3`] = `
20282088
[
20292089
[
20302090
{
2091+
"bitmap": {
2092+
"height": 800,
2093+
"width": 1000,
2094+
},
20312095
"composite": [MockFunction spy],
20322096
"crop": [MockFunction spy] {
20332097
"calls": [
20342098
[
20352099
{
2036-
"h": 2000,
2037-
"w": 3000,
2100+
"h": 800,
2101+
"w": 1000,
20382102
"x": 0,
20392103
"y": 0,
20402104
},
@@ -2073,7 +2137,7 @@ exports[`makeFullPageBase64Image > should handle screenshots with cropping posit
20732137
[
20742138
{
20752139
"h": 500,
2076-
"w": 500,
2140+
"w": 900,
20772141
"x": 100,
20782142
"y": 50,
20792143
},
@@ -2085,13 +2149,17 @@ exports[`makeFullPageBase64Image > should handle screenshots with cropping posit
20852149
[
20862150
[
20872151
{
2152+
"bitmap": {
2153+
"height": 800,
2154+
"width": 1000,
2155+
},
20882156
"composite": [MockFunction spy],
20892157
"crop": [MockFunction spy] {
20902158
"calls": [
20912159
[
20922160
{
20932161
"h": 500,
2094-
"w": 500,
2162+
"w": 900,
20952163
"x": 100,
20962164
"y": 50,
20972165
},
@@ -2134,15 +2202,15 @@ exports[`makeFullPageBase64Image > should handle screenshots with different dime
21342202
[
21352203
{
21362204
"h": 600,
2137-
"w": 1200,
2205+
"w": 1000,
21382206
"x": 0,
21392207
"y": 0,
21402208
},
21412209
],
21422210
[
21432211
{
2144-
"h": 900,
2145-
"w": 1200,
2212+
"h": 800,
2213+
"w": 1000,
21462214
"x": 0,
21472215
"y": 0,
21482216
},
@@ -2154,21 +2222,25 @@ exports[`makeFullPageBase64Image > should handle screenshots with different dime
21542222
[
21552223
[
21562224
{
2225+
"bitmap": {
2226+
"height": 800,
2227+
"width": 1000,
2228+
},
21572229
"composite": [MockFunction spy],
21582230
"crop": [MockFunction spy] {
21592231
"calls": [
21602232
[
21612233
{
21622234
"h": 600,
2163-
"w": 1200,
2235+
"w": 1000,
21642236
"x": 0,
21652237
"y": 0,
21662238
},
21672239
],
21682240
[
21692241
{
2170-
"h": 900,
2171-
"w": 1200,
2242+
"h": 800,
2243+
"w": 1000,
21722244
"x": 0,
21732245
"y": 0,
21742246
},
@@ -2194,21 +2266,25 @@ exports[`makeFullPageBase64Image > should handle screenshots with different dime
21942266
],
21952267
[
21962268
{
2269+
"bitmap": {
2270+
"height": 800,
2271+
"width": 1000,
2272+
},
21972273
"composite": [MockFunction spy],
21982274
"crop": [MockFunction spy] {
21992275
"calls": [
22002276
[
22012277
{
22022278
"h": 600,
2203-
"w": 1200,
2279+
"w": 1000,
22042280
"x": 0,
22052281
"y": 0,
22062282
},
22072283
],
22082284
[
22092285
{
2210-
"h": 900,
2211-
"w": 1200,
2286+
"h": 800,
2287+
"w": 1000,
22122288
"x": 0,
22132289
"y": 0,
22142290
},
@@ -2263,6 +2339,10 @@ exports[`makeFullPageBase64Image > should handle single screenshot 3`] = `
22632339
[
22642340
[
22652341
{
2342+
"bitmap": {
2343+
"height": 800,
2344+
"width": 1000,
2345+
},
22662346
"composite": [MockFunction spy],
22672347
"crop": [MockFunction spy] {
22682348
"calls": [

packages/image-comparison-core/src/methods/__snapshots__/rectangles.test.ts.snap

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -347,18 +347,6 @@ exports[`rectangles > prepareIgnoreRectangles > should include mobile web rectan
347347
"right": 2688,
348348
"top": 5842,
349349
},
350-
{
351-
"bottom": 5842,
352-
"left": 0,
353-
"right": 0,
354-
"top": 640,
355-
},
356-
{
357-
"bottom": 5842,
358-
"left": 2688,
359-
"right": 2688,
360-
"top": 640,
361-
},
362350
]
363351
`;
364352

packages/image-comparison-core/src/methods/__snapshots__/screenshots.test.ts.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ exports[`screenshots > getMobileFullPageNativeWebScreenshotsData > should handle
176176
},
177177
],
178178
"fullPageHeight": 637,
179-
"fullPageWidth": 1334,
179+
"fullPageWidth": 667,
180180
}
181181
`;
182182

@@ -203,7 +203,7 @@ exports[`screenshots > getMobileFullPageNativeWebScreenshotsData > should hide e
203203
},
204204
],
205205
"fullPageHeight": 2623,
206-
"fullPageWidth": 750,
206+
"fullPageWidth": 375,
207207
}
208208
`;
209209

@@ -230,7 +230,7 @@ exports[`screenshots > getMobileFullPageNativeWebScreenshotsData > should take m
230230
},
231231
],
232232
"fullPageHeight": 1289,
233-
"fullPageWidth": 375,
233+
"fullPageWidth": 187.5,
234234
}
235235
`;
236236

@@ -248,7 +248,7 @@ exports[`screenshots > getMobileFullPageNativeWebScreenshotsData > should take s
248248
},
249249
],
250250
"fullPageHeight": 637,
251-
"fullPageWidth": 750,
251+
"fullPageWidth": 375,
252252
}
253253
`;
254254

0 commit comments

Comments
 (0)