This repository has been archived by the owner on Feb 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
wp-signup-spec.js
47 lines (35 loc) · 1.85 KB
/
wp-signup-spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/** @format */
import assert from 'assert';
import ChecklistPage from '../pages/checklist-page';
import InlineHelpChecklistComponent from '../components/inline-help-checklist-component.js';
import SitePreviewComponent from '../components/site-preview-component.js';
export const canSeeTheSitePreview = () => {
step( 'Can then see the site preview', async function() {
const sitePreviewComponent = await SitePreviewComponent.Expect( this.driver );
const toolbar = await sitePreviewComponent.sitePreviewToolbar();
const placeholder = await sitePreviewComponent.contentPlaceholder();
assert( toolbar, 'The preview toolbar does not exist.' );
assert( placeholder, 'The preview content placeholder does not exist.' );
await sitePreviewComponent.enterSitePreview();
const siteBody = await sitePreviewComponent.siteBody();
assert( siteBody, 'The site body does not appear in the iframe.' );
return await sitePreviewComponent.leaveSitePreview();
} );
};
export const canSeeTheInlineHelpCongratulations = () => {
step( 'Can then see the inlineHelp congratulations', async function() {
const inlineHelpChecklistComponent = await InlineHelpChecklistComponent.Expect( this.driver );
const congratulations = await inlineHelpChecklistComponent.congratulationsExists();
assert( congratulations, 'The inlineHelp congratulations does not exist.' );
return await inlineHelpChecklistComponent.leaveInlineHelpChecklist();
} );
};
export const canSeeTheOnboardingChecklist = () => {
step( 'Can then see the onboarding checklist', async function() {
const checklistPage = await ChecklistPage.Expect( this.driver );
const header = await checklistPage.headerExists();
const subheader = await checklistPage.subheaderExists();
assert( header, 'The checklist header does not exist.' );
return assert( subheader, 'The checklist subheader does not exist.' );
} );
};