New issue
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
Gherkin:Manage user preferences #9636
Gherkin:Manage user preferences #9636
Conversation
76f19d9
to
7188402
Compare
@smoke @to-do | ||
Scenario: Access user preference from the masthead: UP-01-TC01 | ||
When user clicks on user dropdown | ||
Then user will see User Preference |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove this scenario. In below scenario,
'And user clicks User Preference option' - covers this scenario
Background: | ||
Given user is at developer perspective | ||
And user has created or selected namespace "aut-user-preferences" | ||
And user is at Add page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, we can remove this steps, because user settings are available on MastHead. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. The user preferences page can be accessed from both admin and dev console, without creating a namespace
|
||
@regression @to-do | ||
Scenario: Setting Developer preference for perspective: UP-01-TC02 | ||
When user clicks on user dropdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When user clicks on user dropdown | |
When user clicks "kubeadmin" dropdown on masthead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user can be a non admin user as well, so "kubeadmin" would not be an accurate description IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will apply for non-admin users as well
And user clicks on Project dropdown on User Preferences page | ||
And user searches project "test-preference1" | ||
And user selects the project "test-preference1" from the dropdown | ||
And user clicks on Add from navigation menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And user clicks on Add from navigation menu | |
And user clicks on Add present in navigation menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking on Add
from navigation menu will not reflect any change since the link associated with this menu option uses the active namespace.
To notice a change after setting the preference for a Project, the user would have to load the console without any url params for namespace.
cc @jerolimov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is true that the user needs to reload the console to get the selected perspective. But I think the selected project should be also visible if the user switches from the admin perspective to the developer perspective, or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
And user clicks on Project dropdown on User Preferences page | ||
And user types project "test-preference2" in search bar | ||
And user clicks on the Create project option from the dropdown | ||
And user clicks on Add from navigation menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my understanding of the epic, This should be true if the active project when the user was initially on the Add page, was ALL_PROJECTS
.
but generally, setting a preference for namespace means, this preference will be honored when the console loads without any url params. in other cases, if an active project is detected, it will have preference over the preferred project.
cc @jerolimov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outdated. But yep, when the user switches to the add page she or he should see the right namespace. But the console saves the latest namespace internally, so maybe a page reload is required. (window.location.href = '/add'
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Background: | ||
Given user is at developer perspective | ||
And user has created or selected namespace "aut-user-preferences" | ||
And user is at Add page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. The user preferences page can be accessed from both admin and dev console, without creating a namespace
|
||
@regression @to-do | ||
Scenario: Setting Developer preference for perspective: UP-01-TC02 | ||
When user clicks on user dropdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user can be a non admin user as well, so "kubeadmin" would not be an accurate description IMO.
And user clicks User Preference option | ||
And user clicks on Perspective dropdown on User Preferences page | ||
And user selects "Developer" option | ||
Then user can see "Developer" option selected in the perspective switcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to see a change after selecting "Developer" option in the dropdown, the user needs to load console, usually by clicking the Brand/Logo
We should add that step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should given condition have user in the admin view and will the change occur then as well i.e. clicking on Brand/Logo
will take user to developer perspective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed this with Christian and at the moment we don't want change the user perspective when the logo is pressed.
What the user should do to go to the selected perspective is to reload the current page. I would describe it like this:
Then user can see "Developer" option selected in the perspective switcher | |
And user reloads the console without perspective. | |
Then user sees the "Developer" perspective |
I changed the second sentence as well. It is not important if the perspective switches contains the option Developer (this should be always the case). I expect that you want say that the dropdown current option is Developer. You can check this this way. But for the user it is important that she or he is on the developer perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
And user clicks on Project dropdown on User Preferences page | ||
And user searches project "test-preference1" | ||
And user selects the project "test-preference1" from the dropdown | ||
And user clicks on Add from navigation menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clicking on Add
from navigation menu will not reflect any change since the link associated with this menu option uses the active namespace.
To notice a change after setting the preference for a Project, the user would have to load the console without any url params for namespace.
cc @jerolimov
And user clicks on Project dropdown on User Preferences page | ||
And user types project "test-preference2" in search bar | ||
And user clicks on the Create project option from the dropdown | ||
And user clicks on Add from navigation menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per my understanding of the epic, This should be true if the active project when the user was initially on the Add page, was ALL_PROJECTS
.
but generally, setting a preference for namespace means, this preference will be honored when the console loads without any url params. in other cases, if an active project is detected, it will have preference over the preferred project.
cc @jerolimov
And user clicks on Helm charts | ||
And user selects "Nodejs v0.0.1" helm chart | ||
And user clicks on Install Helm Chart button | ||
Then user can see Form view option selected in Install Helm Chart page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true as per the current understanding of the UX. However it may change later when the PR for the related story goes into review. We should go ahead with this now, since this is true as per the UXD and acceptance criteria.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of change you can update the gherkin as well with your pr
7188402
to
8c05f22
Compare
When user clicks on user dropdown on masthead | ||
And user clicks User Preference option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend to have one action here so that you can select the item within this dropdown. I believe this makes it easier to implement the action later, and imho it describes more what the user is doing:
When user clicks on user dropdown on masthead | |
And user clicks User Preference option | |
When user clicks on user dropdown and selects "User Preference" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
And user clicks on Perspective dropdown on User Preferences page | ||
And user selects "Developer" option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, I believe its easier to implement this gherkin sentences later if the dropdown and selected value/option are in one action:
And user clicks on Perspective dropdown on User Preferences page | |
And user selects "Developer" option | |
And user changes user preference "Perspective" dropdown to "Developer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
And user clicks User Preference option | ||
And user clicks on Perspective dropdown on User Preferences page | ||
And user selects "Developer" option | ||
Then user can see "Developer" option selected in the perspective switcher |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I discussed this with Christian and at the moment we don't want change the user perspective when the logo is pressed.
What the user should do to go to the selected perspective is to reload the current page. I would describe it like this:
Then user can see "Developer" option selected in the perspective switcher | |
And user reloads the console without perspective. | |
Then user sees the "Developer" perspective |
I changed the second sentence as well. It is not important if the perspective switches contains the option Developer (this should be always the case). I expect that you want say that the dropdown current option is Developer. You can check this this way. But for the user it is important that she or he is on the developer perspective.
|
||
@regression @to-do | ||
Scenario: Creating project with project preference: UP-01-TC03 | ||
Given user has created project "test-preference1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given user has created project "test-preference1" | |
Given user has created project "test-preference2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is not required, I'll remove it
@sanketpathak I added some comments to reduce the number of gherkin variants. Please check also the user cases which contains similar sentences. When checking the perspective we should redirect the user to the root page with something like |
And user searches project "test-preference1" | ||
And user selects the project "test-preference1" from the dropdown | ||
And user clicks on Add present in navigation menu | ||
Then user can see "test-preference1" option selected in project namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I miss here the additional test that, if the user opens the console that the selected project is preselected.
Then user can see "test-preference1" option selected in project namespace | |
Then user can see "test-preference1" option selected in project namespace | |
And user switches to the add page the project "test-preference1" is preselected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
And user types project "test-preference2" in search bar | ||
And user clicks on the Create project option from the dropdown | ||
And user clicks on Add present in navigation menu | ||
Then user can see "test-preference2" option selected in project namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well:
Then user can see "test-preference2" option selected in project namespace | |
Then user can see "test-preference2" option selected in project namespace | |
And user switches to the add page the project "test-preference2" is preselected. |
Btw, what is the difference between UP-01-TC02 and UP-01-TC03?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UP-01-TC02 scenario is that the user has already created a namespace and through user preferences, that particular namespace gets selected, on the other hand, the UP-01-TC03 scenario says that the namespace is created by the user on the user preferences page and that namespace gets selected by it.
c4604be
to
d256574
Compare
@regression @to-do | ||
Scenario: Setting a preference for a project: UP-01-TC02 | ||
Given user has created project "test-preference1" | ||
When usewr selects "All projets" from the project menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo
When usewr selects "All projets" from the project menu | |
When user selects "All projets" from the project menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small feedback
And user clicks on Project dropdown on User Preferences page | ||
And user searches and selects project "test-preference1" from the dropdown | ||
And user reloads the console | ||
Then user can see "test-preference1" option selected in project namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect you mean "...in project dropdown" instead of "...in project namespace". But you can make it more clear with a sentence like this. Its up to you, but at least change to project dropdown or something similar.
Then user can see "test-preference1" option selected in project namespace | |
Then user can see that project "test-preference1" is selected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
And user clicks on Project dropdown on User Preferences page | ||
And user types project "test-preference2" in search bar | ||
And user clicks on the Create project option from the dropdown | ||
And user can see "test-preference2" option selected in project namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect you mean "...in project dropdown" instead of "...in project namespace". But you can make it more clear with a sentence like this. Its up to you, but at least change to project dropdown or something similar.
And user can see "test-preference2" option selected in project namespace | |
And user can see that project "test-preference2" is selected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This(user can see) can not be part of the when statement so removed it
And user clicks on the Create project option from the dropdown | ||
And user can see "test-preference2" option selected in project namespace | ||
And user reloads the console | ||
And user can see "test-preference2" option selected in project namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I expect you mean "...in project dropdown" instead of "...in project namespace". But you can make it more clear with a sentence like this. Its up to you, but at least change to project dropdown or something similar.
And user can see "test-preference2" option selected in project namespace | |
And user can see that project "test-preference2" is selected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated on similar lines
Scenario: Setting Form preference for Create/Edit resource method: UP-01-TC06 | ||
Given user has created or selected namespace "aut-user-preferences" | ||
When user clicks on user dropdown on masthead and selects "User Preference" | ||
And user selects "Form" option on Create/Edit resource method dropdown on User Preferences page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be the same action as above.
And user selects "Form" option on Create/Edit resource method dropdown on User Preferences page | |
And user changes user preference "Create/Edit resource method" dropdown to "Form" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
Scenario: Setting YAML preference for Create/Edit resource method: UP-01-TC07 | ||
Given user has created or selected namespace "aut-user-preferences" | ||
When user clicks on user dropdown on masthead and selects "User Preference" | ||
And user selects "YAML" option on Create/Edit resource method dropdown on User Preferences page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be the same action as above.
And user selects "YAML" option on Create/Edit resource method dropdown on User Preferences page | |
And user changes user preference "Create/Edit resource method" dropdown to "YAML" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
d256574
to
ed93991
Compare
ed93991
to
0b83ef0
Compare
Thanks @sanketpathak for being open for also this small suggestions. 👍 /lgtm |
Unapprove it just to get @makambalaji approval! For me this is fine. :) /approve cancel |
/assign @makambalaji |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: makambalaji, sanketpathak The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
PR addresses integration test configuration only and all tests are @todo /label px-approved |
Epic: https://issues.redhat.com/browse/ODC-5227
Story: https://issues.redhat.com/browse/ODC-5970
Acceptance criteria:
Checks required for approving Epic gherkin scripts PR:
yarn run gherkin-lint
on frontend folder [Skip epic number tags related linter issues]