1- import { AppiumDriver } from "nativescript-dev-appium" ;
1+ import { AppiumDriver , SearchOptions } from "nativescript-dev-appium" ;
22import { assert } from "chai" ;
33
44const home = "Home Component"
@@ -165,6 +165,11 @@ export class Screen {
165165 await btnTap . click ( ) ;
166166 }
167167
168+ private showSharedModalPresentationStyle = async ( ) => {
169+ const btnTap = await this . _driver . findElementByText ( "popover" , SearchOptions . contains ) ;
170+ await btnTap . click ( ) ;
171+ }
172+
168173 loadedModalPage = async ( ) => {
169174 const btnShowNestedModalPage = await this . _driver . findElementByAutomationText ( showNestedModalPage ) ;
170175 assert . isTrue ( await btnShowNestedModalPage . isDisplayed ( ) , `${ showNestedModalPage } is not displayed` ) ;
@@ -212,6 +217,7 @@ export class Screen {
212217 }
213218
214219 loadedModalNoFrame = async ( ) => {
220+ await this . _driver . wait ( 2000 ) ;
215221 const btnShowDialogConfirm = await this . _driver . waitForElement ( showDialog ) ;
216222 const btnCloseModal = await this . _driver . waitForElement ( closeModal ) ;
217223 assert . isTrue ( await btnShowDialogConfirm . isDisplayed ( ) ) ;
@@ -309,4 +315,13 @@ export class Screen {
309315 const lbl = await this . _driver . waitForElement ( sharedModalView , 5000 ) ;
310316 assert . isTrue ( await lbl . isDisplayed ( ) ) ;
311317 }
318+
319+ loadSharedModalWithPresentationStyle = async ( loadShowModalPageWithFrame : boolean ) => {
320+ if ( loadShowModalPageWithFrame ) {
321+ await this . showSharedModalPresentationStyle ( ) ;
322+ }
323+
324+ const lbl = await this . _driver . waitForElement ( sharedModalView , 5000 ) ;
325+ assert . isTrue ( await lbl . isDisplayed ( ) ) ;
326+ }
312327}
0 commit comments