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

[DDW-536] Service agreement can be skipped by accessing to Settings #2304

Conversation

topseniors
Copy link
Contributor

@topseniors topseniors commented Jan 18, 2021

This PR disabled certain menu items when accepting terms of use.
Jira Ticket

Todos

  • Disable Settings, Wallet Settings, About Daedalus, and Daedalus Diagnostics menu items when accepting terms of use

Testing Checklist

App

  • Start daedalus and make sure the menu items mentioned above are disabled when accepting terms of use

Test Cases

Scenario 1 - Validate "Wallet settings" is disabled on the "Initial Settings" screen

Given Daedalus is executed for the first time after installation
And I am on the "Initial Settings" screen
When I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Wallet settings" option is disabled
And I can't access by the keyboard shortcut

Scenario 2 - Validate "Settings" is disabled is disabled on "Initial Settings" screen

Given Daedalus is executed for the first time after installation
And I am on the "Initial Settings" screen
When I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Settings" option is disabled
And I can't access by the keyboard shortcut

Scenario 3 - Validate "About" is disabled is disabled on "Initial Settings" screen

Given Daedalus is executed for the first time after installation
And I am on the "Initial Settings" screen
When I click on "Daedalus"
Then I can see the "About" option is disabled

Scenario 4 - Validate "Daedalus Diagnostics" is disabled is disabled on "Initial Settings" screen

Given Daedalus is executed for the first time after installation
And I am on the "Initial Settings" screen
When I click on "Help"
Then I can see the "Daedalus Diagnostics" option is disabled
And I can't access by the keyboard shortcut

Scenario 5 - Validate "Wallet settings" is disabled on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Wallet settings" option is disabled
And I can't access by the keyboard shortcut

Scenario 6 - Validate "Settings" is disabled is disabled on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Settings" option is disabled
And I can't access by the keyboard shortcut

Scenario 7 - Validate "About" is disabled is disabled on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I click on "Daedalus"
Then I can see the "About" option is disabled

Scenario 8 - Validate "Daedalus diagnostics" is disabled is disabled on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I click on "Help"
Then I can see the "Daedalus Diagnostics" option is disabled
And I can't access by the keyboard shortcut

Scenario 9 - Validate "Wallet settings" is enabled after agreeing on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I have accepted the terms on "Service agreement" screen
When I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Wallet settings" option is enabled
And I can access by the keyboard shortcut

Scenario 10 - Validate "Settings" is enabled after agreeing on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I have accepted the terms on "Service agreement" screen
When I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Settings" option is enabled
And I can access by the keyboard shortcut

Scenario 11 - Validate "About" is enabled after agreeing on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I have accepted the terms on "Service agreement" screen
When I click on "Daedalus"
Then I can see the "About" option is enabled

Scenario 12 - Validate "Daedalus Diagnostics" is enabled after agreeing on "Service Agreement" screen

Given Daedalus is executed for the first time after installation
And I have accepted the terms on "Service agreement" screen
When I click on "Help"
Then I can see the "Daedalus Diagnostics" option is enabled
And I can access by the keyboard shortcut

Scenario 13 - Validate "Wallet Settings" is disabled after submitting initial settings and restarting Daedalus

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I restart Daedalus
And I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Wallet Settings" option is disabled
And I can't access by the keyboard shortcut

Scenario 14 - Validate "Settings" is disabled after submitting initial settings and restarting Daedalus

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I restart Daedalus
And I click on "View" (Or "Daedalus" on macOS)
Then I can see the "Settings" option is disabled
And I can't access by the keyboard shortcut

Scenario 15 - Validate "About" is disabled after submitting initial settings and restarting Daedalus

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I restart Daedalus
And I click on "Daedalus"
Then I can see the "About" option is disabled

Scenario 16 - Validate "Daedalus Diagnostics" is disabled after submitting initial settings and restarting Daedalus

Given Daedalus is executed for the first time after installation
And I am on the "Service agreement" screen
When I restart Daedalus
And I click on "Help"
Then I can see the "Daedalus Diagnostics" option is disabled
And I can't access by the keyboard shortcut

Testing Summary

English
image
image
image
image

Japanese
image
image
image
image

Review Checklist

Basics

  • PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
  • PR is updated to the most recent version of the target branch (and there are no conflicts)
  • PR has a good description that summarizes all changes and shows some screenshots or animated GIFs of important UI changes
  • CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
  • Automated tests: All acceptance and unit tests are passing (yarn test)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
  • Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
  • There are no flow errors or warnings (yarn flow:test)
  • There are no lint errors or warnings (yarn lint)
  • There are no prettier errors or warnings (yarn prettier:check)
  • There are no missing translations (running yarn manage:translations produces no changes)
  • Text changes are proofread and approved (Jane Wild / Amy Reeve)
  • Japanese text changes are proofread and approved (Junko Oda)
  • UI changes look good in all themes (Alexander Rukin)
  • Storybook works and no stories are broken (yarn storybook)
  • In case of dependency changes yarn.lock file is updated

Code Quality

  • Important parts of the code are properly commented and documented
  • Code is properly typed with flow
  • React components are split-up enough to avoid unnecessary re-renderings
  • Any code that only works in main process is neatly separated from components

Testing

  • New feature/change is covered by acceptance tests
  • New feature/change is manually tested and approved by QA team
  • All existing acceptance tests are still up-to-date
  • New feature/change is covered by Daedalus Testing scenario
  • All existing Daedalus Testing scenarios are still up-to-date

After Review

  • Merge the PR
  • Delete the source branch
  • Move the ticket to done column on the YouTrack board
  • Update Slack QA thread by marking it with a green checkmark

@ManusMcCole
Copy link

ManusMcCole commented Jan 18, 2021

Hi @yakovkaravelov. Tested on build 15928. Works really well when on the Service Level Agreement screen. However Service Level Agreement can be skipped with scenario 1(If a wallet is saved in state directory from before) and 2 as these options are available still from the initial settings screen

Test cases Results Note
Scenario 1 Fail Wallet Settings is still an available option from the initial settings screen and is not greyed out.
Scenario 2 Fail Settings is still an available option from the initial settings screen. This option can be used as a way of bypassing the Service Level Agreement.video
Scenario 3 Fail About Daedalus options is still available from the initial settings screen

@topseniors
Copy link
Contributor Author

Hi @yakovkaravelov. Tested on build 15928. Works really well when on the Service Level Agreement screen. However Service Level Agreement can be skipped with scenario 1(If a wallet is saved in state directory from before) and 2 as these options are available still from the initial settings screen

Test cases Results Note
Scenario 1 Fail Wallet Settings is still an available option from the initial settings screen and is not greyed out.
Scenario 2 Fail Settings is still an available option from the initial settings screen. This option can be used as a way of bypassing the Service Level Agreement.video
Scenario 3 Fail About Daedalus options is still available from the initial settings screen

@ManusMcCole This was fixed. Please test again, thanks.

Copy link

@ManusMcCole ManusMcCole left a comment

Choose a reason for hiding this comment

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

Goodjob Yakov. Looks good 👍

@gabriela-ponce
Copy link

The test cases were updated to validate "Daedalus Diagnostics" (cases 4, 8, 12) and also to validate all the options after submitting the initial settings and restarting Daedalus (cases 13 to 16).

@yakovkaravelov On build 15934 the cases 1 to 12 passed (pending to implement 13 to 16).

@topseniors topseniors added the WIP label Jan 19, 2021
@topseniors topseniors removed the WIP label Jan 20, 2021
@topseniors
Copy link
Contributor Author

topseniors commented Jan 20, 2021

@gnpf @nikolaglumac This is ready for review/test.
Thanks.

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

@yakovkaravelov please see my comments. Thanks!

source/renderer/app/stores/ProfileStore.js Outdated Show resolved Hide resolved
source/renderer/app/stores/ProfileStore.js Outdated Show resolved Hide resolved
source/main/index.js Outdated Show resolved Hide resolved
@topseniors
Copy link
Contributor Author

@nikolaglumac They were renamed, thanks.

source/main/index.js Outdated Show resolved Hide resolved
@nikolaglumac
Copy link
Contributor

@ManusMcCole please re-test this one 🙏

Copy link

@ManusMcCole ManusMcCole left a comment

Choose a reason for hiding this comment

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

👍

@nikolaglumac nikolaglumac self-requested a review January 21, 2021 09:52
await this.getTermsOfUseAcceptanceRequest.execute();
if (this.getTermsOfUseAcceptanceRequest.result) {
await enableApplicationMenuNavigationChannel.send();
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

@yakovkaravelov I don't think we need this else clause as the menu navigation is disabled by default?

Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

@yakovkaravelov nice work!
Now with the latest changes, I believe we actually don't even need the "disable application menu channel". The navigation is disabled by default and we only need to enable it either when user accepts the terms of use OR if we detect the terms of use have already been accepted in the past.

@nikolaglumac nikolaglumac self-requested a review January 21, 2021 10:10
@nikolaglumac nikolaglumac removed the WIP label Jan 21, 2021
source/main/index.js Outdated Show resolved Hide resolved
@topseniors topseniors removed the WIP label Jan 21, 2021
@nikolaglumac nikolaglumac self-requested a review January 21, 2021 11:24
Copy link
Contributor

@nikolaglumac nikolaglumac left a comment

Choose a reason for hiding this comment

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

Looks and works great now @yakovkaravelov 🎉

@nikolaglumac nikolaglumac merged commit c79b677 into develop Jan 21, 2021
@iohk-bors iohk-bors bot deleted the chore/ddw-536-service-agreement-can-be-skipped-by-accessing-to-settings branch January 21, 2021 11:47
@nikolaglumac nikolaglumac added release-3.3.0 Daedalus Mainnet release-3.3.0-FC1 Daedalus Flight and removed ⏳release-vNext labels Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore release-3.3.0-FC1 Daedalus Flight release-3.3.0 Daedalus Mainnet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants