@@ -30,17 +30,23 @@ async function openVolViewPage(fileName: string) {
3030
3131 // Check that no placeholder overlays are visible (mdi-image-off icons)
3232 // The overlays are in divs that are shown/hidden based on imageID
33- const visibleOverlayCount = await browser . execute ( ( ) => {
34- const imageOffIcons = document . querySelectorAll ( 'i.mdi-image-off' ) ;
35- return Array . from ( imageOffIcons ) . filter ( ( icon ) => {
36- const parent = icon . closest ( 'div.overlay' ) ;
37- if ( ! parent ) return false ;
38- const style = window . getComputedStyle ( parent ) ;
39- return style . display !== 'none' && style . visibility !== 'hidden' ;
40- } ) . length ;
41- } ) ;
42-
43- expect ( visibleOverlayCount ) . toEqual ( 0 ) ;
33+ await browser . waitUntil (
34+ async ( ) => {
35+ const visibleOverlayCount = await browser . execute ( ( ) => {
36+ const imageOffIcons = document . querySelectorAll ( 'i.mdi-image-off' ) ;
37+ return Array . from ( imageOffIcons ) . filter ( ( icon ) => {
38+ const parent = icon . closest ( 'div.overlay' ) ;
39+ if ( ! parent ) return false ;
40+ const style = window . getComputedStyle ( parent ) ;
41+ return style . display !== 'none' && style . visibility !== 'hidden' ;
42+ } ) . length ;
43+ } ) ;
44+ return visibleOverlayCount === 0 ;
45+ } ,
46+ {
47+ timeoutMsg : 'Image placeholder overlays are still visible' ,
48+ }
49+ ) ;
4450}
4551
4652describe ( 'State file manifest.json code' , ( ) => {
@@ -54,10 +60,25 @@ describe('State file manifest.json code', () => {
5460 await openVolViewPage ( fileName ) ;
5561 } ) ;
5662
57- it ( 'has no errors loading manifest with axial layer layout' , async ( ) => {
63+ it ( 'loads 5.0.1 manifest with axial layer layout' , async ( ) => {
5864 const manifestPath = path . join ( FIXTURES , 'layer-axial.5-0-1.volview.json' ) ;
5965 const fileName = 'temp-layer-axial.volview.zip' ;
6066 await writeManifestToZip ( manifestPath , fileName ) ;
6167 await openVolViewPage ( fileName ) ;
68+
69+ // Switch to the Rendering tab
70+ const renderingTab = await $ ( 'button[data-testid="module-tab-Rendering"]' ) ;
71+ await renderingTab . click ( ) ;
72+
73+ // Wait for and verify that the layer opacity slider is visible
74+ await browser . waitUntil (
75+ async ( ) => {
76+ const layerSlider = await $ ( '[data-testid="layer-opacity-slider"]' ) ;
77+ return layerSlider . isDisplayed ( ) ;
78+ } ,
79+ {
80+ timeoutMsg : 'Layer opacity slider is not visible in the Rendering tab' ,
81+ }
82+ ) ;
6283 } ) ;
6384} ) ;
0 commit comments