@@ -8,6 +8,8 @@ import Photo from "../page-model/photo";
88import PhotoViewer from "../page-model/photoviewer" ;
99import Page from "../page-model/page" ;
1010import PhotoEdit from "../page-model/photo-edit" ;
11+ import Notify from "../page-model/notifications" ;
12+
1113import { helperBeforeFixture , helperBeforeEach , helperAfterEach , logTime , logTimeEnd , logMessage } from "../page-model/helpers" ;
1214
1315const scroll = ClientFunction ( ( x , y ) => window . scrollTo ( x , y ) ) ;
@@ -32,6 +34,7 @@ const photo = new Photo();
3234const photoviewer = new PhotoViewer ( ) ;
3335const page = new Page ( ) ;
3436const photoedit = new PhotoEdit ( ) ;
37+ const notify = new Notify ( ) ;
3538
3639test . meta ( "testID" , "photos-001" ) . meta ( { mode : "public" } ) ( "Common: Scroll to top" , async ( t ) => {
3740 await t . click ( toolbar . cardsViewAction ) ;
@@ -353,14 +356,13 @@ test.meta("testID", "photos-007").meta({ mode: "public" })("Common: Mark photos/
353356 await photoedit . turnSwitchOff ( "scan" ) ;
354357 await photoedit . turnSwitchOff ( "panorama" ) ;
355358 await t . click ( photoedit . dialogClose ) ;
356- await t . wait ( 9000 ) ; // ToDo: is there a better way than a flat wait?
357359
358360 if ( t . browser . platform === "mobile" ) {
359361 await t . eval ( ( ) => location . reload ( ) ) ;
360362 } else {
361363 await toolbar . triggerToolbarAction ( "refresh" ) ;
362364 }
363-
365+ await notify . waitForPhotosToLoad ( 5000 , true ) ;
364366 await photo . checkPhotoVisibility ( FirstPhotoUid , false ) ;
365367 await photo . checkPhotoVisibility ( FirstVideoUid , false ) ;
366368} ) ;
@@ -419,8 +421,7 @@ test.meta("testID", "photos-010").meta({ mode: "public" })("Common: Set location
419421 //search
420422 await t
421423 . typeText ( photoedit . locationSearch , "Brandenburger Tor Berlin" )
422- . click ( Selector ( 'div.v-autocomplete__content' ) . find ( 'i.mdi-map-marker' ) ) ; // Wait for the drop down to be populated, and select from it
423- // .pressKey("enter"); // Was it important to test with the keyboard? Or is click above ok?
424+ . click ( Selector ( 'div.v-autocomplete__content' ) . find ( 'i.mdi-map-marker' ) ) ;
424425 const Coordinates = await photoedit . locationInput . value ;
425426 await t . expect ( Coordinates ) . eql ( "52.5162546, 13.3777166" ) ;
426427 await t . expect ( photoedit . locationMarker . visible ) . ok ( ) ;
0 commit comments