Here is my test scenario:
The user opens a page in my application, fills in some details in a form, and then clicks the button in the form.
A third-party library triggers a redirect to an external website to validate some information. After the validation is complete (this validation takes place in a single page), the script on the external site redirects the user back to my application with a custom URL.
I know that what I described above is similar to an oauth flow, but for something different.
So I know that it is not possible to test external websites with Cypress. As a workaround, I am thinking of intercepting the redirect that is triggered by the button click and manually processing the external site with cy.request. But I am getting nowhere with intercepting the redirect after the button click event. How can I use cy.intercept to get the URL that is requested after the button is clicked?
The second question is that the page I will be working on with 'cy.request' redirects to my app with a custom URL. So I need to intercept this redirect as well to continue testing with the relevant page in my app.
When I open the website I need to fill in the form. I already disabled some field from editing, so the user is not able to change the information on the form. However, the user can still right-click and update through the inspect element and when the user clicks submit, the data will be submitted and updated. So now what I want to do is, even after the user edit through the inspect element, but when the user clicks on submit, the data won't pass through and there will be no changes. In order to do this, what do I change in the coding? These are the attachments of the merchant request form and the merchant controller.
MerchantRequest
MerchantController
I am using spring boot and I have forms throughout the application.
Let's say application user is filling out the form after completed the form user take a break for a while then session timed out. User returns the form again and pressed submit button. Application redirected user to login page and user logged in again, problem occurred in here.
How should I handle this situation?
How should application behave in here :
1- Should the application show filled out the form ?
2- Should the application submit the form values then show success/error message.
I have a simple rating system that logged in users can just click and it updates asynchronously.
However, I still want non-logged in users to see the rating mechanism (let's say a simple "up" arrow) but trigger the Facebook authentication popup when they click the link.
Can you help? I have the regular fb:login button working just fine. But how can I trigger this action on a regular anchor tag (in addition to the fb:login button).
You need to call the FB.login method
https://developers.facebook.com/docs/reference/javascript/FB.login/
You can bind this to the button click for non logged in users, on the callback you can register the original rating action or refresh the page.
i have a problem with a WP7 app. I want that a user can login into the application, doing some stuff and logout.
Now, then a new user get the phone, it should not be possible to get into the session of the old user (by simply pressing back until the user see the intern data of the previous user who was logged in).
how to make this?
The best thing would be, that when a user press the back button, it will be forwared to the first page of the app. the problem then is, that there will be a loop and the app will not pass the certification because it will not be possible to exit it.
Here is an overview:
loginPage (no return just exiting the app) -> internPage (possibility to logout and return to loginPage)
You can clear the back stack using NavigationService.RemoveBackEntry:
while (this.NavigationService.BackStack.Any())
{
this.NavigationService.RemoveBackEntry();
}
Put this in the OnNavigatedTo of your LoginPage, so pressing back on this page will exit the application. If the LoginPage is the first page the user sees when launching the app (and therefore is the application main page), it should pass certification.
try the nonlinearnavigationservice that way back will unwind your history properly an you back out of the mainpage it will exit your app correctly.
http://create.msdn.com/en-US/education/catalog/article/nln-serv-wp7
why not have the mainpage show the icons for the different users, and a click onto the user would ask for their password?
You cannot change the navigation flow of your application so that the back-button takes you to the first page. This will result in you failing the marketplace certification.
What you could do is handle the application lifecycle events, when the user leaves your application, then navigates back to it via the back-button you application is re-started either from a dormant or tombstoned state.
You can read about the lifecycle here:
http://www.scottlogic.co.uk/blog/colin/2011/10/a-windows-phone-7-1-mango-mvvm-tombstoning-example/
You need to add logic into the Activated event. At this point you could display a logic Popup that ensures the user has to re-enter their credentials to continue using the application.
The best way is to create separate view like UserControl and then show it as Popup when you need user to log in.
This is the way recommended by Microsoft also, and zou won't be having this navigation problems.
Something like this:
enter link description here