Skip to content

Commit

Permalink
Create a post before going to the onboarding wizard so there is somet…
Browse files Browse the repository at this point in the history
…hing to preview
  • Loading branch information
westonruter committed Oct 20, 2021
1 parent 5f5fe35 commit fce116d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/e2e/utils/onboarding-wizard-utils.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/**
* WordPress dependencies
*/
import { visitAdminPage } from '@wordpress/e2e-test-utils';
import { createNewPost, visitAdminPage } from '@wordpress/e2e-test-utils';

export const NEXT_BUTTON_SELECTOR = '#next-button';
export const PREV_BUTTON_SELECTOR = '.amp-settings-nav__prev-next button:not(.is-primary)';

export async function goToOnboardingWizard() {
await visitAdminPage( 'index.php' );
await expect( page ).not.toMatchElement( '#amp-onboarding-wizard' );
await createNewPost(); // So that there is a post to appear on the done screen.
await visitAdminPage( 'admin.php', 'page=amp-onboarding-wizard' );
await expect( page ).toMatchElement( '#amp-onboarding-wizard' );
}
Expand Down

0 comments on commit fce116d

Please sign in to comment.