cd /workspace/wp-calypso && mkdir -p client/jetpack-onboarding/test && cat > client/jetpack-onboarding/test/stats.js <<'EOF'
/**
 * @format
 * @jest-environment jsdom
 */
e/**
 * External dependencies
 */
import React from 'react';
import { identity, noop } from 'lodash';
import { shallow } from 'enzyme';
(/**
 * Internal dependencies
 */
import Button from 'components/button';
import { externalRedirect } from 'lib/route';
import { JetpackOnboardingStatsStep } from '../steps/stats';
import {
JETPACK_ONBOARDING_COMPONENTS as COMPONENTS,
JETPACK_ONBOARDING_STEPS as STEPS,
} from '../constants';
jest.mock( 'lib/route/path', () => ( {
externalRedirect: jest.fn(),
} ) );
const SITE_ID = 123456;
const SITE_SLUG = 'example.com';
const SITE_URL = 'https://example.com';
const BACK_URL = `/jetpack/start/${ STEPS.WOOCOMMERCE }/${ SITE_SLUG }`;
const FORWARD_URL = `/jetpack/start/${ STEPS.SUMMARY }/${ SITE_SLUG }`;
const DEFAULT_PROPS = {
activateModule: jest.fn( () => Promise.resolve() ),
basePath: '/jetpack/start',
getBackUrl: () => BACK_URL,
getForwardUrl: () => FORWARD_URL,
isActivatingStats: false,
isConnected: false,
recordJpoEvent: noop,
siteId: SITE_ID,
siteSlug: SITE_SLUG,
siteUrl: SITE_URL,
statsModuleActive: false,
translate: identity,
};
const render = props => shallow( <JetpackOnboardingStatsStep { ...DEFAULT_PROPS } { ...props } /> );
describe( 'Jetpack onboarding Stats step', () => {
beforeEach( () => {

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
DEFAULT_PROPS.activateModule.mockClear();

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
externalRedirect.mockReset();
} );
test( 'is registered as the step before Summary', () => {

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( STEPS.STATS ).toBe( 'stats' );

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( COMPONENTS[ STEPS.STATS ].type ).toBeTruthy();
} );
test( 'renders an introduction screen with the expected copy and CTA', () => {

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
const wrapper = render();

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( wrapper.text() ).toContain( 'Keep track of your visitors with Jetpack.' );

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( wrapper.text() ).toContain( 'Activate stats' );

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( wrapper.find( 'img.steps__stats-illustration' ) )

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
.to.have.prop( 'src' )

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
.equal( '/images/stats/illustration-stats-intro.svg' );
} );
test( 'redirects to Jetpack Connect when the site is not connected', () => {

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes<response clipped><NOTE>Due to the max output limit, only part of the full response has been shown to you.</NOTE>lintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( wrapper.find( Button ).filterWhere( button => button.children().text() === 'Continue' ) )

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
.to.have.prop( 'href' )

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
.equal( FORWARD_URL );
} );
test( 'renders success immediately when Stats is already active', () => {

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
const wrapper = render( { isConnected: true, statsModuleActive: true } );

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( wrapper.text() ).toContain( 'Success! Jetpack is now collecting valuable stats.' );

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( DEFAULT_PROPS.activateModule ).not.toHaveBeenCalled();
} );
test( 'disables the CTA while module activation is pending', () => {

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
const wrapper = render( { isConnected: true, isActivatingStats: true } );

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
expect( wrapper.find( Button ).filterWhere( button => button.children().text() === 'Activating…' ) )

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
.to.have.prop( 'disabled' )

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js

.babelrc                 .editorconfig            .eslintignore            .git/                    .github/                 .npmrc                   .rtlcssrc                CODE-OF-CONDUCT.md       Dockerfile               README.md                Vagrantfile-boot2docker  bin/                     circle.yml               config/                  env-config.sh            inline-imports.js        node_modules/            package.json             public/                  test/                    webpack.config.node.js
.dockerignore            .eslines.json            .eslintrc.js             .gitattributes           .gitignore               .nvmrc                   .stylelintrc             CREDITS.md               LICENSE.md               Vagrantfile              assets/                  cached-requests.json     client/                  docs/                    index.js                 jsconfig.json            npm-shrinkwrap.json      postcss.config.json      server/                  webpack.config.js
.equal( true );
} );
} );
EOF
[The command completed with exit code 0.]
[Current working directory: /workspace/wp-calypso]
[Python interpreter: /usr/bin/python]
[Command finished with exit code 0]