@@ -190,6 +190,53 @@ describe("Nested navigation + page navigation", () => {
190190 } ) ;
191191} ) ;
192192
193+ describe ( "Nested name navigation + page navigation" , ( ) => {
194+ let driver : AppiumDriver ;
195+
196+ before ( async ( ) => {
197+ driver = await createDriver ( ) ;
198+ await driver . resetApp ( ) ;
199+ } ) ;
200+
201+ it ( "should find First" , async ( ) => {
202+ await assureFirstComponent ( driver ) ;
203+ } ) ;
204+
205+ it ( "should navigate to Second(1)/master" , async ( ) => {
206+ await findAndClick ( driver , "GO TO SECOND" ) ;
207+
208+ await assureSecondComponent ( driver , 1 )
209+ await assureNestedMasterComponent ( driver ) ;
210+ } ) ;
211+
212+ it ( "should load nested named Master" , async ( ) => {
213+ await findAndClick ( driver , "LOAD NESTED NAMED OUTLET" ) ;
214+ await assureNamedNestedMasterComponent ( driver ) ;
215+ } ) ;
216+
217+ it ( "should navigate to nested named Master Detail/1" , async ( ) => {
218+ const navigationButton =
219+ await driver . findElementByText ( "DETAIL-NAMED 1" , SearchOptions . exact ) ;
220+ navigationButton . click ( ) ;
221+
222+ await assureNamedNestedDetailComponent ( driver , 1 ) ;
223+ } ) ;
224+
225+ it ( "should navigate back to Master and navigate to Detail/2" , async ( ) => {
226+ let navigationButton =
227+ await driver . findElementByText ( "BACK-NESTED" , SearchOptions . exact ) ;
228+ navigationButton . click ( ) ;
229+
230+ await assureNamedNestedMasterComponent ( driver ) ;
231+
232+ navigationButton =
233+ await driver . findElementByText ( "DETAIL-NAMED 2" , SearchOptions . exact ) ;
234+ navigationButton . click ( ) ;
235+
236+ await assureNamedNestedDetailComponent ( driver , 2 ) ;
237+ } ) ;
238+ } ) ;
239+
193240describe ( "Shouldn't be able to navigate back on startup" , ( ) => {
194241 let driver : AppiumDriver ;
195242
@@ -371,6 +418,16 @@ async function assureComponentlessLazyComponent(driver: AppiumDriver) {
371418 await driver . findElementByText ( "Lazy Componentless Route" , SearchOptions . exact ) ;
372419}
373420
421+ async function assureNamedNestedMasterComponent ( driver : AppiumDriver ) {
422+ await driver . findElementByText ( "NamedNestedMaster" , SearchOptions . exact ) ;
423+ }
424+
425+ async function assureNamedNestedDetailComponent ( driver : AppiumDriver , param : number ) {
426+ await driver . findElementByText ( "NamedNestedDetail" , SearchOptions . exact ) ;
427+ await driver . findElementByText ( `nested-named-param: ${ param } ` , SearchOptions . exact ) ;
428+
429+ }
430+
374431async function assureSecondComponent ( driver : AppiumDriver , param : number ) {
375432 await driver . findElementByText ( "SecondComponent" , SearchOptions . exact ) ;
376433 await driver . findElementByText ( `param: ${ param } ` , SearchOptions . exact ) ;
0 commit comments