@@ -55,7 +55,7 @@ test.meta("testID", "sharing-001").meta({ mode: "auth" })("Common: Create, view,
5555 . click ( sharedialog . linkExpireInput )
5656 . click ( Selector ( "div" ) . withText ( "After 1 day" ) . parent ( 'div[role="option"]' ) )
5757 . click ( sharedialog . dialogSave )
58- . click ( sharedialog . dialogSave ) ;
58+ . click ( sharedialog . dialogClose ) ;
5959 await contextmenu . clearSelection ( ) ;
6060 await t . navigateTo ( url ) ;
6161
@@ -136,71 +136,64 @@ test.meta("testID", "sharing-001").meta({ mode: "auth" })("Common: Create, view,
136136 . ok ( ) ;
137137} ) ;
138138
139- test . meta ( "testID" , "sharing-002" ) . meta ( { type : "short" , mode : "auth" } ) (
140- "Multi-Window: Verify visitor role has limited permissions" ,
141- async ( t ) => {
142- await t . navigateTo ( "http://localhost:2343/s/jxoux5ub1e/british-columbia-canada" ) ;
143- await t . expect ( toolbar . toolbarSecondTitle . withText ( "British Columbia" ) . visible ) . ok ( ) ;
144-
145- await toolbar . checkToolbarActionAvailability ( "edit" , false ) ;
146- await toolbar . checkToolbarActionAvailability ( "share" , false ) ;
147- await toolbar . checkToolbarActionAvailability ( "upload" , false ) ;
148- await toolbar . checkToolbarActionAvailability ( "refresh" , true ) ;
149- await toolbar . checkToolbarActionAvailability ( "download" , true ) ;
150-
151- await photo . triggerHoverAction ( "nth" , 0 , "select" ) ;
152-
153- await contextmenu . checkContextMenuActionAvailability ( "download" , true ) ;
154- await contextmenu . checkContextMenuActionAvailability ( "archive" , false ) ;
155- await contextmenu . checkContextMenuActionAvailability ( "private" , false ) ;
156- await contextmenu . checkContextMenuActionAvailability ( "edit" , false ) ;
157- await contextmenu . checkContextMenuActionAvailability ( "share" , false ) ;
158- await contextmenu . checkContextMenuActionAvailability ( "album" , false ) ;
159-
160- await contextmenu . clearSelection ( ) ;
161-
162- await photoviewer . openPhotoViewer ( "nth" , 0 ) ;
163-
164- await photoviewer . checkPhotoViewerActionAvailability ( "download" , true ) ;
165- await photoviewer . checkPhotoViewerActionAvailability ( "select-toggle" , true ) ;
166- await photoviewer . checkPhotoViewerActionAvailability ( "fullscreen-toggle" , true ) ;
167- await photoviewer . checkPhotoViewerActionAvailability ( "slideshow-toggle" , true ) ;
168- await photoviewer . checkPhotoViewerActionAvailability ( "favorite-toggle" , false ) ;
169- await photoviewer . checkPhotoViewerActionAvailability ( "edit-button" , false ) ;
170-
171- await photoviewer . triggerPhotoViewerAction ( "close-button" ) ;
172- await t . expect ( Selector ( "div.p-lightbox__pswp" ) . visible ) . notOk ( ) ;
173-
174- await photo . checkHoverActionAvailability ( "nth" , 0 , "favorite" , false ) ;
175- await photo . checkHoverActionAvailability ( "nth" , 0 , "select" , true ) ;
176-
177- await toolbar . triggerToolbarAction ( "view-list" ) ;
178-
179- await t
180- . expect ( Selector ( `td button.input-private` ) . visible )
181- . notOk ( )
182- . expect ( Selector ( `td button.input-favorite` ) . visible )
183- . notOk ( ) ;
184- await toolbar . triggerToolbarAction ( "view-mosaic" ) ;
185- await toolbar . triggerToolbarAction ( "view-cards" ) ;
186- await t . click ( page . cardLocation . nth ( 0 ) ) ;
187- await t . expect ( places . placesSearch . visible ) . notOk ( ) ;
188- await t . expect ( Selector ( 'div[title="Cape / Bowen Island / 2019"]' ) . visible ) . ok ( ) ;
189- await t . click ( places . zoomOut ) . click ( places . zoomOut ) . click ( places . zoomOut ) . click ( places . zoomOut ) ;
190- await t . click ( Selector ( "div.cluster-marker" ) ) ;
191- await t . expect ( places . openClusterInSearch . visible ) . notOk ( ) ;
192- await t . expect ( places . closeCluster . visible ) . ok ( ) ;
193-
194- await t . navigateTo ( "/library/states" ) ;
195-
196- const AlbumUid = await album . getNthAlbumUid ( "all" , 0 ) ;
197- await album . triggerHoverAction ( "uid" , AlbumUid , "select" ) ;
198-
199- await contextmenu . checkContextMenuActionAvailability ( "download" , true ) ;
200- await contextmenu . checkContextMenuActionAvailability ( "delete" , false ) ;
201- await contextmenu . checkContextMenuActionAvailability ( "album" , false ) ;
202- await contextmenu . checkContextMenuActionAvailability ( "edit" , false ) ;
203- await contextmenu . checkContextMenuActionAvailability ( "share" , false ) ;
204- await contextmenu . clearSelection ( ) ;
205- }
206- ) ;
139+ test . meta ( "testID" , "sharing-002" ) . meta ( { type : "short" , mode : "auth" } ) ( "Multi-Window: Verify visitor role has limited permissions" , async ( t ) => {
140+ await t . navigateTo ( "http://localhost:2343/s/jxoux5ub1e/british-columbia-canada" ) ;
141+ await t . expect ( toolbar . toolbarSecondTitle . withText ( "British Columbia" ) . visible ) . ok ( ) ;
142+
143+ await toolbar . checkToolbarActionAvailability ( "edit" , false ) ;
144+ await toolbar . checkToolbarActionAvailability ( "share" , false ) ;
145+ await toolbar . checkToolbarActionAvailability ( "upload" , false ) ;
146+ await toolbar . checkToolbarActionAvailability ( "refresh" , true ) ;
147+ await toolbar . checkToolbarActionAvailability ( "download" , true ) ;
148+
149+ await photo . triggerHoverAction ( "nth" , 0 , "select" ) ;
150+
151+ await contextmenu . checkContextMenuActionAvailability ( "download" , true ) ;
152+ await contextmenu . checkContextMenuActionAvailability ( "archive" , false ) ;
153+ await contextmenu . checkContextMenuActionAvailability ( "private" , false ) ;
154+ await contextmenu . checkContextMenuActionAvailability ( "edit" , false ) ;
155+ await contextmenu . checkContextMenuActionAvailability ( "share" , false ) ;
156+ await contextmenu . checkContextMenuActionAvailability ( "album" , false ) ;
157+
158+ await contextmenu . clearSelection ( ) ;
159+
160+ await photoviewer . openPhotoViewer ( "nth" , 0 ) ;
161+
162+ await photoviewer . checkPhotoViewerActionAvailability ( "download" , true ) ;
163+ await photoviewer . checkPhotoViewerActionAvailability ( "select-toggle" , true ) ;
164+ await photoviewer . checkPhotoViewerActionAvailability ( "fullscreen-toggle" , true ) ;
165+ await photoviewer . checkPhotoViewerActionAvailability ( "slideshow-toggle" , true ) ;
166+ await photoviewer . checkPhotoViewerActionAvailability ( "favorite-toggle" , false ) ;
167+ await photoviewer . checkPhotoViewerActionAvailability ( "edit-button" , false ) ;
168+
169+ await photoviewer . triggerPhotoViewerAction ( "close-button" ) ;
170+ await t . expect ( Selector ( "div.p-lightbox__pswp" ) . visible ) . notOk ( ) ;
171+
172+ await photo . checkHoverActionAvailability ( "nth" , 0 , "favorite" , false ) ;
173+ await photo . checkHoverActionAvailability ( "nth" , 0 , "select" , true ) ;
174+
175+ await toolbar . triggerToolbarAction ( "view-list" ) ;
176+
177+ await t . expect ( Selector ( `td button.input-private` ) . visible ) . notOk ( ) . expect ( Selector ( `td button.input-favorite` ) . visible ) . notOk ( ) ;
178+ await toolbar . triggerToolbarAction ( "view-mosaic" ) ;
179+ await toolbar . triggerToolbarAction ( "view-cards" ) ;
180+ await t . click ( page . cardLocation . nth ( 0 ) ) ;
181+ await t . expect ( places . placesSearch . visible ) . notOk ( ) ;
182+ await t . expect ( Selector ( 'div[title="Cape / Bowen Island / 2019"]' ) . visible ) . ok ( ) ;
183+ await t . click ( places . zoomOut ) . click ( places . zoomOut ) . click ( places . zoomOut ) . click ( places . zoomOut ) ;
184+ await t . click ( Selector ( "div.cluster-marker" ) ) ;
185+ await t . expect ( places . openClusterInSearch . visible ) . notOk ( ) ;
186+ await t . expect ( places . closeCluster . visible ) . ok ( ) ;
187+
188+ await t . navigateTo ( "/library/states" ) ;
189+
190+ const AlbumUid = await album . getNthAlbumUid ( "all" , 0 ) ;
191+ await album . triggerHoverAction ( "uid" , AlbumUid , "select" ) ;
192+
193+ await contextmenu . checkContextMenuActionAvailability ( "download" , true ) ;
194+ await contextmenu . checkContextMenuActionAvailability ( "delete" , false ) ;
195+ await contextmenu . checkContextMenuActionAvailability ( "album" , false ) ;
196+ await contextmenu . checkContextMenuActionAvailability ( "edit" , false ) ;
197+ await contextmenu . checkContextMenuActionAvailability ( "share" , false ) ;
198+ await contextmenu . clearSelection ( ) ;
199+ } ) ;
0 commit comments