Skip to content

Commit 51bb4d5

Browse files
ADjenkovADjenkov
ADjenkov
authored and
ADjenkov
committed
chore(modal-navigation-ng): add tests for nested modal views without frames
1 parent 5f77639 commit 51bb4d5

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Diff for: e2e/modal-navigation-ng/app/modal/modal.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<StackLayout backgroundColor="lightGreen">
77
<Button text="Navigate To Second Page" (tap)="onNavigateSecondPage()" [visibility]="navigationVisibility"></Button>
88
<Button text="Show Nested Modal Page With Frame" (tap)="showNestedModalFrame()" [visibility]="navigationVisibility"></Button>
9-
<Button text="Show Nested Modal Page" (tap)="showNestedModal()" [visibility]="navigationVisibility"></Button>
9+
<Button text="Show Nested Modal Page" (tap)="showNestedModal()"></Button>
1010
<Button text="Show Dialog" (tap)="showDialogConfirm()"></Button>
1111
<Button text="Close Modal" (tap)="close(rootLayout)"></Button>
1212
</StackLayout>

Diff for: e2e/modal-navigation-ng/e2e/modal-layout.e2e-spec.ts

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ describe("modal-layout:", () => {
4545
await screen.loadedHome();
4646
});
4747

48+
it("should show nested modal page, run in background, close", async () => {
49+
await testNestedModalPageBackground(driver, screen, false);
50+
});
51+
4852
it("should show dialog confirm inside modal view with no frame, run in background", async () => {
4953
await testDialogBackground(driver, screen, false);
5054
});

Diff for: nativescript-angular/directives/dialogs.ts

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ export class ModalDialogService {
6767
parentView = parentView.ngAppRoot;
6868
}
6969

70+
// _ngDialogRoot is the first child of the previously detached proxy.
71+
// It should have 'viewController' (iOS) or '_dialogFragment' (Android) available for
72+
// presenting future modal views.
7073
if (parentView._ngDialogRoot) {
7174
parentView = parentView._ngDialogRoot;
7275
}

0 commit comments

Comments
 (0)