Skip to content
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

Merged

Conversation

sanketpathak
Copy link
Contributor

@sanketpathak sanketpathak commented Jul 27, 2021

Epic: https://issues.redhat.com/browse/ODC-5227
Story: https://issues.redhat.com/browse/ODC-5970

Acceptance criteria:

  • Users have the ability to set their user preferences

Checks required for approving Epic gherkin scripts PR:

  • Add @epic-number to the scenarios or feature file [e.g: @odc-xxx]
  • Add @to-do for automation possible scenarios
  • Add @regression or @smoke based on the importance of the scenario
  • Update the test scenarios count in Automation status confluence Report
  • Check for the linter issues by executing yarn run gherkin-lint on frontend folder [Skip epic number tags related linter issues]

@sanketpathak sanketpathak changed the title Gherkin:Manage user preferences ODC 5970 Gherkin:Manage user preferences Jul 27, 2021
@openshift-ci openshift-ci bot added the component/dev-console Related to dev-console label Jul 27, 2021
@sanketpathak sanketpathak force-pushed the manage-user-preferences-odc-5970 branch from 76f19d9 to 7188402 Compare July 27, 2021 10:37
Comment on lines 12 to 15
@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
Copy link
Contributor

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

Comment on lines 6 to 9
Background:
Given user is at developer perspective
And user has created or selected namespace "aut-user-preferences"
And user is at Add page
Copy link
Contributor

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?

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When user clicks on user dropdown
When user clicks "kubeadmin" dropdown on masthead

Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
And user clicks on Add from navigation menu
And user clicks on Add present in navigation menu

Copy link
Contributor

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

Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Copy link
Contributor

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

Copy link
Member

@jerolimov jerolimov Aug 2, 2021

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')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment on lines 6 to 9
Background:
Given user is at developer perspective
And user has created or selected namespace "aut-user-preferences"
And user is at Add page
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Member

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:

Suggested change
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.

Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Copy link
Contributor Author

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

@sanketpathak sanketpathak force-pushed the manage-user-preferences-odc-5970 branch from 7188402 to 8c05f22 Compare July 29, 2021 08:30
Comment on lines 13 to 14
When user clicks on user dropdown on masthead
And user clicks User Preference option
Copy link
Member

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:

Suggested change
When user clicks on user dropdown on masthead
And user clicks User Preference option
When user clicks on user dropdown and selects "User Preference"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Comment on lines 15 to 16
And user clicks on Perspective dropdown on User Preferences page
And user selects "Developer" option
Copy link
Member

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:

Suggested change
And user clicks on Perspective dropdown on User Preferences page
And user selects "Developer" option
And user changes user preference "Perspective" dropdown to "Developer"

Copy link
Contributor Author

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
Copy link
Member

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:

Suggested change
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"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Given user has created project "test-preference1"
Given user has created project "test-preference2"

Copy link
Contributor Author

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

@jerolimov
Copy link
Member

@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 window.location.href = '/'. /cc @nemesis09

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
Copy link
Member

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.

Suggested change
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.

Copy link
Contributor Author

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here as well:

Suggested change
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?

Copy link
Contributor Author

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.

@sanketpathak sanketpathak force-pushed the manage-user-preferences-odc-5970 branch 2 times, most recently from c4604be to d256574 Compare August 4, 2021 09:09
@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
Copy link
Member

@jerolimov jerolimov Aug 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

Suggested change
When usewr selects "All projets" from the project menu
When user selects "All projets" from the project menu

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Member

@jerolimov jerolimov left a 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
Copy link
Member

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.

Suggested change
Then user can see "test-preference1" option selected in project namespace
Then user can see that project "test-preference1" is selected

Copy link
Contributor Author

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
Copy link
Member

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.

Suggested change
And user can see "test-preference2" option selected in project namespace
And user can see that project "test-preference2" is selected

Copy link
Contributor Author

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
Copy link
Member

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.

Suggested change
And user can see "test-preference2" option selected in project namespace
And user can see that project "test-preference2" is selected

Copy link
Contributor Author

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
Copy link
Member

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.

Suggested change
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"

Copy link
Contributor Author

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
Copy link
Member

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.

Suggested change
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"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@sanketpathak sanketpathak force-pushed the manage-user-preferences-odc-5970 branch from d256574 to ed93991 Compare August 5, 2021 14:07
@sanketpathak sanketpathak force-pushed the manage-user-preferences-odc-5970 branch from ed93991 to 0b83ef0 Compare August 5, 2021 14:12
@jerolimov
Copy link
Member

jerolimov commented Aug 5, 2021

Thanks @sanketpathak for being open for also this small suggestions. 👍

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 5, 2021
@jerolimov
Copy link
Member

Unapprove it just to get @makambalaji approval! For me this is fine. :)

/approve cancel

@openshift-ci openshift-ci bot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2021
@jerolimov
Copy link
Member

/assign @makambalaji

@makambalaji
Copy link
Contributor

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 5, 2021

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 5, 2021
@jerolimov
Copy link
Member

PR addresses integration test configuration only and all tests are @todo

/label px-approved
/label docs-approved
/label qe-approved

@openshift-ci openshift-ci bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR qe-approved Signifies that QE has signed off on this PR labels Aug 6, 2021
@openshift-ci openshift-ci bot merged commit a557378 into openshift:master Aug 6, 2021
@spadgett spadgett added this to the v4.9 milestone Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. component/dev-console Related to dev-console docs-approved Signifies that Docs has signed off on this PR lgtm Indicates that a PR is ready to be merged. px-approved Signifies that Product Support has signed off on this PR qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants