Skip to content

Commit

Permalink
Merge pull request #814 from google/fix/bad-setup-proxy-import
Browse files Browse the repository at this point in the history
fix: Bad import in proxy setup page
  • Loading branch information
felixarntz authored Nov 7, 2019
2 parents 19d0f36 + 1f426d3 commit 8155278
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
/assets/vendor/*
/dist/*
/tests/backstop/html_report/*
/tests/qunit/*
/vendor/*
2 changes: 1 addition & 1 deletion assets/js/components/setup/setup-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ import Layout from 'GoogleComponents/layout/layout';
import Optin from 'GoogleComponents/optin';
import { sendAnalyticsTrackingEvent } from 'GoogleUtil';
import { getSiteKitAdminURL } from 'SiteKitCore/util';
import { Component, Fragment } from 'GoogleUtil/react-features';
import { delay } from 'lodash';

/**
* WordPress dependencies
*/
import { Component, Fragment } from '@wordpress/element';
import { __, sprintf } from '@wordpress/i18n';
import { getQueryArg } from '@wordpress/url';

Expand Down
17 changes: 17 additions & 0 deletions tests/e2e/specs/auth-flow-proxy.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* WordPress dependencies
*/
import { visitAdminPage } from '@wordpress/e2e-test-utils';

describe( 'Site Kit set up flow for the first time', () => {
it( 'renders a splash page for proxy set up when no GCP credentials are provided', async () => {
await visitAdminPage( 'admin.php', 'page=googlesitekit-splash' );

await page.waitForSelector( '.googlesitekit-start-setup' );

await expect( page ).toMatchElement( '.googlesitekit-setup__title', { text: 'The Site Kit plugin is active but requires setup' } );
await expect( page ).toMatchElement( '.googlesitekit-start-setup', { text: 'Start setup' } );
await expect( page ).toMatchElement( '.googlesitekit-start-setup', { href: /^https:\/\/sitekit.withgoogle.com\/site-management\/setup\/\?/i } );
} );
} );

0 comments on commit 8155278

Please sign in to comment.