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 proptypes

  • Loading branch information
benstrumeyer committed Jan 12, 2021
commit 3e3c185da385500ddef05287090b5d8fa14a912c
@@ -40,14 +40,7 @@ export default WelcomeView;

// PropTypes ensure we pass required props of the correct type
WelcomeView.propTypes = {
actions: {
actions: PropTypes.shape({
setSetupStep: PropTypes.func.isRequired
}
};

const noop = () => {};
WelcomeView.defaultProps = {
actions: {
setSetupStep: noop
}
}).isRequired,
};
@@ -233,27 +233,13 @@ export default BlockSettingsView;

// PropTypes ensure we pass required props of the correct type
BlockSettingsView.propTypes = {
actions: {
actions: PropTypes.shape({
logout: PropTypes.func.isRequired,
setAntiTracking: PropTypes.func.isRequired,
setAdBlock: PropTypes.func.isRequired,
setSmartBlocking: PropTypes.func.isRequired,
setBlockingPolicy: PropTypes.func.isRequired,
setToast: PropTypes.func.isRequired,
setSetupStep: PropTypes.func.isRequired,
}
};

const noop = () => {};
BlockSettingsView.defaultProps = {
actions: {
logout: noop,
setAntiTracking: noop,
setAdBlock: noop,
setSmartBlocking: noop,
setBlockingPolicy: noop,
setToast: noop,
setSetupStep: noop,

}
}).isRequired,
};
@@ -25,6 +25,7 @@ describe('app/ghostery-browser-hub/Views/OnboardingViews/Step2_BlockSettingsView
test('BlockSettings View is rendered correctly', () => {
const initialState = {
actions: {
logout: noop,
setAntiTracking: noop,
setAdBlock: noop,
setSmartBlocking: noop,
@@ -46,6 +47,7 @@ describe('app/ghostery-browser-hub/Views/OnboardingViews/Step2_BlockSettingsView
test('BlockSettings View happy path', () => {
const initialState = {
actions: {
logout: noop,
setAntiTracking: jest.fn(),
setAdBlock: jest.fn(),
setSmartBlocking: jest.fn(),
@@ -6,8 +6,6 @@ exports[`app/ghostery-browser-hub/Views/OnboardingViews/StepProgressBar/StepProg

exports[`app/ghostery-browser-hub/Views/OnboardingViews/StepProgressBar/StepProgressBar.test.jsx Shallow snapshot tests rendered with Enzyme StepProgressBar View step 2 1`] = `ShallowWrapper {}`;

exports[`app/ghostery-browser-hub/Views/OnboardingViews/StepProgressBar/StepProgressBar.test.jsx Shallow snapshot tests rendered with Enzyme StepProgressBar View step 3 1`] = `ShallowWrapper {}`;

exports[`app/ghostery-browser-hub/Views/OnboardingViews/StepProgressBar/StepProgressBar.test.jsx Shallow snapshot tests rendered with Enzyme StepProgressBar View step 4 1`] = `ShallowWrapper {}`;

exports[`app/ghostery-browser-hub/Views/OnboardingViews/StepProgressBar/StepProgressBar.test.jsx Shallow snapshot tests rendered with Enzyme StepProgressBar View step 5 1`] = `ShallowWrapper {}`;
ProTip! Use n and p to navigate between commits in a pull request.