(action: Function, topFrame?: Frame)
| 200 | } |
| 201 | |
| 202 | export function waitUntilNavigatedFrom(action: Function, topFrame?: Frame) { |
| 203 | const currentPage = topFrame ? topFrame.currentPage : Frame.topmost().currentPage; |
| 204 | let completed = false; |
| 205 | function navigatedFrom(args) { |
| 206 | args.object.page.off('navigatedFrom', navigatedFrom); |
| 207 | completed = true; |
| 208 | } |
| 209 | |
| 210 | currentPage.on('navigatedFrom', navigatedFrom); |
| 211 | action(); |
| 212 | TKUnit.waitUntilReady(() => completed); |
| 213 | } |
| 214 | |
| 215 | export function waitUntilLayoutReady(view: View): void { |
| 216 | TKUnit.waitUntilReady(() => view.isLayoutValid); |
no test coverage detected