We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When you have a toast that you present(), it throws this _getPortal error. Here's a basic function that you can invoke in a spec.
present()
spec
private presentToast(message: string): void { const toast = this.toastCtrl.create({ message: message }); toast.present(); }
There's a stackoverflow post on it, using the technique of mocking the View Controller, which according to the OP, works.
View Controller
But it hasn't worked for me using the clicker template, even though it uses the same mock. Any thoughts? Can anyone else replicate?
Here's the full error:
TypeError: Cannot read property '_getPortal' of undefined at App.present (webpack:///Users/kamok/code/election/election-mobile/~/ionic-angular/components/app/app.js:78:0 <- src/test.ts:2354:35) at Toast.present (webpack:///Users/kamok/code/election/election-mobile/~/ionic-angular/components/toast/toast.js:36:0 <- src/test.ts:62146:26) at CheckInPage.presentToast (webpack:///Users/kamok/code/election/election-mobile/src/pages/check-in/check-in.ts:9:7402 <- src/test.ts:47767:7371) at CheckInPage.broadcastMember (webpack:///Users/kamok/code/election/election-mobile/src/pages/check-in/check-in.ts:9:7095 <- src/test.ts:47767:7063) at CheckInPage.onMemberSelect (webpack:///Users/kamok/code/election/election-mobile/src/pages/check-in/check-in.ts:9:4181 <- src/test.ts:47767:4149) at Object.<anonymous> (webpack:///Users/kamok/code/election/election-mobile/src/pages/check-in/check-in.spec.ts:44:15 <- src/test.ts:77420:22) at ZoneDelegate.invoke (webpack:///Users/kamok/code/election/election-mobile/~/zone.js/dist/zone.js:232:0 <- src/test.ts:112459:26) at ProxyZoneSpec.onInvoke (webpack:///Users/kamok/code/election/election-mobile/~/zone.js/dist/proxy.js:79:0 <- src/test.ts:48591:39) at ZoneDelegate.invoke (webpack:///Users/kamok/code/election/election-mobile/~/zone.js/dist/zone.js:231:0 <- src/test.ts:112458:32) at Zone.run (webpack:///Users/kamok/code/election/election-mobile/~/zone.js/dist/zone.js:114:0 <- src/test.ts:112341:43)
The text was updated successfully, but these errors were encountered:
As discussed previously, please use stack overflow.
If you want to draw our attention to the SO post, link it in #191.
Thanks
Sorry, something went wrong.
No branches or pull requests
When you have a toast that you
present()
, it throws this _getPortal error. Here's a basic function that you can invoke in aspec
.There's a stackoverflow post on it, using the technique of mocking the
View Controller
, which according to the OP, works.But it hasn't worked for me using the clicker template, even though it uses the same mock. Any thoughts? Can anyone else replicate?
Here's the full error:
The text was updated successfully, but these errors were encountered: