RpcError from application code while cypress testing - vue.js

I have a vuejs application which uses grpc-web and proto.
I am integrating cypress in my application for automation testing.
I am having an issue when running the cypress test the API call returning error, but when I am running the application directly in browser its working fine for the same API call.
I have checked all the request parameter and url all same.
I am not sure where I am doing wrong.

Related

How to detach Cypress test runner from a page?

I'm trying to use Cypress with a site that redirects users to a third-party site for authentication. Once a user logs in, they're automatically redirected back to the site we control. From what I've read, Cypress doesn't support this particular set up.
Authentication at the third-party site can happen through a popup as well. And I can make Cypress open that popup.
Is there a way I can detach the Cypress test runner from the log-in popup so that it's no longer under control by Cypress? If so, how is this done? I would like to do this so that I can automate the log-in with something else (namely, Puppeteer) and then run the actual tests in the base page in the Cypress iframe.
Since you can assume the AUT is accepting a request from the 3rd party at some point in time, there should be a solution where you fire that api request with cy.request in the same manner as the UI.
You'll likely have to store environment variables, or some other auth security for the key, but if you do that, the login flow can be replicated by Cypress without having to use their 3rd party code; which you won't be able to access with Cypress if it's an iframe or other common 3rd party auth UI setup.

Automation UI tests in a SPA application not waiting for page to load

We are using and single page application (SPA, which renders client-side) using Vue.js and we have UI automation tests using Selenium. I don't think the fact we are using Vue.js and Selenium is the issue, I think this is a general issue when UI testing with a SPA application.
The problem
The tests are running before the DOM has loaded...
In a SPA, when navigating, the browser does not reload, so the issue lies when the tests think they can run straight away.
In a server-side rendered application (like MVC), the browser reloads when navigating to a different page, only when the browser decides the page has loaded will the tests run.
This is not the case in SPA, the browser in a SPA doesn't (as far as I'm aware) have a way of telling the tests when the page is ready to test.
Can anyone help? I am looking for a solution or an event for the browser to let the tests know when they are ready to run.
Tried solutions
We have hard-coded a timeout for the tests to wait (which works sometimes), but it doesn't guarantee every pipeline build will pass since it's not guaranteed the same load speed each time and doesn't guarentee the page will load before the timeout has expired.

How to test external browser pages on electron application using testcafe

I'm currently doing E2E testing using testcafe on an electron-vue application. In my authentification phase, I connect to another external application :enter username and password to authenticate. The problem is that I cannot apply test case on the external browser nor recuperate inputs from the external browser. Any suggestions( The external page is triggered via a Vue component button using open method)
At the moment, TestCafe can run a test in a single browser window only. Take a look at the Mocking HTTP Requests functionality. By using it, you can mock requests to and responses from the external application to avoid an external browser window opening.

File not found exception using Yodlee API on android

I am trying yodlee api on android but getting file not found exception when I called HTTP GET request on : Request URL=https://developer.api.yodlee.com/ysl/restserver/v1/providers?name=icici.
When I used java sample api as standalone java application it's work fine but in android it is giving exception. cobrand as well member login works fine on android.
You should first check the code, as this is not something which Yodlee API returns. Seems to be an issue with your android code. Do you mind updating the question with your code and actual exception you are getting?

Ionic 2 how to make InAppBrowser and other plugins work when running in a browser

I'm creating a app in Ionic 2, wich consumes a web api from an existing site. To use this API i have to make athenticate in it in the following way (Similar to facebook login):
I call the api login page in a InAppBrowser component, sending the proper keys and a return URL.
the user types the login and password in the form displayed, the API will validate it and authenticate it.
The API calls the return URL passing the authorization token.
I 'hijack' this redirect to the return url in the InAppBrowser 'loadstart' event, and extract and store the authorization token.
In the following calls to the API, i send the authorization token in the header.
This is all working fine in the emulator, but it doesn't work in the browser (with ionic serve), because when i call InAppBrowser it actually calls window.open, and the events doesnt work. I can't detect the redirect action made in the opened window.
I'd like to make this work in the browser since its better to debug the application there. My first thought was to send "http://localhost:8001" as the return url, but I couldn't find a way to catch the token parameter in the ionic application.
Does anyone know how I can catch this parameter or any other way to make this login work in the browser? It is for development and debug purposes only, so strict security is not a issue (I can comment out any unsecure code in the production version).
Edit: Hayden Braxton answer didn't solve my problem, but since it was because of something exclusively to my app, and it could really help someone who wants to make plugins work, I'll keep it as the selected answer.
Besides that, I'll share the solution I found to my problem in case it could help anyone. It was simple, actually:
I pass "http://localhost:8001" as the api return_uri parameter
the api will, after checking the login and password, redirect to http://localhost:8001?token=MY_AUTH_TOKEN.
This will reload the application and call login page again.
In the login page i call this.platform.getQueryParam("token"); to get the token.
Add
"browser": "ionic-app-scripts serve --iscordovaserve --sourceMap source-map --wwwDir platforms/browser/www/ --buildDir platforms/browser/www/build",
to the script section of your package.json. Then instead of doing ionic serve, instead run
npm run browser
We use ionic2 to develop our apps where I work, and this is what we figured out after some research.
Before using this, you need to have the browser platform added. You can accomplish this with the following:
ionic add platform browser
If the browser platform is already added, delete the browser directory from your platforms directory and then run the add platform command, just to be on the safe side.