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

GH-2244: Unit tests for Ghostery Dawn Intro Hub #657

Merged
merged 24 commits into from Jan 19, 2021
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6d510c2
Add tests for Welcome and success viwe
benstrumeyer Jan 6, 2021
b2d8d86
Merge branch 'ghostery-browser-intro-hub' into ghostery-browser-intro…
benstrumeyer Jan 9, 2021
bcd6150
Add tests for Welcome, Success, BlockSettingsView and ChoosePlanView
benstrumeyer Jan 10, 2021
6960ff4
Add tests for Step1_CreateAccountForm
benstrumeyer Jan 10, 2021
0872b0d
Add tests for Step1_LoginForm
benstrumeyer Jan 10, 2021
8721f8d
Add tests for Step1_CreateAccountView
benstrumeyer Jan 10, 2021
a870aef
Add tests for hub reducers
benstrumeyer Jan 11, 2021
af71328
Update copyright year
benstrumeyer Jan 11, 2021
6ebf2e5
Add copyright to sass files
benstrumeyer Jan 11, 2021
f8e9899
Add broken AntiSuiteActions test
benstrumeyer Jan 11, 2021
bd79fd6
Add tests for AntiSuiteActions
benstrumeyer Jan 12, 2021
88bdd15
Add test for BlockingPolicyActions
benstrumeyer Jan 12, 2021
4e5f507
Add test for MetricsActions
benstrumeyer Jan 12, 2021
65a1aa0
Add tests for ToastActions
benstrumeyer Jan 12, 2021
622943d
Add tests for SetupLifeCycleActions
benstrumeyer Jan 12, 2021
fbf830d
Add test for StepProgressBar component, fix console errors and use On…
benstrumeyer Jan 12, 2021
8c024f5
Update propTypes
benstrumeyer Jan 12, 2021
f085ef1
Remove console log
benstrumeyer Jan 12, 2021
dbbbaca
Merge branch 'ghostery-browser-intro-hub' into ghostery-browser-intro…
benstrumeyer Jan 12, 2021
3e3c185
Update proptypes
benstrumeyer Jan 12, 2021
22d567f
Update test for ToastReducer
benstrumeyer Jan 12, 2021
f4b4e53
Fix Choose Plan Page screen width
benstrumeyer Jan 12, 2021
3438d55
Add back comment
benstrumeyer Jan 12, 2021
bf3ba73
Cleanup unit tests, move withRouter back to component entry path, fix…
benstrumeyer Jan 14, 2021
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Update copyright year

  • Loading branch information
benstrumeyer committed Jan 11, 2021
commit af713283c10dee34e84d23d433db91dbc52ad8c3
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020, Inc. All rights reserved.
* Copyright 2021, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -53,7 +53,7 @@ const renderFAQListItem = (icon, label, description) => (
* @return {JSX} JSX for rendering the Browser Create Account View of the Hub app
* @memberof GhosteryBrowserHubViews
*/
export const Step1_CreateAccountView = (props) => {
const Step1_CreateAccountView = (props) => {
const { user, actions } = props;
const { setSetupStep } = actions;
const email = user && user.email;
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,14 +4,13 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0
*/

import { withRouter } from 'react-router-dom';
import { buildReduxHOC } from '../../../../shared-hub/utils';
import Step1_CreateAccountView from './Step1_CreateAccountView';
import { setSetupStep } from '../../../../shared-hub/actions/SetupLifecycleActions';
@@ -20,4 +19,4 @@ const actionCreators = {
setSetupStep,
};

export default withRouter(buildReduxHOC(['account'], actionCreators, Step1_CreateAccountView));
export default buildReduxHOC(['account'], actionCreators, Step1_CreateAccountView);
This conversation was marked as resolved by wlycdgr

This comment has been minimized.

@wlycdgr

wlycdgr Jan 13, 2021
Member

What was the rationale for moving the withRouter wrapper into buildReduxHOC? Not opposed to it in principle but we should probably provide a bool arg for it as not all HOCs so the function is more broadly useful, as not all HOCs need to be or should be wrapped with routers

This comment has been minimized.

@benstrumeyer

benstrumeyer Jan 14, 2021
Author Contributor

I figured that we would need to use it in every component, but that's right we don't! I actually prefer the withRouter to be handled inside the index.js file of the component, so I moved it back out and updated everything accordingly

@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.

This comment has been minimized.

@wlycdgr

wlycdgr Jan 13, 2021
Member

Heh, nice. Thanks for updating all those

*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2019 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -4,7 +4,7 @@
* Ghostery Browser Extension
* https://www.ghostery.com/
*
* Copyright 2020 Ghostery, Inc. All rights reserved.
* Copyright 2021 Ghostery, Inc. All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
ProTip! Use n and p to navigate between commits in a pull request.