when accessing the login again, the user has the same option selected (kotlin) - kotlin

I have an app that I would like that when performing the login and the user selects a radio button in the option he wants, this information is already selected when he accesses the account again with the same login, only if it is the same login, if it is another perform the normal process of selecting an option.

Related

How to make Background keyword as a runner scenario in cucumber?

I am trying to test Amazon website with 3 scenarios on selenium with cucumber. For writing gherkin structure. I concat my login functionality with other scenarios with the Background keyword. But this time the problem is that my scenario number is decreased from 3 to 2. Basically, I want to also test the login functionality and make the terminal close and go to the other test scenarios. Instead, the code behaves login and searching product functionality as one scenario and closes its terminal.
The below gherkin language is my Amazon.feature;
Feature: To be able to shop through the website in e-commerce platform, Amazon.
Background:
Given User is on homepage
When Click accept cookies
When User click login button
When User click EmailBlank
And Enter e-mail address
And User press continue button
When User click PasswordBlank
And Enter password
And Click SignIn button
Scenario: Finding the product from the website
When Click the search button
When Write product name
When Click search button
When Filter for Shipped by Amazon
When Filter for Apple
Scenario: Adding and deleting product to cart
#the upper scenario
When Click the search button
When Write product name
When Click search button
When Filter for Shipped by Amazon
When Filter for Apple
#the upper scenario
When Click the first product
When Add to Cart
And Close the Cart
And Click the Cart
When Check at cart page
When Delete the product
I tried to put the Scenario below the Background but this time 2nd scenario is run without logging into the website. I also put Scenario before the Background and get the syntax error.
You can write an Scenario with 1 step that not exist in Background:
Scenario: Login with valid credentials
Then check some extra data here belongs to login function thaat is not included it background
Instead of writing
Given User is on homepage
When Click accept cookies
When User click login button
When User click EmailBlank
And Enter e-mail address
And User press continue button
When User click PasswordBlank
And Enter password
And Click SignIn button
write
Given I am signed in
and push HOW you sign in down into the step definitions. Once you have done that go further and push HOW you sign in down into helper methods called from your step definitions.

Forgot password in Firebase Authentication (better UI/UX)

I am developing a mobile app which uses Firebase Authentication. When the user forgets his/her password, I am following these steps:
1- User is asked to enter his/her email.
2- User is forwarded to the attached screen (see image).
3- User receives an email with a link.
4- User clicks on the link in the email inside his device.
5- User is taking to another screen (in the mobile) to enter new password.
The problem I am faced with is that what if the user performs step # 4 but on his desktop.
Meaning that the user goes to his desktop and clicks on the link inside the email. In this case, the rest of the steps will resume from the desktop and the mobile app does not know if the user has changed his password. So the mobile app will remain at the attached screen. What should I do to move the user to the sign in screen.
Obviously, I can add a third button which I can call "Continue" or "Resume" which when clicked will take the user to sign in. But that has couple problems:
1- I will need to add a third button to the screen which is not super clean.
2- When the user clicks on the "Continue" or "Resume" button, there is no guarantee that the user has changed his/her password in the first place. So there is no point of clicking the button in the first place.
One other solution would be to not allow the user to change password from the desktop by providing instructions to the user to go back to the mobile device and click on the link in the email over there.
Can some one suggest a nice way to handle this situation.

How to disable change password option for other users?

I want to prevent the user from changing other users' passwords, so he can only change his own password
You need to do it in following way:
Create a security group. With this group of users, allow them to change passwords.
There are two ways to change passwords. One from the "Change Password" button in user form view and from the Action > Change Password. Both options are available from the Users form/tree view.
Inherit user form view and wizard action, provide groups which we have created in the first step.
Upgrade your module. Login with and without a special security group and you will notice that Change Password is only visible for special users who have security groups turned on.

Dynamic action to update database record AND redirect to a different page

I'm building a system of modal dialogs to allow users to edit database records.
The user clicks the "Edit" button on a specific row in a report somewhere
A modal dialog pops up, with fields that the user can edit and manipulate
The dialog has four standard buttons the user can select: Cancel, Delete, Save, and Create
Let's start with the Save button.
By default for modal dialogs, the Save button has the following behavior:
I presume this 1) submits the information from the items in the modal dialog (which refreshes the browser, closing the modal dialog), and then 2) performs the SQL UPDATE action with the submitted information, in time for the refreshed page to include the updated information?
This is fine, but I need to:
Avoid refreshing the browser (e.g. submit individual items, rather than the whole page), and
Manually redirect to another modal dialog (a different page) AFTER the SQL UPDATE action is completed
I presume this can be accomplished with dynamic actions, but I don't know how.
How can I ensure the database action is completed, before the dynamic action which navigates to a new page?
Manually redirect to another modal dialog (a different page) AFTER the SQL UPDATE action is completed
I'm thinking of creating a branch with Server-side condition set to "When button pressed" (for every button), or perhaps "Request is contained in value" where request name (by default) equals button name.
So: button would first do its processing part, and then branch to another page, without involving dynamic actions.

Is there a way to detect when the Facebook permissions dialog is shown?

I'm using the FB Javascript SDK, and handling login via a custom button that calls FB.login. Ideally, I'd like to be able to record some tracking data whenever a user is shown the app approval/permissions dialog so that I can see how many users bomb out at this stage. Unfortunately, I can't seem to find a reliable way of achieving this.
If the user is already logged in to FB, I can infer whether it will be shown by checking the login status before calling FB.login. If the user is not_authorized, then I know the permissions dialog will be shown. But if the user is not logged in, my information is more limited. I can assume that the user was shown the dialog if they finish the process as not_authorized, but if they end up being connected then I have no way of distinguishing between a user who was already connected and one who just gave approval.
I'd hoped that the auth.prompt event might help, but it doesn't seem to be fired for the sequence starting from FB.login. Any suggestions?
Ideally, I'd like to be able to record some tracking data whenever a user is shown the app approval/permissions dialog so that I can see how many users bomb out at this stage.
Look at your app insights, there you’ll see Auth Dialog Conversions.
No need for own tracking for that.