@@ -15,6 +15,9 @@ import {setupPDiskPreviewMocks} from './pdisksPreviewMocks';
1515
1616const settingTitle = 'Compact PDisk previews' ;
1717const previewSelector = '.ydb-storage-pdisks-preview__control' ;
18+ // Linux ARM64 and x64 round translucent disk colors differently by 1–2 RGB levels.
19+ // Keep exact palette comparisons against a baseline from the same architecture.
20+ const paletteArchitecture = process . platform === 'linux' ? `-${ process . arch } ` : '' ;
1821
1922async function openNodeDisks ( page : Page ) {
2023 await new NodesPage ( page ) . goto ( { clusterName : 'preview-test' , backend : 'https://preview.test' } ) ;
@@ -84,11 +87,14 @@ for (const theme of ['light', 'dark']) {
8487 } ;
8588 // Keep previews and their original controls together in the same reference image.
8689 // Tiny translucent squares need exact comparison to catch missing color layers.
87- await expect ( page ) . toHaveScreenshot ( `pdisk-preview-palette-${ theme } .png` , {
88- clip,
89- threshold : 0 ,
90- maxDiffPixels : 0 ,
91- } ) ;
90+ await expect ( page ) . toHaveScreenshot (
91+ `pdisk-preview-palette-${ theme } ${ paletteArchitecture } .png` ,
92+ {
93+ clip,
94+ threshold : 0 ,
95+ maxDiffPixels : 0 ,
96+ } ,
97+ ) ;
9298
9399 // As in vdiskColoring.test.ts, force every tone's hover state for one stable snapshot.
94100 await previews . locator ( '.ydb-storage-pdisks-preview__color' ) . evaluateAll ( ( elements ) => {
@@ -101,11 +107,14 @@ for (const theme of ['light', 'dark']) {
101107 element . classList . add ( 'storage-disk-progress-bar_highlighted' ) ,
102108 ) ;
103109 } ) ;
104- await expect ( page ) . toHaveScreenshot ( `pdisk-preview-palette-${ theme } -hover.png` , {
105- clip,
106- threshold : 0 ,
107- maxDiffPixels : 0 ,
108- } ) ;
110+ await expect ( page ) . toHaveScreenshot (
111+ `pdisk-preview-palette-${ theme } -hover${ paletteArchitecture } .png` ,
112+ {
113+ clip,
114+ threshold : 0 ,
115+ maxDiffPixels : 0 ,
116+ } ,
117+ ) ;
109118 } ) ;
110119}
111120
0 commit comments