Skip to content

Commit e91f52c

Browse files
committed
Tests fixed for Android
1 parent 5638526 commit e91f52c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

tests/app/tests/modal-dialog.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ import {ModalDialogHost, ModalDialogOptions, ModalDialogParams, ModalDialogServi
1111
template: `<Label text="this is modal component"></Label>`
1212
})
1313
export class ModalComponent {
14-
constructor(public params: ModalDialogParams) {
15-
// Close after a while
16-
setTimeout(() => {
14+
constructor(public params: ModalDialogParams, private page: Page) {
15+
page.on("shownModally", () => {
1716
var result = this.params.context;
1817
this.params.closeCallback(result);
19-
}, 200);
18+
});
2019
}
2120
}
2221

@@ -63,7 +62,6 @@ describe('modal-dialog', () => {
6362
if (page && page.modal) {
6463
console.log("Warning: closing a leftover modal page!");
6564
page.modal.closeModal();
66-
6765
}
6866
testApp.disposeComponents();
6967
});

0 commit comments

Comments
 (0)