Ember Run Loop in testing mode - javascript

I'm using https://github.com/ride/ember-stripe-service add-on and everything worked nicely until Ember 1.10.1, but since Ember 1.11.0 Ember's run loop start crashing in E2E testing saying that we were trying to access a destroyed object, I have been trying to fix it but I couldn't so I made a PR https://github.com/ride/ember-stripe-service/pull/32 reproducing the error in tests/dummy and tests/integration but neither they know how to fix it, please help.
We think is something related with Stripe.js (https://js.stripe.com/v2/) because they embed an Iframe when the script in loaded in the browser.

Related

Cypress - Chrome Extension not working inside Cypress Test Runner iFrame

I have a chrome extension that I successfully loaded into my Cypress environment. It shows up successfully in my extensions and I can see that it is turned on. I know it is working because I can open a new tab in the same browser where Cypress is running and it is working fine and making changes to the UI.
The problem is, the main tab that is running the Cypress Test Runner is inside of an iFrame and I suspect that the chrome extension I have loaded cannot interact with it. I believe this issue reflects my problem. However, I tried that solution but with no luck.
There is a blog that I stumbled upon that talks about a solution for fixing this for the React Dev Tools Extension. The following screenshot explains:
However, the extension that I am using does not have some kind of Global Hook like __REACT_DEVTOOLS_GLOBAL_HOOK__ that I can take advantage of as far as I can tell.
I have no idea what to try next, if anyone can provide some guidance I would appreciate it.
I ended up using Puppeteer for testing this particular extension. Puppeteer does not run within an iFrame allowing the extension to be testable, also you can integrate it into Cypress. Its an annoying workaround but I'm not seeing a better way to do it.

Testing Angularjs locators

Kind of getting desperate here.
I have a legacy testsuite using AngularJS (5.4.1) driven by Node 8.12.0.
I want to debug some tests but it seems impossible.
Control flow is enabled in the tests, so I followed the docs on the protractor website. Sadly, it does not work.
browser.pause() just get skipped and using browser.debugger() is deprecated from Node 8.
I decided to disable the control flow but I ran into another problem.
We go to a login page before accessing the application, and the angular debugger does not like that. When accessing the non-angular page, the debugger just quits, stating that angular is not defined.
I then turned to Google to see if there are any Chrome extensions that enable me to use the dev tools to test the locators, but to no avail.
Would be great if I can get the debugger working.
Thanks in advance.
Regards
Here is a setup for IntelliJ
(working directory is example)

QWebEngineView and Ember.js ES6

Before I begin, I know almost nothing about JavaScript. I'm just a lowly C++ developer being tasked to do something that should be easy.
In essence, I need to configure a QWebEngineView to show a webpage that is being developed for us by an outside UI vendor. Whenever I load the page in my QWebEngineView, I get a ton of errors in the JavaScript Console (http://imgur.com/vAapTZW). However, if I go to the page directly through Chrome, everything looks exactly like it should (http://imgur.com/M58umll).
I have checked that other webpages can load correctly within my view, but, for whatever reason, not the page that is being developed for us. I have also scoured the Qt documentation for references to any JavaScripts limitations and have also found none.
For reference, they are using Ember.js with JavaScript version ES6 and I am using the latest version 5.5.1 of the Qt framework, but have also tried 5.3.2. I have also tried using the now deprecated QtWebKit instead of QtWebEngine hoping it was simply a design oversight in the new widget.
Any help either solving this issue or coming up with a strategy to figure out how to debug this would be amazing!
Thanks!

Meteorjs + Angular 2

I am attempting the Meteor/Angular2 tutorial here
If I make a change to a component the changes are not updated in the browser (Google Chrome); even if I do the following things...
Save changes and hard refresh browser.
Stop server and restart.
I have to clear the browser cache to get rid of the old data and load the new.
I'm pretty sure this should not be the case, as it creates a major problem for a developer.
This tutorial is using Angular2, Meteorjs, as well as a typescript compiler.
This is not an Angular issue.
My question is... Is the problem with meteorjs not triggering a hard refresh? Or could it perhaps be an issue with the typescript compiler?
Also, how could I fix this?
I'm running
Typescript Compiler: netanelgilad:angular2-typescript
Meteorjs: 1.2.2
Google Chrome: Version 47.0.2525.0 canary (64-bit)
UPDATE:
I tried a normal .js file and everything works as expected. This means its the Typescript Compiler: netanelgilad:angular2-typescript.
I'll check out the package and see what I can find.
If You are using
http-server
then this may be the issue of http-server as it always store the data in cache.
In my case i was using http-server and this problem occured.
You can fix it by selecting the disable cache option in developer tools(chrome).

all cordova plugins give undefined error

I am working on a cordova android app. I am trying to implement push notifications. I tried so many ways using ngcordova, using normal plugin and some other methods all tries give me pushNotification undefined error. But the plugins are being installed without any error.
Then I followed this tutorial and did exactly the same, but it gives
device is not defined
error in the console. I used ripple emulator to test this. I installed it in the phone too, But the same error. I am using angularjs inside. and using cordova version 5.2.0. can anyone point me in a direction, I am really trying hard for the past 4 days but no luck. Please help me.
update
I have correct setup of angular and cordova I believe, because I already built an version of my app with the same setup and pc, and released it in play store. This problems arise only if I add some plugins like push, device, etc. In app browser and splash screen plugins are working fine though.
Make sure to include cordova.js, but it need to be load after angular.js.
If you want, here's a working seed:
https://github.com/marioaleogolsat/cordova-angular-angularMaterial-seed
Just remember that some plugins can't be used in a emulation, so use cordova run --device to make sure that anything is working properly.
Hi It seems you have not done set up of Angular JS and Cordova properly.
Before doing push notifications. You must be ready with Angular JS and Cordova setup.
See below link:
Angular JS and Cordova setup
Follow above link and if it's done try to set up again push notifications.
Hope it helps you.
If Cordova is undefined you probably don't have it referenced in your index page. make sure you have this line.
<!-- Cordova reference, this is added to your app when it's built. -->
<script src="cordova.js"></script>

Categories